本文整理汇总了PHP中ilDateTimeInputGUI::setShowDate方法的典型用法代码示例。如果您正苦于以下问题:PHP ilDateTimeInputGUI::setShowDate方法的具体用法?PHP ilDateTimeInputGUI::setShowDate怎么用?PHP ilDateTimeInputGUI::setShowDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilDateTimeInputGUI
的用法示例。
在下文中一共展示了ilDateTimeInputGUI::setShowDate方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildForm
//.........这里部分代码省略.........
}
// max. processing time
$processingtime = new ilDurationInputGUI('', 'processing_time');
$ptime = $this->testOBJ->getProcessingTimeAsArray();
$processingtime->setHours($ptime['hh']);
$processingtime->setMinutes($ptime['mm']);
$processingtime->setSeconds($ptime['ss']);
$processingtime->setShowMonths(false);
$processingtime->setShowDays(false);
$processingtime->setShowHours(true);
$processingtime->setShowMinutes(true);
$processingtime->setShowSeconds(true);
$processingtime->setInfo($this->lng->txt("tst_processing_time_desc"));
$processing->addSubItem($processingtime);
// reset max. processing time
$resetprocessing = new ilCheckboxInputGUI('', "chb_reset_processing_time");
$resetprocessing->setValue(1);
$resetprocessing->setOptionTitle($this->lng->txt("tst_reset_processing_time"));
$resetprocessing->setChecked($this->testOBJ->getResetProcessingTime());
$resetprocessing->setInfo($this->lng->txt("tst_reset_processing_time_desc"));
$processing->addSubItem($resetprocessing);
$form->addItem($processing);
// enable starting time
$enablestartingtime = new ilCheckboxInputGUI($this->lng->txt("tst_starting_time"), "chb_starting_time");
$enablestartingtime->setValue(1);
//$enablestartingtime->setOptionTitle($this->lng->txt("enabled"));
if ($this->settingsTemplate && $this->getTemplateSettingValue('chb_starting_time')) {
$enablestartingtime->setChecked(true);
} else {
$enablestartingtime->setChecked(strlen($this->testOBJ->getStartingTime()));
}
// starting time
$startingtime = new ilDateTimeInputGUI('', 'starting_time');
$startingtime->setShowDate(true);
$startingtime->setShowTime(true);
if (strlen($this->testOBJ->getStartingTime())) {
$startingtime->setDate(new ilDateTime($this->testOBJ->getStartingTime(), IL_CAL_TIMESTAMP));
} else {
$startingtime->setDate(new ilDateTime(time(), IL_CAL_UNIX));
}
$enablestartingtime->addSubItem($startingtime);
$form->addItem($enablestartingtime);
if ($this->testOBJ->participantDataExist()) {
$enablestartingtime->setDisabled(true);
$startingtime->setDisabled(true);
}
// enable ending time
$enableendingtime = new ilCheckboxInputGUI($this->lng->txt("tst_ending_time"), "chb_ending_time");
$enableendingtime->setValue(1);
//$enableendingtime->setOptionTitle($this->lng->txt("enabled"));
if ($this->settingsTemplate && $this->getTemplateSettingValue('chb_ending_time')) {
$enableendingtime->setChecked(true);
} else {
$enableendingtime->setChecked(strlen($this->testOBJ->getEndingTime()));
}
// ending time
$endingtime = new ilDateTimeInputGUI('', 'ending_time');
$endingtime->setShowDate(true);
$endingtime->setShowTime(true);
if (strlen($this->testOBJ->getEndingTime())) {
$endingtime->setDate(new ilDateTime($this->testOBJ->getEndingTime(), IL_CAL_TIMESTAMP));
} else {
$endingtime->setDate(new ilDateTime(time(), IL_CAL_UNIX));
}
$enableendingtime->addSubItem($endingtime);
$form->addItem($enableendingtime);
示例2: logsObject
/**
* display assessment folder logs form
*/
public function logsObject($p_from = null, $p_until = null, $p_test = null)
{
global $ilTabs;
$ilTabs->activateTab('logs');
$template = new ilTemplate("tpl.assessment_logs.html", TRUE, TRUE, "Modules/Test");
include_once "./Modules/Test/classes/class.ilObjTest.php";
include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
$available_tests =& ilObjTest::_getAvailableTests(1);
if (count($available_tests) == 0) {
ilUtil::sendInfo($this->lng->txt('assessment_log_no_data'));
return;
}
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTableWidth("100%");
$form->setId("logs");
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("assessment_log"));
$form->addItem($header);
// from
$from = new ilDateTimeInputGUI($this->lng->txt('cal_from'), "log_from");
$from->setShowDate(true);
$from->setShowTime(true);
$now = getdate();
$fromdate = $p_from ? $p_from : ($_GET['log_from'] ? $_GET['log_from'] : mktime(0, 0, 0, 1, 1, $now['year']));
$from->setDate(new ilDateTime($fromdate, IL_CAL_UNIX));
$form->addItem($from);
// until
$until = new ilDateTimeInputGUI($this->lng->txt('cal_until'), "log_until");
$until->setShowDate(true);
$until->setShowTime(true);
$untildate = $p_until ? $p_until : ($_GET['log_until'] ? $_GET['log_until'] : time());
$until->setDate(new ilDateTime($untildate, IL_CAL_UNIX));
$form->addItem($until);
// tests
$fortest = new ilSelectInputGUI($this->lng->txt('assessment_log_for_test'), "sel_test");
$options = array();
foreach ($available_tests as $key => $value) {
$options[$key] = ilUtil::prepareFormOutput($value) . " [" . $this->object->getNrOfLogEntries($key) . " " . $this->lng->txt("assessment_log_log_entries") . "]";
}
$fortest->setOptions($options);
$p_test = $p_test ? $p_test : $_GET['sel_test'];
if ($p_test) {
$fortest->setValue($p_test);
}
$form->addItem($fortest);
$this->ctrl->setParameter($this, 'sel_test', $p_test);
$this->ctrl->setParameter($this, 'log_until', $untildate);
$this->ctrl->setParameter($this, 'log_from', $fromdate);
$form->addCommandButton("showLog", $this->lng->txt("show"));
$form->addCommandButton("exportLog", $this->lng->txt("export"));
$template->setVariable("FORM", $form->getHTML());
if ($p_test) {
include_once "./Modules/Test/classes/tables/class.ilAssessmentFolderLogTableGUI.php";
$table_gui = new ilAssessmentFolderLogTableGUI($this, 'logs');
$log_output =& $this->object->getLog($fromdate, $untildate, $p_test);
$table_gui->setData($log_output);
$template->setVariable('LOG', $table_gui->getHTML());
}
$this->tpl->setVariable("ADM_CONTENT", $template->get());
}
示例3: initPropertiesForm
//.........这里部分代码省略.........
$act_type = new ilRadioGroupInputGUI($this->lng->txt('rep_activation_access'), 'access_type');
$act_type->setInfo($act_ref_info);
$act_type->setValue($this->object->isActivationLimited() ? ilObjectActivation::TIMINGS_ACTIVATION : ilObjectActivation::TIMINGS_DEACTIVATED);
$opt = new ilRadioOption($this->lng->txt('rep_visibility_limitless'), ilObjectActivation::TIMINGS_DEACTIVATED);
$opt->setInfo($this->lng->txt('svy_availability_limitless_info'));
$act_type->addOption($opt);
$opt = new ilRadioOption($this->lng->txt('rep_visibility_until'), ilObjectActivation::TIMINGS_ACTIVATION);
$opt->setInfo($this->lng->txt('svy_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->object->getActivationStartDate();
$dur->setStart(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
$dur->setStartText($this->lng->txt('rep_activation_limited_start'));
$date = $this->object->getActivationEndDate();
$dur->setEnd(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
$dur->setEndText($this->lng->txt('rep_activation_limited_end'));
$opt->addSubItem($dur);
$visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'access_visiblity');
$visible->setInfo($this->lng->txt('svy_activation_limited_visibility_info'));
$visible->setChecked($this->object->getActivationVisibility());
$opt->addSubItem($visible);
$act_type->addOption($opt);
$form->addItem($act_type);
// enable start date
$start = $this->object->getStartDate();
$enablestartingtime = new ilCheckboxInputGUI($this->lng->txt("start_date"), "enabled_start_date");
$enablestartingtime->setValue(1);
// $enablestartingtime->setOptionTitle($this->lng->txt("enabled"));
$enablestartingtime->setChecked($start);
// start date
$startingtime = new ilDateTimeInputGUI('', 'start_date');
$startingtime->setShowDate(true);
$startingtime->setShowTime(true);
if ($start) {
$startingtime->setDate(new ilDate($start, IL_CAL_TIMESTAMP));
}
$enablestartingtime->addSubItem($startingtime);
$form->addItem($enablestartingtime);
// enable end date
$end = $this->object->getEndDate();
$enableendingtime = new ilCheckboxInputGUI($this->lng->txt("end_date"), "enabled_end_date");
$enableendingtime->setValue(1);
// $enableendingtime->setOptionTitle($this->lng->txt("enabled"));
$enableendingtime->setChecked($end);
// end date
$endingtime = new ilDateTimeInputGUI('', 'end_date');
$endingtime->setShowDate(true);
$endingtime->setShowTime(true);
if ($end) {
$endingtime->setDate(new ilDate($end, IL_CAL_TIMESTAMP));
}
$enableendingtime->addSubItem($endingtime);
$form->addItem($enableendingtime);
// presentation properties
$info = new ilFormSectionHeaderGUI();
$info->setTitle($this->lng->txt("svy_presentation_properties"));
$form->addItem($info);
// show question titles
$show_question_titles = new ilCheckboxInputGUI($this->lng->txt("svy_show_questiontitles"), "show_question_titles");
$show_question_titles->setValue(1);
$show_question_titles->setChecked($this->object->getShowQuestionTitles());
$form->addItem($show_question_titles);
// introduction
$intro = new ilTextAreaInputGUI($this->lng->txt("introduction"), "introduction");
示例4: propertiesObject
//.........这里部分代码省略.........
}
// max. processing time
$processingtime = new ilDurationInputGUI('', 'processing_time');
$ptime = $this->object->getProcessingTimeAsArray();
$processingtime->setHours($ptime['hh']);
$processingtime->setMinutes($ptime['mm']);
$processingtime->setSeconds($ptime['ss']);
$processingtime->setShowMonths(false);
$processingtime->setShowDays(false);
$processingtime->setShowHours(true);
$processingtime->setShowMinutes(true);
$processingtime->setShowSeconds(true);
$processingtime->setInfo($this->lng->txt("tst_processing_time_desc"));
$processing->addSubItem($processingtime);
// reset max. processing time
$resetprocessing = new ilCheckboxInputGUI('', "chb_reset_processing_time");
$resetprocessing->setValue(1);
$resetprocessing->setOptionTitle($this->lng->txt("tst_reset_processing_time"));
$resetprocessing->setChecked($this->object->getResetProcessingTime());
$resetprocessing->setInfo($this->lng->txt("tst_reset_processing_time_desc"));
$processing->addSubItem($resetprocessing);
$form->addItem($processing);
// enable starting time
$enablestartingtime = new ilCheckboxInputGUI($this->lng->txt("tst_starting_time"), "chb_starting_time");
$enablestartingtime->setValue(1);
//$enablestartingtime->setOptionTitle($this->lng->txt("enabled"));
if ($template_settings && $template_settings['chb_starting_time'] && $template_settings['chb_starting_time']['value']) {
$enablestartingtime->setChecked(true);
} else {
$enablestartingtime->setChecked(strlen($this->object->getStartingTime()));
}
// starting time
$startingtime = new ilDateTimeInputGUI('', 'starting_time');
$startingtime->setShowDate(true);
$startingtime->setShowTime(true);
if (strlen($this->object->getStartingTime())) {
$startingtime->setDate(new ilDateTime($this->object->getStartingTime(), IL_CAL_TIMESTAMP));
} else {
$startingtime->setDate(new ilDateTime(time(), IL_CAL_UNIX));
}
$enablestartingtime->addSubItem($startingtime);
if ($total) {
$enablestartingtime->setDisabled(true);
}
if ($total) {
$startingtime->setDisabled(true);
}
$form->addItem($enablestartingtime);
// enable ending time
$enableendingtime = new ilCheckboxInputGUI($this->lng->txt("tst_ending_time"), "chb_ending_time");
$enableendingtime->setValue(1);
//$enableendingtime->setOptionTitle($this->lng->txt("enabled"));
if ($template_settings && $template_settings['chb_ending_time'] && $template_settings['chb_ending_time']['value']) {
$enableendingtime->setChecked(true);
} else {
$enableendingtime->setChecked(strlen($this->object->getEndingTime()));
}
// ending time
$endingtime = new ilDateTimeInputGUI('', 'ending_time');
$endingtime->setShowDate(true);
$endingtime->setShowTime(true);
if (strlen($this->object->getEndingTime())) {
$endingtime->setDate(new ilDateTime($this->object->getEndingTime(), IL_CAL_TIMESTAMP));
} else {
$endingtime->setDate(new ilDateTime(time(), IL_CAL_UNIX));
}
示例5: scoringObject
//.........这里部分代码省略.........
$instant_feedback->addOption(new ilCheckboxOption($this->lng->txt("tst_instant_feedback_results"), 'instant_feedback_points', ''));
$instant_feedback->addOption(new ilCheckboxOption($this->lng->txt("tst_instant_feedback_solution"), 'instant_feedback_solution', ''));
$values = array();
if ($this->object->getSpecificAnswerFeedback()) {
array_push($values, 'instant_feedback_specific');
}
if ($this->object->getGenericAnswerFeedback()) {
array_push($values, 'instant_feedback_generic');
}
if ($this->object->getAnswerFeedbackPoints()) {
array_push($values, 'instant_feedback_points');
}
if ($this->object->getInstantFeedbackSolution()) {
array_push($values, 'instant_feedback_solution');
}
$instant_feedback->setValue($values);
$instant_feedback->setInfo($this->lng->txt("tst_instant_feedback_description"));
$form->addItem($instant_feedback);
// scoring properties
$header_tr = new ilFormSectionHeaderGUI();
$header_tr->setTitle($this->lng->txt("test_results"));
$form->addItem($header_tr);
// access to test results
$results_access = new ilRadioGroupInputGUI($this->lng->txt("tst_results_access"), "results_access");
$results_access->addOption(new ilRadioOption($this->lng->txt("tst_results_access_always"), 2, ''));
$results_access->addOption(new ilRadioOption($this->lng->txt("tst_results_access_finished"), 1, ''));
$results_access_date_limitation = new ilRadioOption($this->lng->txt("tst_results_access_date"), 3, '');
$results_access->addOption($results_access_date_limitation);
$results_access->addOption(new ilRadioOption($this->lng->txt("tst_results_access_never"), 4, ''));
$results_access->setValue($this->object->getScoreReporting());
$results_access->setInfo($this->lng->txt("tst_results_access_description"));
// access date
$reporting_date = new ilDateTimeInputGUI('', 'reporting_date');
$reporting_date->setShowDate(true);
$reporting_date->setShowTime(true);
if (strlen($this->object->getReportingDate())) {
$reporting_date->setDate(new ilDateTime($this->object->getReportingDate(), IL_CAL_TIMESTAMP));
} else {
$reporting_date->setDate(new ilDateTime(time(), IL_CAL_UNIX));
}
$results_access_date_limitation->addSubItem($reporting_date);
$form->addItem($results_access);
$results_print_best_solution = new ilCheckboxInputGUI($this->lng->txt("tst_results_print_best_solution"), "print_bs_with_res");
$results_print_best_solution->setInfo($this->lng->txt('tst_results_print_best_solution_info'));
$results_print_best_solution->setValue(1);
$results_print_best_solution->setChecked((bool) $this->object->isBestSolutionPrintedWithResult());
$form->addItem($results_print_best_solution);
// results presentation
$results_presentation = new ilCheckboxGroupInputGUI($this->lng->txt("tst_results_presentation"), "results_presentation");
$results_presentation->addOption(new ilCheckboxOption($this->lng->txt("tst_show_pass_details"), 'pass_details', ''));
$results_presentation->addOption(new ilCheckboxOption($this->lng->txt("tst_show_solution_details"), 'solution_details', ''));
$results_presentation->addOption(new ilCheckboxOption($this->lng->txt("tst_show_solution_printview"), 'solution_printview', ''));
$results_presentation->addOption(new ilCheckboxOption($this->lng->txt("tst_show_solution_compare"), 'solution_compare', ''));
$results_presentation->addOption(new ilCheckboxOption($this->lng->txt("tst_show_solution_feedback"), 'solution_feedback', ''));
$results_presentation->addOption(new ilCheckboxOption($this->lng->txt("tst_show_solution_answers_only"), 'solution_answers_only', ''));
$signatureOption = new ilCheckboxOption($this->lng->txt("tst_show_solution_signature"), 'solution_signature', '');
$results_presentation->addOption($signatureOption);
$results_presentation->addOption(new ilCheckboxOption($this->lng->txt("tst_show_solution_suggested"), 'solution_suggested', ''));
$values = array();
if ($this->object->getShowPassDetails()) {
array_push($values, 'pass_details');
}
if ($this->object->getShowSolutionDetails()) {
array_push($values, 'solution_details');
}
if ($this->object->getShowSolutionPrintview()) {
示例6: initPropertiesForm
//.........这里部分代码省略.........
$form->addItem($online);
$act_type = new ilRadioGroupInputGUI($this->lng->txt('rep_activation_access'), 'access_type');
$act_type->setInfo($act_ref_info);
$act_type->setValue($this->object->isActivationLimited() ? ilObjectActivation::TIMINGS_ACTIVATION : ilObjectActivation::TIMINGS_DEACTIVATED);
$opt = new ilRadioOption($this->lng->txt('rep_visibility_limitless'), ilObjectActivation::TIMINGS_DEACTIVATED);
$opt->setInfo($this->lng->txt('svy_availability_limitless_info'));
$act_type->addOption($opt);
$opt = new ilRadioOption($this->lng->txt('rep_visibility_until'), ilObjectActivation::TIMINGS_ACTIVATION);
$opt->setInfo($this->lng->txt('svy_availability_until_info'));
$date = $this->object->getActivationStartDate();
$start = new ilDateTimeInputGUI($this->lng->txt('rep_activation_limited_start'), 'access_begin');
$start->setShowTime(true);
$start->setDate(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
$opt->addSubItem($start);
$date = $this->object->getActivationEndDate();
$end = new ilDateTimeInputGUI($this->lng->txt('rep_activation_limited_end'), 'access_end');
$end->setShowTime(true);
$end->setDate(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
$opt->addSubItem($end);
$visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'access_visiblity');
$visible->setInfo($this->lng->txt('svy_activation_limited_visibility_info'));
$visible->setChecked($this->object->getActivationVisibility());
$opt->addSubItem($visible);
$act_type->addOption($opt);
$form->addItem($act_type);
// enable start date
$start = $this->object->getStartDate();
$enablestartingtime = new ilCheckboxInputGUI($this->lng->txt("start_date"), "enabled_start_date");
$enablestartingtime->setValue(1);
// $enablestartingtime->setOptionTitle($this->lng->txt("enabled"));
$enablestartingtime->setChecked($start);
// start date
$startingtime = new ilDateTimeInputGUI('', 'start_date');
$startingtime->setShowDate(true);
$startingtime->setShowTime(true);
if ($start) {
$startingtime->setDate(new ilDate($start, IL_CAL_TIMESTAMP));
}
$enablestartingtime->addSubItem($startingtime);
$form->addItem($enablestartingtime);
// enable end date
$end = $this->object->getEndDate();
$enableendingtime = new ilCheckboxInputGUI($this->lng->txt("end_date"), "enabled_end_date");
$enableendingtime->setValue(1);
// $enableendingtime->setOptionTitle($this->lng->txt("enabled"));
$enableendingtime->setChecked($end);
// end date
$endingtime = new ilDateTimeInputGUI('', 'end_date');
$endingtime->setShowDate(true);
$endingtime->setShowTime(true);
if ($end) {
$endingtime->setDate(new ilDate($end, IL_CAL_TIMESTAMP));
}
$enableendingtime->addSubItem($endingtime);
$form->addItem($enableendingtime);
// presentation properties
$info = new ilFormSectionHeaderGUI();
$info->setTitle($this->lng->txt("svy_presentation_properties"));
$form->addItem($info);
// show question titles
$show_question_titles = new ilCheckboxInputGUI($this->lng->txt("svy_show_questiontitles"), "show_question_titles");
$show_question_titles->setValue(1);
$show_question_titles->setChecked($this->object->getShowQuestionTitles());
$form->addItem($show_question_titles);
// introduction
$intro = new ilTextAreaInputGUI($this->lng->txt("introduction"), "introduction");