4include_once 
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php";
 
    5include_once 
'Modules/Test/classes/class.ilTestExpressPage.php';
 
   29        $questions = array_keys(
$obj->getQuestionTitlesAndIndexes());
 
   31        $pos = array_search(
$_REQUEST[
'q_id'], $questions);
 
   35            $next = $questions[$pos + 1];
 
   39            $next = $questions[0];
 
   42        $this->ctrl->setParameter($this, 
'q_id', $next);
 
   43        $link = $this->ctrl->getLinkTarget($this, 
'edit', 
'', 
'', 
false);
 
   51        $questions = array_keys(
$obj->getQuestionTitlesAndIndexes());
 
   53        $pos = array_search(
$_REQUEST[
'q_id'], $questions);
 
   57            $next = $questions[$pos - 1];
 
   61            $next = $questions[0];
 
   64        $this->ctrl->setParameter($this, 
'q_id', $next);
 
   65        $link = $this->ctrl->getLinkTarget($this, 
'edit', 
'', 
'', 
false);
 
   71                parent::__construct($a_id, $a_old_nr);
 
   78        $next_class = $this->ctrl->getNextClass($this);
 
   79        $cmd = $this->ctrl->getCmd();
 
   83            case 'ilobjquestionpoolgui':
 
   85                $nodeParts = explode(
':', 
$_GET[
'cmdNode']);
 
   88                    'ref_id' => 
$_GET[
'ref_id'],
 
   89                    'calling_test' => 
$_GET[
'ref_id'],
 
   90                    'q_id' => 
$_GET[
'q_id'],
 
   91                    'cmd' => 
$_GET[
'cmd'],
 
   92                    'cmdClass' => 
$_GET[
'cmdClass'],
 
   93                    'cmdNode' => $nodeParts[count($nodeParts) - 2] . 
':' . $nodeParts[count($nodeParts) - 1],
 
   94                    'baseClass' => 
'ilObjQuestionPoolGUI',
 
   95                    'test_express_mode' => 
'1' 
  102            case "ilpageeditorgui":
 
  107                    $ilCtrl->redirect($this, 
"preview");
 
  111                $page_editor->setLocator($this->locator);
 
  112                $page_editor->setHeader($this->
getHeader());
 
  113                $page_editor->setPageBackTitle($this->page_back_title);
 
  114                $page_editor->setIntLinkReturn($this->int_link_return);
 
  116                $this->ctrl->saveParameterByClass(
'ilpageeditorgui', 
'q_mode');
 
  118                $ret = & $this->ctrl->forwardCommand($page_editor);
 
  123            case 'iltestexpresspageobjectgui':
 
  125                                include_once 
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
 
  138                    $q_gui->object->setObjId(
$obj->getId());
 
  142                                        'handleToolbarCommand',
 
  146                                        'browseForQuestions',
 
  147                                        'filterAvailableQuestions',
 
  148                                        'resetfilterAvailableQuestions' 
  151                if( in_array(
$cmd, $cmds) )
 
  153                    return $this->
$cmd();
 
  155                elseif( $q_gui->object )
 
  157                                    $total = $this->test_object->evalTotalPersons();
 
  163                                                $link = 
$ilCtrl->getLinkTargetByClass(
'ilobjtestgui', 
"participants");
 
  164                                                $link = 
"<a href=\"".$link.
"\">".
$lng->txt(
"test_has_datasets_warning_page_view_link").
"</a>";
 
  168                    if( (in_array(
$cmd, array(
'view', 
'showPage')) || 
$cmd == 
'edit') && $this->test_object->evalTotalPersons() )
 
  173                    return parent::executeCommand();
 
  186                    $q_gui->setQuestionTabs();
 
  188                    $ret = $this->ctrl->forwardCommand($q_gui);
 
  193                $this->ctrl->setReturn($this, 
"questions");
 
  195                                include_once 
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
 
  201                    $q_gui->object->setObjId(
$obj->getId());
 
  204                $this->ctrl->saveParameterByClass(
'ilpageeditorgui', 
'q_id');
 
  205                $this->ctrl->saveParameterByClass(
'ilpageeditorgui', 
'q_mode');
 
  207                $q_gui->setQuestionTabs();
 
  208                $ret = & $this->ctrl->forwardCommand($q_gui);
 
  225        $this->ctrl->setReturn($this, 
"questions");
 
  227                include_once 
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
 
  232                $q_gui->object->setObjId(
$obj->getId());
 
  241                include_once 
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
 
  245                        include_once 
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
 
  248                elseif( 
$_REQUEST[
'sel_question_types'] )
 
  250                        $questionType = 
$_REQUEST[
'sel_question_types'];
 
  253                include_once 
'Modules/Test/classes/class.ilObjAssessmentFolder.php';
 
  256                        $addContEditMode = 
