本文整理汇总了PHP中ilObjTest::participantDataExist方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjTest::participantDataExist方法的具体用法?PHP ilObjTest::participantDataExist怎么用?PHP ilObjTest::participantDataExist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilObjTest
的用法示例。
在下文中一共展示了ilObjTest::participantDataExist方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build
public function build()
{
$this->setFormAction($this->ctrl->getFormAction($this->questionSetConfigGUI));
$this->setTitle($this->lng->txt('tst_rnd_quest_set_cfg_general_form'));
$this->setId('tstRndQuestSetCfgGeneralForm');
$this->addCommandButton(ilTestRandomQuestionSetConfigGUI::CMD_SAVE_GENERAL_CONFIG_FORM, $this->lng->txt('save'));
// Require Pools with Homogeneous Scored Questions
$requirePoolsQuestionsHomoScored = new ilCheckboxInputGUI($this->lng->txt('tst_inp_all_quest_points_equal_per_pool'), 'quest_points_equal_per_pool');
$requirePoolsQuestionsHomoScored->setInfo($this->lng->txt('tst_inp_all_quest_points_equal_per_pool_desc'));
$requirePoolsQuestionsHomoScored->setChecked($this->questionSetConfig->arePoolsWithHomogeneousScoredQuestionsRequired());
$this->addItem($requirePoolsQuestionsHomoScored);
// question amount config mode (per test / per pool)
$questionAmountConfigMode = new ilRadioGroupInputGUI($this->lng->txt('tst_inp_quest_amount_cfg_mode'), 'quest_amount_cfg_mode');
$questionAmountConfigMode->setValue($this->fetchValidQuestionAmountConfigModeWithFallbackModePerTest($this->questionSetConfig));
$questionAmountConfigModePerTest = new ilRadioOption($this->lng->txt('tst_inp_quest_amount_cfg_mode_test'), ilTestRandomQuestionSetConfig::QUESTION_AMOUNT_CONFIG_MODE_PER_TEST);
$questionAmountConfigMode->addOption($questionAmountConfigModePerTest);
$questionAmountConfigModePerPool = new ilRadioOption($this->lng->txt('tst_inp_quest_amount_cfg_mode_pool'), ilTestRandomQuestionSetConfig::QUESTION_AMOUNT_CONFIG_MODE_PER_POOL);
$questionAmountConfigMode->addOption($questionAmountConfigModePerPool);
$questionAmountConfigMode->setRequired(true);
$this->addItem($questionAmountConfigMode);
// question amount per test
$questionAmountPerTest = new ilNumberInputGUI($this->lng->txt('tst_inp_quest_amount_per_test'), 'quest_amount_per_test');
$questionAmountPerTest->setRequired(true);
$questionAmountPerTest->setMinValue(0);
$questionAmountPerTest->allowDecimals(false);
$questionAmountPerTest->setMinvalueShouldBeGreater(true);
$questionAmountPerTest->setSize(4);
$questionAmountPerTest->setValue($this->questionSetConfig->getQuestionAmountPerTest());
$questionAmountConfigModePerTest->addSubItem($questionAmountPerTest);
if ($this->testOBJ->participantDataExist()) {
$requirePoolsQuestionsHomoScored->setDisabled(true);
$questionAmountConfigMode->setDisabled(true);
$questionAmountPerTest->setDisabled(true);
}
}
示例2: handleConfigurationStateMessages
private function handleConfigurationStateMessages($currentRequestCmd)
{
if (!$this->questionSetConfig->isQuestionAmountConfigComplete()) {
$infoMessage = $this->lng->txt('tst_msg_rand_quest_set_incomplete_quest_amount_cfg');
if ($this->isQuestionAmountConfigPerTestHintRequired($currentRequestCmd)) {
$infoMessage .= '<br />' . sprintf($this->lng->txt('tst_msg_rand_quest_set_change_quest_amount_here'), $this->buildGeneralConfigSubTabLink());
} elseif ($this->isQuestionAmountConfigPerPoolHintRequired($currentRequestCmd)) {
$infoMessage .= '<br />' . sprintf($this->lng->txt('tst_msg_rand_quest_set_change_quest_amount_here'), $this->buildQuestionSelectionSubTabLink());
}
} elseif (!$this->questionSetConfig->hasSourcePoolDefinitions()) {
$infoMessage = $this->lng->txt('tst_msg_rand_quest_set_no_src_pool_defs');
} elseif (!$this->questionSetConfig->isQuestionSetBuildable()) {
$infoMessage = $this->lng->txt('tst_msg_rand_quest_set_pass_not_buildable');
} else {
$syncDate = new ilDateTime($this->questionSetConfig->getLastQuestionSyncTimestamp(), IL_CAL_UNIX);
$infoMessage = sprintf($this->lng->txt('tst_msg_rand_quest_set_stage_pool_last_sync'), ilDatePresentation::formatDate($syncDate));
if (!$this->testOBJ->participantDataExist()) {
$infoMessage .= "<br />{$this->buildQuestionStageRebuildLink($currentRequestCmd)}";
}
}
if ($this->isNoAvailableQuestionPoolsHintRequired($currentRequestCmd)) {
$infoMessage .= '<br />' . $this->lng->txt('tst_msg_rand_quest_set_no_pools_available');
}
ilUtil::sendInfo($infoMessage);
}
示例3: buildForm
/**
* builds the question set config form and initialises the fields
* with the config currently saved in database
*
* @return ilPropertyFormGUI $form
*/
private function buildForm()
{
$this->questionSetConfig->loadFromDb($this->testOBJ->getTestId());
require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setId("tst_form_dynamic_question_set_config");
$form->setTitle($this->lng->txt('tst_form_dynamic_question_set_config'));
$form->setTableWidth("100%");
$hiddenInputTaxSelectOptAsyncUrl = new ilHiddenInputGUI('taxSelectOptAsyncUrl');
$hiddenInputTaxSelectOptAsyncUrl->setValue($this->ctrl->getLinkTarget($this, self::CMD_GET_TAXONOMY_OPTIONS_ASYNC, '', true));
$form->addItem($hiddenInputTaxSelectOptAsyncUrl);
if ($this->testOBJ->participantDataExist()) {
$pool = new ilNonEditableValueGUI($this->lng->txt('tst_input_dynamic_question_set_source_questionpool'), 'source_qpl_title');
$pool->setValue($this->questionSetConfig->getSourceQuestionPoolSummaryString($this->lng, $this->tree));
$pool->setDisabled(true);
$form->addItem($pool);
} else {
$poolInput = new ilSelectInputGUI($this->lng->txt('tst_input_dynamic_question_set_source_questionpool'), 'source_qpl_id');
$poolInput->setOptions($this->buildQuestionPoolSelectInputOptionArray($this->testOBJ->getAvailableQuestionpools(true, false, false, true, true)));
$poolInput->setValue($this->questionSetConfig->getSourceQuestionPoolId());
$poolInput->setRequired(true);
$form->addItem($poolInput);
}
$questionOderingInput = new ilRadioGroupInputGUI($this->lng->txt('tst_input_dynamic_question_set_question_ordering'), 'question_ordering');
$questionOderingInput->setValue($this->questionSetConfig->getOrderingTaxonomyId() ? self::QUESTION_ORDERING_TYPE_TAXONOMY : self::QUESTION_ORDERING_TYPE_UPDATE_DATE);
$optionOrderByDate = new ilRadioOption($this->lng->txt('tst_input_dynamic_question_set_question_ordering_by_date'), self::QUESTION_ORDERING_TYPE_UPDATE_DATE, $this->lng->txt('tst_inp_dyn_quest_set_quest_ordering_by_date_desc'));
$questionOderingInput->addOption($optionOrderByDate);
$optionOrderByTax = new ilRadioOption($this->lng->txt('tst_input_dynamic_question_set_question_ordering_by_tax'), self::QUESTION_ORDERING_TYPE_TAXONOMY, $this->lng->txt('tst_inp_dyn_quest_set_quest_ordering_by_tax_desc'));
$orderTaxInput = new ilSelectInputGUI($this->lng->txt('tst_input_dynamic_question_set_ordering_tax'), 'ordering_tax');
$orderTaxInput->setInfo($this->lng->txt('tst_input_dynamic_question_set_ordering_tax_description'));
$orderTaxInput->setValue($this->questionSetConfig->getOrderingTaxonomyId());
$orderTaxInput->setRequired(true);
$orderTaxInput->setOptions($this->buildTaxonomySelectInputOptionArray($this->questionSetConfig->getSourceQuestionPoolId()));
$optionOrderByTax->addSubItem($orderTaxInput);
$questionOderingInput->addOption($optionOrderByTax);
$form->addItem($questionOderingInput);
$taxFilterInput = new ilCheckboxInputGUI($this->lng->txt('tst_input_dynamic_question_set_taxonomie_filter_enabled'), 'tax_filter_enabled');
$taxFilterInput->setValue(1);
$taxFilterInput->setChecked($this->questionSetConfig->isTaxonomyFilterEnabled());
$form->addItem($taxFilterInput);
$answStatusFilterInput = new ilCheckboxInputGUI($this->lng->txt('tst_input_dyn_quest_set_answer_status_filter_enabled'), 'answer_status_filter_enabled');
$answStatusFilterInput->setValue(1);
$answStatusFilterInput->setChecked($this->questionSetConfig->isAnswerStatusFilterEnabled());
$form->addItem($answStatusFilterInput);
$previousQuestionsListInput = new ilCheckboxInputGUI($this->lng->txt('tst_input_dyn_quest_set_prev_quest_list_enabled'), 'prev_quest_list_enabled');
$previousQuestionsListInput->setValue(1);
$previousQuestionsListInput->setChecked($this->questionSetConfig->isPreviousQuestionsListEnabled());
$form->addItem($previousQuestionsListInput);
if ($this->testOBJ->participantDataExist()) {
$questionOderingInput->setDisabled(true);
$taxFilterInput->setDisabled(true);
$answStatusFilterInput->setDisabled(true);
$previousQuestionsListInput->setDisabled(true);
} else {
$form->addCommandButton(self::CMD_SAVE_FORM, $this->lng->txt('save'));
}
return $form;
}
示例4: isAssignmentEditingRequired
private function isAssignmentEditingRequired()
{
if (!$this->testOBJ->isFixedTest()) {
return false;
}
if ($this->testOBJ->participantDataExist()) {
return false;
}
return true;
}
示例5: isScoreRecalculationRequired
private function isScoreRecalculationRequired(ilPropertyFormGUI $form)
{
if (!$this->testOBJ->participantDataExist()) {
return false;
}
if (!$this->areScoringSettingsWritable()) {
return false;
}
if (!$this->hasScoringSettingsChanged($form)) {
return false;
}
return true;
}
示例6: buildSourcePoolDefinitionListTableGUI
private function buildSourcePoolDefinitionListTableGUI()
{
require_once 'Modules/Test/classes/tables/class.ilTestRandomQuestionSetSourcePoolDefinitionListTableGUI.php';
$table = new ilTestRandomQuestionSetSourcePoolDefinitionListTableGUI($this->ctrl, $this->lng, $this, self::CMD_SHOW_SRC_POOL_DEF_LIST);
if (!$this->testOBJ->participantDataExist()) {
$table->setDefinitionEditModeEnabled(true);
}
$table->setQuestionAmountColumnEnabled($this->questionSetConfig->isQuestionAmountConfigurationModePerPool());
require_once 'Modules/Test/classes/class.ilTestTaxonomyFilterLabelTranslater.php';
$translater = new ilTestTaxonomyFilterLabelTranslater($this->db);
$translater->loadLabels($this->sourcePoolDefinitionList);
$table->setTaxonomyFilterLabelTranslater($translater);
$table->build();
return $table;
}
示例7: isValidRequestOnBrokenQuestionSetDepencies
public function isValidRequestOnBrokenQuestionSetDepencies($nextClass, $cmd)
{
//vd($nextClass, $cmd);
if (!$this->object->participantDataExist()) {
return true;
}
switch ($nextClass) {
case 'ilobjtestdynamicquestionsetconfiggui':
case 'ilmdeditorgui':
case 'ilpermissiongui':
return true;
case 'ilobjtestgui':
case '':
$cmds = array('infoScreen', 'participants', 'npSetFilter', 'npResetFilter', 'deleteAllUserResults', 'confirmDeleteAllUserResults', 'deleteSingleUserResults', 'confirmDeleteSelectedUserData', 'cancelDeleteSelectedUserData');
if (in_array($cmd, $cmds)) {
return true;
}
break;
}
return false;
}
示例8: buildForm
private function buildForm()
{
require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->addCommandButton(self::CMD_SAVE_FORM, $this->lng->txt("save"));
$form->setTableWidth("100%");
$form->setId("test_properties");
if (!$this->settingsTemplate || $this->formShowGeneralSection($this->settingsTemplate->getSettings())) {
// general properties
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("tst_general_properties"));
$form->addItem($header);
}
// title & description (meta data)
include_once 'Services/MetaData/classes/class.ilMD.php';
$md_obj = new ilMD($this->testOBJ->getId(), 0, "tst");
$md_section = $md_obj->getGeneral();
$title = new ilTextInputGUI($this->lng->txt("title"), "title");
$title->setRequired(true);
$title->setValue($md_section->getTitle());
$form->addItem($title);
$ids = $md_section->getDescriptionIds();
if ($ids) {
$desc_obj = $md_section->getDescription(array_pop($ids));
$desc = new ilTextAreaInputGUI($this->lng->txt("description"), "description");
$desc->setCols(50);
$desc->setRows(4);
$desc->setValue($desc_obj->getDescription());
$form->addItem($desc);
}
// anonymity
$anonymity = new ilRadioGroupInputGUI($this->lng->txt('tst_anonymity'), 'anonymity');
if ($this->testOBJ->participantDataExist()) {
$anonymity->setDisabled(true);
}
$rb = new ilRadioOption($this->lng->txt('tst_anonymity_no_anonymization'), 0);
$anonymity->addOption($rb);
$rb = new ilRadioOption($this->lng->txt('tst_anonymity_anonymous_test'), 1);
$anonymity->addOption($rb);
$anonymity->setValue((int) $this->testOBJ->getAnonymity());
$form->addItem($anonymity);
// test mode (question set type)
$questSetType = new ilRadioGroupInputGUI($this->lng->txt("tst_question_set_type"), 'question_set_type');
$questSetTypeFixed = new ilRadioOption($this->lng->txt("tst_question_set_type_fixed"), ilObjTest::QUESTION_SET_TYPE_FIXED, $this->lng->txt("tst_question_set_type_fixed_desc"));
$questSetType->addOption($questSetTypeFixed);
$questSetTypeRandom = new ilRadioOption($this->lng->txt("tst_question_set_type_random"), ilObjTest::QUESTION_SET_TYPE_RANDOM, $this->lng->txt("tst_question_set_type_random_desc"));
$questSetType->addOption($questSetTypeRandom);
$questSetTypeContinues = new ilRadioOption($this->lng->txt("tst_question_set_type_dynamic"), ilObjTest::QUESTION_SET_TYPE_DYNAMIC, $this->lng->txt("tst_question_set_type_dynamic_desc"));
$questSetType->addOption($questSetTypeContinues);
$questSetType->setValue($this->testOBJ->getQuestionSetType());
if ($this->testOBJ->participantDataExist()) {
$questSetType->setDisabled(true);
}
$form->addItem($questSetType);
// pool usage
$pool_usage = new ilCheckboxInputGUI($this->lng->txt("test_question_pool_usage"), "use_pool");
$pool_usage->setValue(1);
$pool_usage->setChecked($this->testOBJ->getPoolUsage());
$form->addItem($pool_usage);
// enable_archiving
$enable_archiving = new ilCheckboxInputGUI($this->lng->txt('test_enable_archiving'), 'enable_archiving');
$enable_archiving->setValue(1);
$enable_archiving->setChecked($this->testOBJ->getEnableArchiving());
$form->addItem($enable_archiving);
// activation/availability (no template support yet)
include_once "Services/Object/classes/class.ilObjectActivation.php";
$this->lng->loadLanguageModule('rep');
$section = new ilFormSectionHeaderGUI();
$section->setTitle($this->lng->txt('rep_activation_availability'));
$form->addItem($section);
// additional info only with multiple references
$act_obj_info = $act_ref_info = "";
if (sizeof(ilObject::_getAllReferences($this->testOBJ->getId())) > 1) {
$act_obj_info = ' ' . $this->lng->txt('rep_activation_online_object_info');
$act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
}
$online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'online');
$online->setChecked($this->testOBJ->isOnline());
$online->setInfo($this->lng->txt('tst_activation_online_info') . $act_obj_info);
$form->addItem($online);
$act_type = new ilRadioGroupInputGUI($this->lng->txt('rep_activation_access'), 'activation_type');
$act_type->setInfo($act_ref_info);
$act_type->setValue($this->testOBJ->isActivationLimited() ? ilObjectActivation::TIMINGS_ACTIVATION : ilObjectActivation::TIMINGS_DEACTIVATED);
$opt = new ilRadioOption($this->lng->txt('rep_visibility_limitless'), ilObjectActivation::TIMINGS_DEACTIVATED);
$opt->setInfo($this->lng->txt('tst_availability_limitless_info'));
$act_type->addOption($opt);
$opt = new ilRadioOption($this->lng->txt('rep_visibility_until'), ilObjectActivation::TIMINGS_ACTIVATION);
$opt->setInfo($this->lng->txt('tst_availability_until_info'));
$this->tpl->addJavaScript('./Services/Form/js/date_duration.js');
include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
$dur = new ilDateDurationInputGUI("", "access_period");
$dur->setShowTime(true);
$date = $this->testOBJ->getActivationStartingTime();
$dur->setStart(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
$dur->setStartText($this->lng->txt('rep_activation_limited_start'));
$date = $this->testOBJ->getActivationEndingTime();
$dur->setEnd(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
$dur->setEndText($this->lng->txt('rep_activation_limited_end'));
$opt->addSubItem($dur);
//.........这里部分代码省略.........