23 include_once 
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
 
   24 include_once 
"./Modules/Test/classes/inc.AssessmentConstants.php";
 
   62                 $this->parameters = array();
 
   76                 if (($this->title) and ($this->author) and ($this->question) and ($this->
getMaximumPoints() > 0) and (strlen($this->
getApplet())))
 
   98                 $affectedRows = $ilDB->manipulateF(
"DELETE FROM " . $this->
getAdditionalTableName() . 
" WHERE question_fi = %s", 
 
  100                         array($this->
getId())
 
  102                 $affectedRows = $ilDB->manipulateF(
"INSERT INTO " . $this->
getAdditionalTableName() . 
" (question_fi, width, height, applet, params) VALUES (%s, %s, %s, %s, %s)", 
 
  103                         array(
"integer", 
"integer", 
"integer", 
"text", 
"text"),
 
  117                         unset(
$_SESSION[
"flash_upload_filename"]);
 
  140                         $this->
setId($question_id);
 
  151                         include_once(
"./Services/RTE/classes/class.ilRTE.php");
 
  165                                 $this->parameters = unserialize(
$data[
"params"]);
 
  167                                 unset(
$_SESSION[
"flash_upload_filename"]);
 
  188                 $this_id = $this->
getId();
 
  190                 include_once (
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
 
  217                 $clone->copyPageOfQuestion($this_id);
 
  219                 $clone->copyXHTMLMediaObjectsOfQuestion($this_id);
 
  221                 $clone->duplicateFeedbackGeneric($this_id);
 
  223                 $clone->duplicateApplet($this_id);
 
  225                 $clone->onDuplicate($this_id);
 
  245                 include_once (
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
 
  248                 $source_questionpool = $this->
getObjId();
 
  249                 $clone->setObjId($target_questionpool);
 
  279                 $flashpath_original = preg_replace(
"/([^\d])$this->id([^\d])/", 
"\${1}$question_id\${2}", $flashpath);
 
  280                 if (!file_exists($flashpath))
 
  285                 if (!copy($flashpath_original . 
$filename, $flashpath . $filename)) {
 
  286                         print 
"flash applet could not be duplicated!!!! ";
 
  296         protected function copyApplet($question_id, $source_questionpool)
 
  299                 $flashpath_original = preg_replace(
"/([^\d])$this->id([^\d])/", 
"\${1}$question_id\${2}", $flashpath);
 
  300                 $flashpath_original = str_replace(
"/$this->obj_id/", 
"/$source_questionpool/", $flashpath_original);
 
  301                 if (!file_exists($flashpath))
 
  306                 if (!copy($flashpath_original . 
$filename, $flashpath . $filename)) 
 
  308                         print 
"flash applet could not be copied!!!! ";
 
  336                 $found_values = array();
 
  341                 $result = $ilDB->queryF(
"SELECT * FROM tst_solutions WHERE active_fi = %s AND question_fi = %s AND pass = %s",
 
  342                         array(
"integer", 
"integer", 
"integer"),
 
  358                 $params = array(
'http' => array(
 
  362                 if ($optional_headers !== null) 
 
  364                         $params[
'http'][
'header'] = $optional_headers;
 
  366                 $ctx = stream_context_create($params);
 
  367                 $fp = @fopen($url, 
'rb', 
false, $ctx);
 
  370                         throw new Exception(
"Problem with $url, $php_errormsg");
 
  372                 $response = @stream_get_contents($fp);
 
  373                 if ($response === 
false) 
 
  375                         throw new Exception(
"Problem reading data from $url, $php_errormsg");
 
  391                 if (!empty($tmpfile))
 
  393                         $flashfile = str_replace(
" ", 
"_", $flashfile);
 
  395                         if (!file_exists($flashpath))
 
  437                 return "assFlashQuestion";
 
  450                 return "qpl_qst_flash";
 
  500                 include_once (
"./Services/Excel/classes/class.ilExcelUtils.php");
 
  503                 return $startrow + 1;
 
  519         function fromXML(&$item, &$questionpool_id, &$tst_id, &$tst_object, &$question_counter, &$import_mapping)
 
  521                 include_once 
"./Modules/TestQuestionPool/classes/import/qti12/class.assFlashQuestionImport.php";
 
  523                 $import->fromXML($item, $questionpool_id, $tst_id, $tst_object, $question_counter, $import_mapping);
 
  533         function toXML($a_include_header = 
true, $a_include_binary = 
true, $a_shuffle = 
false, $test_output = 
false, $force_image_references = 
false)
 
  535                 include_once 
"./Modules/TestQuestionPool/classes/export/qti12/class.assFlashQuestionExport.php";
 
  537                 return $export->toXML($a_include_header, $a_include_binary, $a_shuffle, $test_output, $force_image_references);
 
  548                 $user_solution = array();
 
  549                 return $user_solution;
 
  554                 if (!$a_height) $a_height = 400;
 
  555                 $this->height = $a_height;
 
  565                 if (!$a_width) $a_width = 550;
 
  566                 $this->width = $a_width;
 
  576                 $this->applet = $a_applet;
 
  586                 $this->parameters[$name] = $value;
 
  591                 if (is_array($params))
 
  593                         $this->parameters = $params;
 
  597                         $this->parameters = array();
 
  603                 unset($this->parameters[$name]);
 
  608                 $this->parameters = array();