$_REQUEST[
'add_quest_cont_edit_mode'];
 
  266        $q_gui->object->setObjId(
$_GET[
'ref_id']);
 
  267                $q_gui->object->setAdditionalContentEditingMode($addContEditMode);
 
  269        $q_gui->object->createNewQuestion();
 
  271                $previousQuestionId = 
$_REQUEST[
'position'];
 
  277                                $ilCtrl->setParameterByClass(
'ilobjtestgui', 
'sel_qpl', 
$_REQUEST[
'sel_qpl']);
 
  278                                $ilCtrl->setParameterByClass(
'ilobjtestgui', 
'sel_question_types', $questionType);
 
  279                                $ilCtrl->setParameterByClass(
'ilobjtestgui', 
'q_id', $q_gui->object->getId());
 
  280                                $ilCtrl->setParameterByClass(
'ilobjtestgui', 
'prev_qid', $previousQuestionId);
 
  284                                        $ilCtrl->setParameterByClass(
'ilobjtestgui', 
'test_express_mode', 1);
 
  287                                if( isset(
$_REQUEST[
'add_quest_cont_edit_mode']) )
 
  290                                                'ilobjtestgui', 
'add_quest_cont_edit_mode', 
$_REQUEST[
'add_quest_cont_edit_mode']
 
  294                                $ilCtrl->setParameterByClass(
'ilobjtestgui', 
'usage', 3);
 
  295                                $ilCtrl->setParameterByClass(
'ilobjtestgui', 
'calling_test', $this->test_object->getId());
 
  297                                $link = 
$ilCtrl->getLinkTargetByClass(
'ilobjtestgui', 
'executeCreateQuestion', 
false, 
false, 
false);
 
  305                                $ilCtrl->setParameterByClass(
'ilobjtestgui', 
'txt_qpl', 
$_REQUEST[
'txt_qpl']);
 
  306                                $ilCtrl->setParameterByClass(
'ilobjtestgui', 
'sel_question_types', $questionType);
 
  307                                $ilCtrl->setParameterByClass(
'ilobjtestgui', 
'q_id', $q_gui->object->getId());
 
  308                                $ilCtrl->setParameterByClass(
'ilobjtestgui', 
'prev_qid', $previousQuestionId);
 
  312                                        $ilCtrl->setParameterByClass(
'ilobjtestgui', 
'test_express_mode', 1);
 
  315                                if( isset(
$_REQUEST[
'add_quest_cont_edit_mode']) )
 
  318                                                'ilobjtestgui', 
'add_quest_cont_edit_mode', 
$_REQUEST[
'add_quest_cont_edit_mode']
 
  322                                $ilCtrl->setParameterByClass(
'ilobjtestgui', 
'usage', 2);
 
  323                                $ilCtrl->setParameterByClass(
'ilobjtestgui', 
'calling_test', $this->test_object->getId());
 
  325                                $link = 
$ilCtrl->getLinkTargetByClass(
'ilobjtestgui', 
'executeCreateQuestion', 
false, 
false, 
false);
 
  343                include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
  349                $ilCtrl->setParameter($this, 
'test_express_mode', 1);
 
  351                $form->setFormAction(
$ilCtrl->getFormAction($this, 
"handleToolbarCommand"));
 
  352                $form->setTitle(
$lng->txt(
"ass_create_question"));
 
  353                include_once 
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
 
  356                $questionTypes = $pool->getQuestionTypes(
false, 
true);
 
  360                foreach($questionTypes as $label => 
$data)
 
  365                include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  368                $form->addItem(
$si, 
true);
 
  371                $questions = $this->test_object->getQuestionTitlesAndIndexes();
 
  376                        foreach($questions as $key => $title)
 
  378                                $options[$key] = 
$lng->txt(
'behind') . 
' '. $title . 
' ['.$this->lng->txt(
'question_id_short') . 
': '. $key .
']';
 
  382                        $form->addItem(
$si, 
true);
 
  391                                        $lng->txt(
'tst_add_quest_cont_edit_mode_default'),
 
  396                                        $lng->txt(
'tst_add_quest_cont_edit_mode_page_object'),
 
  402                        $form->addItem($ri, 
true);
 
  408                        $form->addItem($hi, 
true);
 
  411                if($this->test_object->getPoolUsage())
 
  415                        $usage->setRequired(
true);
 
  416                        $no_pool = 
new ilRadioOption($this->lng->txt(
"assessment_no_pool"), 1);
 
  417                        $usage->addOption($no_pool);
 
  418                        $existing_pool = 
new ilRadioOption($this->lng->txt(
"assessment_existing_pool"), 3);
 
  419                        $usage->addOption($existing_pool);
 
  420                        $new_pool = 
