5 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
6 include_once
"./Modules/Test/classes/inc.AssessmentConstants.php";
68 if (strlen($this->title) and ($this->author) and ($this->question) and ($this->
getMaximumPoints() > 0))
91 $affectedRows = $ilDB->manipulateF(
"DELETE FROM " . $this->
getAdditionalTableName() .
" WHERE question_fi = %s",
96 $affectedRows = $ilDB->manipulateF(
"INSERT INTO " . $this->
getAdditionalTableName() .
" (question_fi, maxnumofchars) VALUES (%s, %s)",
97 array(
"integer",
"integer"),
107 $result = $ilDB->manipulateF(
"DELETE FROM qpl_num_range WHERE question_fi = %s",
109 array($this->
getId())
113 $next_id = $ilDB->nextId(
'qpl_num_range');
114 $answer_result = $ilDB->manipulateF(
"INSERT INTO qpl_num_range (range_id, question_fi, lowerlimit, upperlimit, points, aorder, tstamp) VALUES (%s, %s, %s, %s, %s, %s, %s)",
115 array(
'integer',
'integer',
'text',
'text',
'float',
'integer',
'integer'),
140 $this->
setId($question_id);
149 include_once(
"./Services/RTE/classes/class.ilRTE.php");
156 $result = $ilDB->queryF(
"SELECT * FROM qpl_num_range WHERE question_fi = %s ORDER BY aorder ASC",
161 include_once
"./Modules/TestQuestionPool/classes/class.assNumericRange.php";
188 $this_id = $this->
getId();
190 if( (
int)$testObjId > 0 )
196 include_once (
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
200 if( (
int)$testObjId > 0 )
202 $clone->setObjId($testObjId);
229 $clone->copyPageOfQuestion($this_id);
231 $clone->copyXHTMLMediaObjectsOfQuestion($this_id);
233 $clone->duplicateGenericFeedback($this_id);
235 $clone->onDuplicate($thisObjId, $this_id, $clone->getObjId(), $clone->getId());
254 include_once (
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
257 $source_questionpool = $this->
getObjId();
258 $clone->setObjId($target_questionpool);
288 $a_limit = str_replace(
',',
'.', $a_limit);
289 $this->lower_limit = $a_limit;
294 $a_limit = str_replace(
',',
'.', $a_limit);
295 $this->upper_limit = $a_limit;
323 throw new ilTestException(
'return details not implemented for '.__METHOD__);
328 $found_values = array();
333 $result = $ilDB->queryF(
"SELECT * FROM tst_solutions WHERE active_fi = %s AND question_fi = %s AND pass = %s",
334 array(
'integer',
'integer',
'integer'),
339 $enteredvalue =
$data[
"value1"];
361 include_once
"./Services/Math/classes/class.EvalMath.php";
363 $eval->suppress_errors = TRUE;
391 include_once
"./Modules/Test/classes/class.ilObjTest.php";
395 $numeric_result = str_replace(
",",
".",
$_POST[
"numeric_result"]);
397 include_once
"./Services/Math/classes/class.EvalMath.php";
399 $math->suppress_errors = TRUE;
400 $result = $math->evaluate($numeric_result);
405 $returnvalue =
false;
407 $result = $ilDB->queryF(
"SELECT solution_id FROM tst_solutions WHERE active_fi = %s AND question_fi = %s AND pass = %s",
408 array(
'integer',
'integer',
'integer'),
412 $update =
$row[
"solution_id"];
415 if (strlen($numeric_result))
417 $affectedRows = $ilDB->update(
"tst_solutions", array(
418 "value1" => array(
"clob", trim($numeric_result)),
419 "tstamp" => array(
"integer", time())
421 "solution_id" => array(
"integer", $update)
427 $affectedRows = $ilDB->manipulateF(
"DELETE FROM tst_solutions WHERE solution_id = %s",
435 if (strlen($numeric_result))
437 $next_id = $ilDB->nextId(
'tst_solutions');
438 $affectedRows = $ilDB->insert(
"tst_solutions", array(
439 "solution_id" => array(
"integer", $next_id),
440 "active_fi" => array(
"integer", $active_id),
441 "question_fi" => array(
"integer", $this->
getId()),
442 "value1" => array(
"clob", trim($numeric_result)),
443 "value2" => array(
"clob", null),
444 "pass" => array(
"integer",
$pass),
445 "tstamp" => array(
"integer", time())
452 include_once (
"./Modules/Test/classes/class.ilObjAssessmentFolder.php");
460 include_once (
"./Modules/Test/classes/class.ilObjAssessmentFolder.php");
524 return "qpl_qst_numeric";
550 include_once (
"./Services/Excel/classes/class.ilExcelUtils.php");
556 if (strlen($solutions[0][
"value1"]))
561 return $startrow + $i + 1;