Esempio n. 1
0
 /**
  * Delete annotationfeedback records in the artefact table and the artefat_annotation_feedback table.
  *
  * @param array $artefactids is a list of artefactids representing the annotationfeedback artefacts.
  */
 public static function bulk_delete($artefactids)
 {
     if (empty($artefactids)) {
         return;
     }
     $idstr = join(',', array_map('intval', $artefactids));
     db_begin();
     delete_records_select('artefact_annotation_feedback', 'artefact IN (' . $idstr . ')');
     parent::bulk_delete($artefactids);
     db_commit();
 }
Esempio n. 2
0
 public static function bulk_delete($artefactids)
 {
     if (empty($artefactids)) {
         return;
     }
     $idstr = join(',', array_map('intval', $artefactids));
     db_begin();
     delete_records_select('artefact_comment_comment', 'artefact IN (' . $idstr . ')');
     delete_records_select('artefact_file_embedded', 'resourcetype = ? AND resourceid IN (' . $idstr . ')', array('comment'));
     parent::bulk_delete($artefactids);
     db_commit();
 }