本文整理汇总了PHP中moodleform_mod::display方法的典型用法代码示例。如果您正苦于以下问题:PHP moodleform_mod::display方法的具体用法?PHP moodleform_mod::display怎么用?PHP moodleform_mod::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类moodleform_mod
的用法示例。
在下文中一共展示了moodleform_mod::display方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display()
{
parent::display();
echo "<script>\n function check_qr() {\n var e = document.getElementById('id_headerqr');\n var f = document.getElementById('id_printdoublesided');\n\t var g = document.getElementById('id_type');\n if(!e || !f || !g) {\n return;\n }\n var type = e.options[e.selectedIndex].value;\n var qrchecked = e.checked;\n var doublesidechecked = f.checked;\n if(type == '1' && !qrchecked) {\n alert('Personalized header is required for On Screen Marking');\n document.getElementById('id_headerqr').checked = true;\n }\n }\n\t function show_full_form() {\n\t var e = document.getElementById('id_type');\n if(!e) {\n return;\n }\n var strUser = e.options[e.selectedIndex].value;\n console.log(strUser);\n // Print only.\n\t if (strUser == '0') {\n document.getElementById('id_print').style.display = 'block';\n document.getElementById('id_scan').style.display = 'none';\n document.getElementById('id_osm').style.display = 'none';\n document.getElementById('id_markerstraining').style.display = 'none';\n document.getElementById('id_modstandardgrade').style.display = 'none';\n document.getElementById('id_modstandardelshdr').style.display = 'block';\n } else if (strUser == '1') {\n // On Screen Marking.\n document.getElementById('id_print').style.display = 'block';\n document.getElementById('id_scan').style.display = 'block';\n document.getElementById('scanisenabled').style.display = 'none';\n document.getElementById('osmisenabled').style.display = 'block';\n document.getElementById('id_osm').style.display = 'block';\n document.getElementById('id_markerstraining').style.display = 'none';\n document.getElementById('id_modstandardgrade').style.display = 'block';\n document.getElementById('id_modstandardelshdr').style.display = 'block';\n document.getElementById('id_headerqr').checked = true;\n } else if(strUser == '2') {\n // Markers training.\n document.getElementById('id_print').style.display = 'none';\n\t document.getElementById('id_scan').style.display = 'none';\n document.getElementById('id_osm').style.display = 'block';\n document.getElementById('fitem_id_peervisibility').style.display = 'none';\n document.getElementById('fitem_id_justiceperception').style.display = 'none';\n document.getElementById('fitem_id_qualitycontrol').style.display = 'none';\n document.getElementById('fgroup_id_markers').style.display = 'none';\n document.getElementById('fitem_id_enableduedate').style.display = 'none';\n document.getElementById('fitem_id_markingduedate').style.display = 'none';\n document.getElementById('fitem_id_regraderestrictdates').style.display = 'none';\n document.getElementById('fitem_id_regradesopendate').style.display = 'none';\n document.getElementById('fitem_id_regradesclosedate').style.display = 'none';\n document.getElementById('id_markerstraining').style.display = 'block';\n document.getElementById('id_modstandardgrade').style.display = 'none';\n document.getElementById('id_modstandardelshdr').style.display = 'block';\n } else if(strUser == '4') {\n // Peer review.\n document.getElementById('id_print').style.display = 'block';\n\t document.getElementById('id_scan').style.display = 'none';\n document.getElementById('id_osm').style.display = 'block';\n document.getElementById('fitem_id_peervisibility').style.display = 'none';\n document.getElementById('fitem_id_justiceperception').style.display = 'none';\n document.getElementById('fitem_id_qualitycontrol').style.display = 'none';\n document.getElementById('fgroup_id_markers').style.display = 'none';\n document.getElementById('fitem_id_enableduedate').style.display = 'block';\n document.getElementById('fitem_id_markingduedate').style.display = 'none';\n document.getElementById('fitem_id_regraderestrictdates').style.display = 'none';\n document.getElementById('fitem_id_regradesopendate').style.display = 'none';\n document.getElementById('fitem_id_regradesclosedate').style.display = 'none';\n document.getElementById('id_markerstraining').style.display = 'none';\n document.getElementById('id_modstandardgrade').style.display = 'none';\n document.getElementById('id_modstandardelshdr').style.display = 'block';\n } else if(strUser == '5') {\n // Print and scan.\n document.getElementById('id_print').style.display = 'block';\n\t document.getElementById('id_scan').style.display = 'block';\n document.getElementById('scanisenabled').style.display = 'block';\n document.getElementById('osmisenabled').style.display = 'none';\n document.getElementById('id_osm').style.display = 'none';\n document.getElementById('id_markerstraining').style.display = 'none';\n document.getElementById('id_modstandardgrade').style.display = 'none';\n document.getElementById('id_modstandardelshdr').style.display = 'block';\n } else {\n console.log('Invalid type value ' + strUser);\n document.getElementById('id_print').style.display = 'none';\n document.getElementById('id_scan').style.display = 'none';\n document.getElementById('id_osm').style.display = 'none';\n document.getElementById('id_modstandardgrade').style.display = 'none';\n document.getElementById('id_modstandardelshdr').style.display = 'none';\n }\n document.getElementById('fitem_id_introeditor').style.display = 'none';\n document.getElementById('id_submitbutton2').style.display = 'none';\n\t }\n show_full_form();\n\t </script>";
echo $this->extrascript;
}
示例2: display
function display()
{
parent::display();
echo "<script>\n\t function showFullForm() {\n\t var e = document.getElementById('id_type');\n if(!e) {\n return;\n }\n var strUser = e.options[e.selectedIndex].value;\n // Print only\n\t if (strUser == '0') {\n document.getElementById('id_print').style.display = 'block';\n document.getElementById('id_scan').style.display = 'none';\n document.getElementById('id_osm').style.display = 'none';\n document.getElementById('id_markerstraining').style.display = 'none';\n document.getElementById('id_modstandardgrade').style.display = 'none';\n document.getElementById('id_modstandardelshdr').style.display = 'block';\n } else if (strUser == '1') {\n // On Screen Marking\n document.getElementById('id_print').style.display = 'block';\n document.getElementById('id_scan').style.display = 'block';\n document.getElementById('scanisenabled').style.display = 'none';\n document.getElementById('osmisenabled').style.display = 'block';\n document.getElementById('id_osm').style.display = 'block';\n document.getElementById('id_markerstraining').style.display = 'none';\n document.getElementById('id_modstandardgrade').style.display = 'block';\n document.getElementById('id_modstandardelshdr').style.display = 'block';\n } else if(strUser == '2') {\n // Markers training\n document.getElementById('id_print').style.display = 'none';\n\t document.getElementById('id_scan').style.display = 'none';\n document.getElementById('id_osm').style.display = 'block';\n document.getElementById('fitem_id_peervisibility').style.display = 'none';\n document.getElementById('fitem_id_justiceperception').style.display = 'none';\n document.getElementById('fitem_id_qualitycontrol').style.display = 'none';\n document.getElementById('fgroup_id_markers').style.display = 'none';\n document.getElementById('fitem_id_enableduedate').style.display = 'none';\n document.getElementById('fitem_id_markingduedate').style.display = 'none';\n document.getElementById('fitem_id_regraderestrictdates').style.display = 'none';\n document.getElementById('fitem_id_regradesopendate').style.display = 'none';\n document.getElementById('fitem_id_regradesclosedate').style.display = 'none';\n document.getElementById('id_markerstraining').style.display = 'block';\n document.getElementById('id_modstandardgrade').style.display = 'none';\n document.getElementById('id_modstandardelshdr').style.display = 'block';\n } else if(strUser == '5') {\n // Print and scan\n document.getElementById('id_print').style.display = 'block';\n\t document.getElementById('id_scan').style.display = 'block';\n document.getElementById('scanisenabled').style.display = 'block';\n document.getElementById('osmisenabled').style.display = 'none';\n document.getElementById('id_osm').style.display = 'none';\n document.getElementById('id_markerstraining').style.display = 'none';\n document.getElementById('id_modstandardgrade').style.display = 'none';\n document.getElementById('id_modstandardelshdr').style.display = 'block';\n } else {\n document.getElementById('id_print').style.display = 'none';\n document.getElementById('id_scan').style.display = 'none';\n document.getElementById('id_experimental').style.display = 'none';\n document.getElementById('id_marking').style.display = 'none';\n document.getElementById('id_regrade').style.display = 'none';\n document.getElementById('id_modstandardgrade').style.display = 'none';\n document.getElementById('id_modstandardelshdr').style.display = 'none';\n }\n \n document.getElementById('fitem_id_introeditor').style.display = 'none';\n document.getElementById('id_submitbutton2').style.display = 'none';\n \n\t }\n showFullForm();\n\t </script>";
// #id_experimental, #id_marking, #id_regrade, #id_modstandardgrade, #id_modstandardelshdr
echo "<script>\n\t function previousExamUpdate() {\n\t var e = document.getElementById('id_exam');\n var strUser = e.options[e.selectedIndex].value;\n\t if (strUser == '0') {\n document.getElementById('fitem_id_exam_files').style.display = 'block';\n document.getElementById('fitem_id_examdate').style.display = 'block';\n\t document.getElementById('fitem_id_printlist').style.display = 'block';\n document.getElementById('fitem_id_printdoublesided').style.display = 'block';\n document.getElementById('fitem_id_headerqr').style.display = 'block';\n document.getElementById('fitem_id_extrasheets').style.display = 'block';\n document.getElementById('fitem_id_extraexams').style.display = 'block';\n document.getElementById('fgroup_id_multicourse').style.display = 'block';\n document.getElementById('fgroup_id_enrolments').style.display = 'block';\n document.getElementById('fitem_id_selectall').style.display = 'block';\n document.getElementById('fitem_id_deselectall').style.display = 'block';\n document.getElementById('id_print').getElementsByClassName('moreless-actions')[0].style.display = 'block';\n } else {\n document.getElementById('fitem_id_exam_files').style.display = 'none';\n document.getElementById('fitem_id_examdate').style.display = 'none';\n\t document.getElementById('fitem_id_printlist').style.display = 'none';\n document.getElementById('fitem_id_printdoublesided').style.display = 'none';\n document.getElementById('fitem_id_headerqr').style.display = 'none';\n document.getElementById('fitem_id_extrasheets').style.display = 'none';\n document.getElementById('fitem_id_extraexams').style.display = 'none';\n document.getElementById('fgroup_id_multicourse').style.display = 'none';\n document.getElementById('fgroup_id_enrolments').style.display = 'none';\n document.getElementById('fitem_id_selectall').style.display = 'none';\n document.getElementById('fitem_id_deselectall').style.display = 'none';\n document.getElementById('id_print').getElementsByClassName('moreless-actions')[0].style.display = 'none';\n }\n\t }\n\t </script>";
echo $this->extraScript;
}
示例3: display
function display()
{
$id = optional_param('update', FALSE, PARAM_INT);
if ($id) {
$vpl = new mod_vpl($id);
$vpl->print_configure_tabs('edit');
if ($vpl->get_grade_info() !== false) {
$vpl->get_instance()->visiblegrade = $vpl->get_grade_info()->hidden ? 0 : 1;
} else {
$vpl->get_instance()->visiblegrade = false;
}
$this->set_data($vpl->get_instance());
}
parent::display();
}
示例4: display
function display()
{
global $CFG, $USER;
$form = $this->form;
if ($this->is_adding_equella_resource()) {
$args = new stdClass();
$args->course = $form->course;
$args->section = $form->section;
$args->cmid = $form->coursemodule;
$args->module = $form->module;
$args->modulename = $form->modulename;
$args->instance = $form->instance;
echo equella_select_dialog($args);
// XXX https://github.com/equella/moodle-mod_equella/issues/28
// This is a hack to make moodle believes certain html element exists.
// When conditional access is enabled, moodle expects id_availabilityconditionsjson field
// in standard module form, as we don't use standard form.
echo html_writer::start_tag('form', array('style' => 'display:none'));
echo html_writer::empty_tag('input', array('id' => 'id_availabilityconditionsjson', 'type' => 'hidden'));
echo html_writer::end_tag('form');
} else {
parent::display();
}
}