本文整理汇总了PHP中ilObjTest::getKioskMode方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjTest::getKioskMode方法的具体用法?PHP ilObjTest::getKioskMode怎么用?PHP ilObjTest::getKioskMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilObjTest
的用法示例。
在下文中一共展示了ilObjTest::getKioskMode方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getContentBlockName
/**
* Returns the name of the current content block (depends on the kiosk mode setting)
*
* @return string The name of the content block
* @access public
*/
private function getContentBlockName()
{
if ($this->test->getKioskMode()) {
$this->tpl->setBodyClass("kiosk");
$this->tpl->setAddFooter(FALSE);
return "CONTENT";
} else {
return "ADM_CONTENT";
}
}
示例2: buildForm
//.........这里部分代码省略.........
$highscore_hints->setValue(1);
$highscore_hints->setChecked($this->testOBJ->getHighscoreHints());
$highscore_hints->setInfo($this->lng->txt("tst_highscore_hints_description"));
$highscore->addSubItem($highscore_hints);
$highscore_wtime = new ilCheckboxInputGUI($this->lng->txt("tst_highscore_wtime"), "highscore_wtime");
$highscore_wtime->setValue(1);
$highscore_wtime->setChecked($this->testOBJ->getHighscoreWTime());
$highscore_wtime->setInfo($this->lng->txt("tst_highscore_wtime_description"));
$highscore->addSubItem($highscore_wtime);
$highscore_own_table = new ilCheckboxInputGUI($this->lng->txt("tst_highscore_own_table"), "highscore_own_table");
$highscore_own_table->setValue(1);
$highscore_own_table->setChecked($this->testOBJ->getHighscoreOwnTable());
$highscore_own_table->setInfo($this->lng->txt("tst_highscore_own_table_description"));
$highscore->addSubItem($highscore_own_table);
$highscore_top_table = new ilCheckboxInputGUI($this->lng->txt("tst_highscore_top_table"), "highscore_top_table");
$highscore_top_table->setValue(1);
$highscore_top_table->setChecked($this->testOBJ->getHighscoreTopTable());
$highscore_top_table->setInfo($this->lng->txt("tst_highscore_top_table_description"));
$highscore->addSubItem($highscore_top_table);
$highscore_top_num = new ilTextInputGUI($this->lng->txt("tst_highscore_top_num"), "highscore_top_num");
$highscore_top_num->setSize(4);
$highscore_top_num->setSuffix($this->lng->txt("tst_highscore_top_num_unit"));
$highscore_top_num->setValue($this->testOBJ->getHighscoreTopNum());
$highscore_top_num->setInfo($this->lng->txt("tst_highscore_top_num_description"));
$highscore->addSubItem($highscore_top_num);
if (!$this->settingsTemplate || $this->formShowTestExecutionSection($this->settingsTemplate->getSettings())) {
$testExecution = new ilFormSectionHeaderGUI();
$testExecution->setTitle($this->lng->txt("tst_test_execution"));
$form->addItem($testExecution);
}
// kiosk mode
$kiosk = new ilCheckboxInputGUI($this->lng->txt("kiosk"), "kiosk");
$kiosk->setValue(1);
$kiosk->setChecked($this->testOBJ->getKioskMode());
$kiosk->setInfo($this->lng->txt("kiosk_description"));
// kiosk mode options
$kiosktitle = new ilCheckboxGroupInputGUI($this->lng->txt("kiosk_options"), "kiosk_options");
$kiosktitle->addOption(new ilCheckboxOption($this->lng->txt("kiosk_show_title"), 'kiosk_title', ''));
$kiosktitle->addOption(new ilCheckboxOption($this->lng->txt("kiosk_show_participant"), 'kiosk_participant', ''));
$kiosktitle->addOption(new ilCheckboxOption($this->lng->txt('examid_in_kiosk'), 'examid_in_kiosk'));
$values = array();
if ($this->testOBJ->getShowKioskModeTitle()) {
array_push($values, 'kiosk_title');
}
if ($this->testOBJ->getShowKioskModeParticipant()) {
array_push($values, 'kiosk_participant');
}
if ($this->testOBJ->getExamidInKiosk()) {
array_push($values, 'examid_in_kiosk');
}
$kiosktitle->setValue($values);
$kiosktitle->setInfo($this->lng->txt("kiosk_options_desc"));
$kiosk->addSubItem($kiosktitle);
$form->addItem($kiosk);
$redirection_mode = $this->testOBJ->getRedirectionMode();
$rm_enabled = new ilCheckboxInputGUI($this->lng->txt('redirect_after_finishing_tst'), 'redirection_enabled');
$rm_enabled->setChecked($redirection_mode == '0' ? false : true);
$radio_rm = new ilRadioGroupInputGUI($this->lng->txt('redirect_after_finishing_tst'), 'redirection_mode');
$always = new ilRadioOption($this->lng->txt('tst_results_access_always'), REDIRECT_ALWAYS);
$radio_rm->addOption($always);
$kiosk = new ilRadioOption($this->lng->txt('redirect_in_kiosk_mode'), REDIRECT_KIOSK);
$radio_rm->addOption($kiosk);
$radio_rm->setValue(in_array($redirection_mode, array(REDIRECT_ALWAYS, REDIRECT_KIOSK)) ? $redirection_mode : REDIRECT_ALWAYS);
$rm_enabled->addSubItem($radio_rm);
$redirection_url = new ilTextInputGUI($this->lng->txt('redirection_url'), 'redirection_url');
$redirection_url->setValue((string) $this->testOBJ->getRedirectionUrl());
示例3: executeCommand
/**
* execute command
*/
function executeCommand()
{
global $ilAccess, $ilNavigationHistory, $ilCtrl, $ilErr, $tpl, $lng, $ilTabs, $ilPluginAdmin, $ilDB, $tree, $ilias, $ilUser;
if (!$ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
$ilias->raiseError($this->lng->txt("permission_denied"), $ilias->error_obj->MESSAGE);
}
$cmd = $this->ctrl->getCmd("infoScreen");
$cmdsDisabledDueToOfflineStatus = array('resumePlayer', 'resumePlayer', 'outUserResultsOverview', 'outUserListOfAnswerPasses');
if (!$this->getCreationMode() && !$this->object->isOnline() && in_array($cmd, $cmdsDisabledDueToOfflineStatus)) {
$cmd = 'infoScreen';
}
$next_class = $this->ctrl->getNextClass($this);
$this->ctrl->setReturn($this, "infoScreen");
if (method_exists($this->object, "getTestStyleLocation")) {
$this->tpl->addCss($this->object->getTestStyleLocation("output"), "screen");
}
// add entry to navigation history
if (!$this->getCreationMode() && $ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
$ilNavigationHistory->addItem($_GET["ref_id"], "ilias.php?baseClass=ilObjTestGUI&cmd=infoScreen&ref_id=" . $_GET["ref_id"], "tst");
}
if (!$this->getCreationMode()) {
if (IS_PAYMENT_ENABLED) {
require_once 'Services/Payment/classes/class.ilPaymentObject.php';
if (ilPaymentObject::_requiresPurchaseToAccess($this->object->getRefId(), $type = isset($_GET['purchasetype']) ? $_GET['purchasetype'] : NULL)) {
$this->setLocator();
$this->tpl->getStandardTemplate();
include_once 'Services/Payment/classes/class.ilShopPurchaseGUI.php';
$pp = new ilShopPurchaseGUI((int) $_GET['ref_id']);
$ret = $this->ctrl->forwardCommand($pp);
$this->tpl->show();
exit;
}
}
}
// elba hack for storing question id for inserting new question after
if ($_REQUEST['prev_qid']) {
global $___prev_question_id;
$___prev_question_id = $_REQUEST['prev_qid'];
$this->ctrl->setParameter($this, 'prev_qid', $_REQUEST['prev_qid']);
}
if (!$this->getCreationMode() && $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken()) {
if (!$this->isValidRequestOnBrokenQuestionSetDepencies($next_class, $cmd)) {
$this->ctrl->redirectByClass('ilObjTestGUI', 'infoScreen');
}
}
$this->determineObjectiveOrientedContainer();
switch ($next_class) {
case 'iltestexportgui':
if (!$ilAccess->checkAccess('write', '', $this->ref_id)) {
$ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->WARNING);
}
$this->prepareOutput();
$this->addHeaderAction();
require_once 'Modules/Test/classes/class.ilTestExportGUI.php';
$ilCtrl->forwardCommand(new ilTestExportGUI($this));
break;
case "ilinfoscreengui":
$this->prepareOutput();
$this->addHeaderAction();
$this->infoScreen();
// forwards command
break;
case 'ilmdeditorgui':
if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
$ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->WARNING);
}
$this->prepareOutput();
$this->addHeaderAction();
require_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
$md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
$md_gui->addObserver($this->object, 'MDUpdateListener', 'General');
$this->ctrl->forwardCommand($md_gui);
break;
case "iltestplayerfixedquestionsetgui":
require_once "./Modules/Test/classes/class.ilTestPlayerFixedQuestionSetGUI.php";
if (!$this->object->getKioskMode()) {
$this->prepareOutput();
}
$gui = new ilTestPlayerFixedQuestionSetGUI($this->object);
$gui->setObjectiveOrientedContainer($this->getObjectiveOrientedContainer());
$this->ctrl->forwardCommand($gui);
break;
case "iltestplayerrandomquestionsetgui":
require_once "./Modules/Test/classes/class.ilTestPlayerRandomQuestionSetGUI.php";
if (!$this->object->getKioskMode()) {
$this->prepareOutput();
}
$gui = new ilTestPlayerRandomQuestionSetGUI($this->object);
$gui->setObjectiveOrientedContainer($this->getObjectiveOrientedContainer());
$this->ctrl->forwardCommand($gui);
break;
case "iltestplayerdynamicquestionsetgui":
require_once "./Modules/Test/classes/class.ilTestPlayerDynamicQuestionSetGUI.php";
if (!$this->object->getKioskMode()) {
$this->prepareOutput();
}
$gui = new ilTestPlayerDynamicQuestionSetGUI($this->object);
//.........这里部分代码省略.........
示例4: propertiesObject
//.........这里部分代码省略.........
$highscore_hints->setChecked($this->object->getHighscoreHints());
$highscore_hints->setInfo($this->lng->txt("tst_highscore_hints_description"));
$highscore->addSubItem($highscore_hints);
$highscore_wtime = new ilCheckboxInputGUI($this->lng->txt("tst_highscore_wtime"), "highscore_wtime");
$highscore_wtime->setValue(1);
$highscore_wtime->setChecked($this->object->getHighscoreWTime());
$highscore_wtime->setInfo($this->lng->txt("tst_highscore_wtime_description"));
$highscore->addSubItem($highscore_wtime);
$highscore_own_table = new ilCheckboxInputGUI($this->lng->txt("tst_highscore_own_table"), "highscore_own_table");
$highscore_own_table->setValue(1);
$highscore_own_table->setChecked($this->object->getHighscoreOwnTable());
$highscore_own_table->setInfo($this->lng->txt("tst_highscore_own_table_description"));
$highscore->addSubItem($highscore_own_table);
$highscore_top_table = new ilCheckboxInputGUI($this->lng->txt("tst_highscore_top_table"), "highscore_top_table");
$highscore_top_table->setValue(1);
$highscore_top_table->setChecked($this->object->getHighscoreTopTable());
$highscore_top_table->setInfo($this->lng->txt("tst_highscore_top_table_description"));
$highscore->addSubItem($highscore_top_table);
$highscore_top_num = new ilTextInputGUI($this->lng->txt("tst_highscore_top_num"), "highscore_top_num");
$highscore_top_num->setSize(4);
$highscore_top_num->setSuffix($this->lng->txt("tst_highscore_top_num_unit"));
$highscore_top_num->setValue($this->object->getHighscoreTopNum());
$highscore_top_table->setInfo($this->lng->txt("tst_highscore_top_num_description"));
$highscore->addSubItem($highscore_top_num);
if (!$template || $template && $this->formShowKioskSection($template_settings)) {
// kiosk mode properties
$kioskheader = new ilFormSectionHeaderGUI();
$kioskheader->setTitle($this->lng->txt("kiosk"));
$form->addItem($kioskheader);
}
// kiosk mode
$kiosk = new ilCheckboxInputGUI($this->lng->txt("kiosk"), "kiosk");
$kiosk->setValue(1);
$kiosk->setChecked($this->object->getKioskMode());
$kiosk->setInfo($this->lng->txt("kiosk_description"));
// kiosk mode options
$kiosktitle = new ilCheckboxGroupInputGUI($this->lng->txt("kiosk_options"), "kiosk_options");
$kiosktitle->addOption(new ilCheckboxOption($this->lng->txt("kiosk_show_title"), 'kiosk_title', ''));
$kiosktitle->addOption(new ilCheckboxOption($this->lng->txt("kiosk_show_participant"), 'kiosk_participant', ''));
$values = array();
if ($this->object->getShowKioskModeTitle()) {
array_push($values, 'kiosk_title');
}
if ($this->object->getShowKioskModeParticipant()) {
array_push($values, 'kiosk_participant');
}
$kiosktitle->setValue($values);
$kiosktitle->setInfo($this->lng->txt("kiosk_options_desc"));
$kiosk->addSubItem($kiosktitle);
$form->addItem($kiosk);
if (!$template || $template && $this->formShowParticipantSection($template_settings)) {
// participants properties
$restrictions = new ilFormSectionHeaderGUI();
$restrictions->setTitle($this->lng->txt("tst_max_allowed_users"));
$form->addItem($restrictions);
}
$fixedparticipants = new ilCheckboxInputGUI($this->lng->txt('participants_invitation'), "fixedparticipants");
$fixedparticipants->setValue(1);
$fixedparticipants->setChecked($this->object->getFixedParticipants());
$fixedparticipants->setOptionTitle($this->lng->txt("tst_allow_fixed_participants"));
$fixedparticipants->setInfo($this->lng->txt("participants_invitation_description"));
$invited_users = $this->object->getInvitedUsers();
if ($total && count($invited_users) == 0) {
$fixedparticipants->setDisabled(true);
}
$form->addItem($fixedparticipants);