You are here

public function OpignoTincanQuestionTypeQuestion::delete in Opigno TinCan Question Type 7

Implementation of delete().

See also

QuizQuestion#delete($only_this_version)

File

includes/opigno_tincan_question_type.question.inc, line 198
This file contains the class OpignoTincanQuestionTypeQuestion.

Class

OpignoTincanQuestionTypeQuestion
This class goal is to provide specific TinCan question information.

Code

public function delete($only_this_version = FALSE) {
  parent::delete($only_this_version);
  if (!isset($this->nodeProperties['fid'])) {
    $this
      ->getNodeProperties();
  }
  $file = file_load($this->nodeProperties['fid']);
  if ($file) {
    file_usage_delete($file, 'opigno_tincan_question_type', 'node', $this->node->nid);
    file_delete($file);
  }
}