4require_once
'Modules/Test/classes/class.ilTestQuestionSetConfig.php';
23 if( count($this->testOBJ->questions) )
46 $this->testOBJ->removeAllTestEditings();
48 $res = $this->db->queryF(
49 "SELECT question_fi FROM tst_test_question WHERE test_fi = %s",
50 array(
'integer'), array($this->testOBJ->getTestId())
53 while(
$row = $this->db->fetchAssoc(
$res) )
55 $this->testOBJ->removeQuestion(
$row[
"question_fi"]);
58 $this->db->manipulateF(
59 "DELETE FROM tst_test_question WHERE test_fi = %s",
60 array(
'integer'), array($this->testOBJ->getTestId())
63 $this->testOBJ->questions = array();
65 $this->testOBJ->saveCompleteStatus($this);
82 require_once
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php';
83 require_once
'Modules/TestQuestionPool/classes/class.assQuestion.php';
87 foreach( $this->testOBJ->questions as $key => $question_id )
90 $cloneTestOBJ->questions[$key] = $question->duplicate(
true,
null,
null,
null, $cloneTestOBJ->getId());
95 $question->saveToDb($original_id);
99 $originalKey = $this->testOBJ->getRefId().
'_'.$question_id;
100 $mappedKey = $cloneTestOBJ->getRefId().
'_'.$cloneTestOBJ->questions[$key];
101 $cwo->appendMapping($originalKey, $mappedKey);
102 $ilLog->write(__METHOD__.
": Added mapping $originalKey <-> $mappedKey");
static _getOriginalId($question_id)
Returns the original id of a question.
static _instanciateQuestion($question_id)
Creates an instance of a question with a given question id.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
loadFromDb()
loads the question set config for current test from the database
cloneToDbForTestId($testId)
saves the question set config for test with given id to the database
isResultTaxonomyFilterSupported()
removeQuestionSetRelatedData()
removes all question set config related data
isQuestionSetConfigured()
returns the fact wether a useable question set config exists or not
saveToDb()
saves the question set config for current test to the database
doesQuestionSetRelatedDataExist()
returns the fact wether a useable question set config exists or not
deleteFromDb()
deletes the question set config for current test from the database
resetQuestionSetRelatedTestSettings()
resets all test settings that depends on a non changed question set config
cloneQuestionSetRelatedData($cloneTestOBJ)
removes all question set config related data for cloned/copied test