name)) { $form->name = ""; } if (empty($form->text)) { $form->text = ""; } if (empty($form->format)) { $form->format = 0; } if (empty($form->display)) { $form->display = 0; } if (empty($form->timeopen)) { $form->timeopen = ""; $form->timerestrict = 0; } else { $form->timerestrict = 1; } if (empty($form->timeclose)) { $form->timeclose = ""; } if (empty($form->publish)) { $form->publish = 0; } if (empty($form->rlsresult)) { $form->rlsresult = 0; } if (empty($form->allowupdate)) { $form->allowupdate = 0; } if (empty($form->showunanswered)) { $form->showunanswered = 0; } if (empty($form->limitanswers)) { $form->limitanswers = 0; } if (empty($form->groupid)) { $form->groupid = 0; } ?>
instance) && ($options = get_records_menu('miechoice_options','miechoiceid', $form->instance, 'id', 'id,text')) && ($options2 = get_records_menu('miechoice_options','miechoiceid', $form->instance, 'id', 'id,maxanswers')) ) { foreach ($options as $id => $text) { $count++; ?> coursemodule) { if (! $cm = get_record('course_modules', 'id', $form->coursemodule)) { error("This course module doesn't exist"); } } else { $cm = null; } if (! $groupmode = groupmode($course, $cm)) { $groupmode = 'NOGROUPS'; } if ($course->groupmode or (!$course->groupmodeforce)) { echo ''; echo ''; echo ''; } miechoice_print_choice_group($form, $course); miechoice_print_visible_setting($form, $course); ?>
: " value="name) ?>" />
:

"; helpbutton("questions", get_string("helpquestions"), "moodle", true, true); echo "
"; if ($usehtmleditor) { helpbutton("richtext", get_string("helprichtext"), "moodle", true, true); } else { emoticonhelpbutton("form", "text"); } echo "
"; ?>
text); if ($usehtmleditor) { echo ''; } else { echo "
"; helpbutton("textformat", get_string("formattexttype")); print_string("formattexttype"); echo ": "; if (!$form->format) { $form->format = $defaultformat; } choose_from_menu(format_text_menu(), "format", $form->format, ""); echo "
"; } ?>
: :
: :
: limitanswers", "", "return lockselects('form','limitanswers.options[0]', limititems)"); ?>
: " onclick="return lockoptions('form','timerestrict', timeitems)" timerestrict) echo 'checked="checked"'; ?> />
 
: timeopen and $course->format == "weeks") { $form->timeopen = $course->startdate + (($form->section - 1) * 608400); } print_date_selector("openday", "openmonth", "openyear", $form->timeopen); print_time_selector("openhour", "openminute", $form->timeopen); ?>
: timeclose and $course->format == "weeks") { $form->timeclose = $course->startdate + (($form->section) * 608400); } print_date_selector("closeday", "closemonth", "closeyear", $form->timeclose); print_time_selector("closehour", "closeminute", $form->timeclose); ?> timerestrict) { echo ""; } require_once("$CFG->dirroot/mod/miechoice/lib.php"); ?>
: display", ""); ?>
: rlsresult", "", "return lockselects('form','rlsresult.options[0]',['publish'])"); ?>
: publish", ""); ?>
: allowupdate", ""); ?>
: showunanswered", ""); ?>
'.get_string('groupmode').':'; unset($choices); $choices[NOGROUPS] = get_string('groupsnone'); $choices[SEPARATEGROUPS] = get_string('groupsseparate'); $choices[VISIBLEGROUPS] = get_string('groupsvisible'); choose_from_menu($choices, 'groupmode', $groupmode, '', "return lockselects('form','groupmode.options[0]',['groupid'])"); helpbutton('groupmode', get_string('groupmode')); echo '
 "; ?> ">