Add delete button on docs
This commit is contained in:
11
inc/catc.php
11
inc/catc.php
@@ -150,12 +150,19 @@ class CATC extends Main
|
||||
return self::getJsonResult(!empty($asDocList), '', $asDocList);
|
||||
}
|
||||
|
||||
public function uploadDoc($iCourseId)
|
||||
{
|
||||
public function uploadDoc($iCourseId) {
|
||||
$this->oClassManagement->incClass('uploader', true);
|
||||
$oDoc = new Doc($this->oDb, $this->oAuth->getUserId(), $iCourseId);
|
||||
$oUploader = new Uploader($oDoc);
|
||||
|
||||
return $oUploader->sBody;
|
||||
}
|
||||
|
||||
public function deleteDoc($iDocId) {
|
||||
$oDoc = new Doc($this->oDb);
|
||||
$oDoc->setDocId($iDocId);
|
||||
$bResult = $oDoc->delete();
|
||||
|
||||
return self::getJsonResult($bResult, '');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user