本文整理汇总了PHP中quiz::get_structure方法的典型用法代码示例。如果您正苦于以下问题:PHP quiz::get_structure方法的具体用法?PHP quiz::get_structure怎么用?PHP quiz::get_structure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类quiz
的用法示例。
在下文中一共展示了quiz::get_structure方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$id = optional_param('id', 0, PARAM_INT);
$summary = optional_param('summary', '', PARAM_RAW);
$sequence = optional_param('sequence', '', PARAM_SEQUENCE);
$visible = optional_param('visible', 0, PARAM_INT);
$pageaction = optional_param('action', '', PARAM_ALPHA);
// Used to simulate a DELETE command.
$maxmark = optional_param('maxmark', '', PARAM_FLOAT);
$page = optional_param('page', '', PARAM_INT);
$PAGE->set_url('/mod/quiz/edit-rest.php', array('quizid' => $quizid, 'class' => $class));
require_sesskey();
$quiz = $DB->get_record('quiz', array('id' => $quizid), '*', MUST_EXIST);
$cm = get_coursemodule_from_instance('quiz', $quiz->id, $quiz->course);
$course = $DB->get_record('course', array('id' => $quiz->course), '*', MUST_EXIST);
require_login($course, false, $cm);
$quizobj = new quiz($quiz, $cm, $course);
$structure = $quizobj->get_structure();
$modcontext = context_module::instance($cm->id);
echo $OUTPUT->header();
// Send headers.
// OK, now let's process the parameters and do stuff
// MDL-10221 the DELETE method is not allowed on some web servers,
// so we simulate it with the action URL param.
$requestmethod = $_SERVER['REQUEST_METHOD'];
if ($pageaction == 'DELETE') {
$requestmethod = 'DELETE';
}
switch ($requestmethod) {
case 'POST':
case 'GET':
// For debugging.
switch ($class) {