new ilRadioOption($this->lng->txt(
"assessment_new_pool"), 2);
 
  421                        $usage->addOption($new_pool);
 
  422                        $form->addItem($usage);
 
  427                        $pools_data = array();
 
  428                        foreach($questionpools as $key => $p)
 
  430                                $pools_data[$key] = $p[
'title'];
 
  432                        $pools = 
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"), 
"sel_qpl");
 
  433                        $pools->setOptions($pools_data);
 
  434                        $existing_pool->addSubItem($pools);
 
  438                        $name->setMaxLength(50);
 
  439                        $new_pool->addSubItem($name);
 
  442                $form->addCommandButton(
"handleToolbarCommand", 
$lng->txt(
"create"));
 
  443                $form->addCommandButton(
"questions", 
$lng->txt(
"cancel"));
 
  445                return $tpl->setContent($form->getHTML());
 
  452                $ilCtrl->saveParameterByClass(
'ilobjtestgui', 
'q_id');
 
  454                $ilCtrl->redirectByClass(
'ilobjtestgui', 
'showPage');
 
  459                $cmdClass = $questionType.
'GUI';
 
  461                $this->ctrl->setParameterByClass($cmdClass, 
'ref_id', 
$_GET[
'ref_id']);
 
  462                $this->ctrl->setParameterByClass($cmdClass, 
'sel_question_types', $questionType);
 
  463                $this->ctrl->setParameterByClass($cmdClass, 
'test_ref_id', 
$_GET[
'ref_id']);
 
  464                $this->ctrl->setParameterByClass($cmdClass, 
'calling_test', 
$_GET[
'ref_id']);
 
  465                $this->ctrl->setParameterByClass($cmdClass, 
'q_id', $qid);
 
  466                $this->ctrl->setParameterByClass($cmdClass, 
'prev_qid', $prev_qid);
 
  470                        $this->ctrl->setParameterByClass($cmdClass, 
'test_express_mode', 1);
 
  473                $this->ctrl->redirectByClass(
 
  474                        array(
'ilRepositoryGUI', 
'ilObjTestGUI', $questionType.
"GUI"), 
'editQuestion' 
  480        $this->ctrl->setParameterByClass(
'ilObjTestGUI', 
'ref_id', 
$_REQUEST[
'ref_id']);
 
  481        $this->ctrl->setParameterByClass(
'ilObjTestGUI', 
'q_id', $qid);
 
  482        $this->ctrl->setParameterByClass(
'ilObjTestGUI', 
'sel_question_types',  $questionType);
 
  483        $this->ctrl->setParameterByClass(
'ilObjTestGUI', 
'prev_qid',  $prev_qid);
 
  484        $redir = $this->ctrl->getLinkTargetByClass(
'ilObjTestGUI', 
'createQuestion', 
'', 
false, 
false);
 
  491                $selected_array = (is_array(
$_POST[
'q_id'])) ? 
$_POST[
'q_id'] : array();
 
  492                if (!count($selected_array))
 
  495                        $this->ctrl->redirect($this, 
"browseForQuestions");
 
  499                        include_once 
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
 
  502                        global $tree, 
$ilDB, $ilPluginAdmin;
 
  504                        require_once 
'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
 
  506                        $testQuestionSetConfig = $testQuestionSetConfigFactory->getQuestionSetConfig();
 
  508                        foreach ($selected_array as $key => $value) 
 
  510                                $last_question_id = $this->test_object->insertQuestion( $testQuestionSetConfig, $value );
 
  517                        $this->test_object->saveCompleteStatus( $testQuestionSetConfig );
 
  527                        $this->ctrl->setParameter($this, 
'q_id', $last_question_id);
 
  528                        $this->ctrl->redirect($this, 
"showPage");
 
& _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
const ADDITIONAL_CONTENT_EDITING_MODE_DEFAULT
constant for additional content editing mode "default"
_needsManualScoring($question_id)
const ADDITIONAL_CONTENT_EDITING_MODE_PAGE_OBJECT
constant for additional content editing mode "pageobject"
showPage()
display content of page
static isAdditionalQuestionContentEditingModePageObjectEnabled()
returns the fact wether content editing with ilias page editor is enabled for questions or not
& _getAvailableQuestionpools($use_object_id=FALSE, $equal_points=FALSE, $could_be_offline=FALSE, $showPath=FALSE, $with_questioncount=FALSE, $permission="read", $usr_id="")
Returns the available question pools for the active user.
static getQuestionTypeByTypeId($type_id)
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
getPageObject()
Get Page Object.
setOutputMode($a_mode=IL_PAGE_PRESENTATION)
Set Output Mode.
getEnableEditing()
Get Enable Editing.
This class represents an option in a radio group.
@ilCtrl_Calls ilTestExpressPageObjectGUI: assMultipleChoiceGUI, assClozeTestGUI, assMatchingQuestionG...
addPageOfQuestions($type='')
__construct($a_id=0, $a_old_nr=0)
Constructor.
redirectToQuestionPoolSelectionPage($questionType, $qid, $prev_qid)
& executeCommand()
execute command
redirectToQuestionEditPage($questionType, $qid, $prev_qid)
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
if(!is_array($argv)) $options