new text editor: tinyMCE

This commit is contained in:
2020-02-24 21:37:14 +01:00
parent abcb059355
commit 3fd854ddf1
15 changed files with 425 additions and 145 deletions

View File

@@ -130,6 +130,13 @@ class CATC extends Main
/* Notes*/
public function getNoteOld($iCourseId) {
$oNote = new Note($this->oDb, $this->oAuth->getUserId(), $iCourseId);
$asNote = $oNote->getNoteOld();
return self::getJsonResult(!empty($asNote), '', $asNote);
}
public function getNote($iCourseId) {
$oNote = new Note($this->oDb, $this->oAuth->getUserId(), $iCourseId);
$asNote = $oNote->getNote();
@@ -137,10 +144,9 @@ class CATC extends Main
return self::getJsonResult(!empty($asNote), '', $asNote);
}
public function setNote($iCourseId, $asOps) {
if(is_string($asOps)) $asOps = json_decode($asOps, true);
public function setNote($iCourseId, $sNotes) {
$oNote = new Note($this->oDb, $this->oAuth->getUserId(), $iCourseId);
$sError = $oNote->setNote($asOps);
$sError = $oNote->setNote($sNotes);
$bSuccess = ($sError=='');
$asData = ($bSuccess)?array('led_time' => $oNote->getNote()['led_time']):array();