MDL-19813 Upgraded calls to choose_from_menu
This commit is contained in:
+9
-6
@@ -76,7 +76,7 @@ function module_specific_buttons($cmid, $cmoptions) {
|
||||
* (which is called from showbank())
|
||||
*/
|
||||
function module_specific_controls($totalnumber, $recurse, $category, $cmid, $cmoptions) {
|
||||
global $QTYPES;
|
||||
global $QTYPES, $OUTPUT;
|
||||
$out = '';
|
||||
$catcontext = get_context_instance_by_id($category->contextid);
|
||||
if (has_capability('moodle/question:useall', $catcontext)) {
|
||||
@@ -98,8 +98,10 @@ function module_specific_controls($totalnumber, $recurse, $category, $cmid, $cmo
|
||||
$straddtoquiz = get_string('addtoquiz', 'quiz');
|
||||
$out = '<strong><label for="menurandomcount">'.get_string('addrandomfromcategory', 'quiz').
|
||||
'</label></strong><br />';
|
||||
$out .= get_string('addrandom', 'quiz', choose_from_menu($randomcount,
|
||||
'randomcount', '1', '', '', '', true, $cmoptions->hasattempts));
|
||||
$select = html_select::make($randomcount, 'randomcount', '1', false);
|
||||
$select->nothingvalue = '';
|
||||
$select->disabled = $cmoptions->hasattempts;
|
||||
$out .= get_string('addrandom', 'quiz', $OUTPUT->select($select));
|
||||
$out .= '<input type="hidden" name="recurse" value="'.$recurse.'" />';
|
||||
$out .= '<input type="hidden" name="categoryid" value="' . $category->id . '" />';
|
||||
$out .= ' <input type="submit" name="addrandom" value="'.
|
||||
@@ -562,9 +564,10 @@ if ($quiz_reordertool) {
|
||||
//YUI does not submit the value of the submit button so
|
||||
//we need to add the value:
|
||||
echo '<input type="hidden" name="repaginate" value="'.$gostring.'" />';
|
||||
print_string('repaginate', 'quiz',
|
||||
choose_from_menu($perpage, 'questionsperpage',
|
||||
$quiz->questionsperpage, '', '', '', true, $repaginatingdisabled));
|
||||
$select = html_select::make($perpage, 'questionsperpage', $quiz->questionsperpage, false);
|
||||
$select->nothingvalue = '';
|
||||
$select->disabled = $repaginatingdisabledhtml;
|
||||
print_string('repaginate', 'quiz', $OUTPUT->select($select));
|
||||
echo '<div class="quizquestionlistcontrols">';
|
||||
echo ' <input type="submit" name="repaginate" value="'. $gostring .'" '.$repaginatingdisabledhtml.' />';
|
||||
echo '</div></fieldset></form></div></div>';
|
||||
|
||||
Reference in New Issue
Block a user