1 <table cellpadding=
"9" cellspacing=
"0">
2 <?php if($this->instance
->pagetype
!= 'mod-quiz-view') { ?>
5 <?php print_string('config_select_quiz', 'block_quiz_results') ?>
9 $quizzes = get_records('quiz', 'course', $this->instance
->pageid
, '', 'id, name');
11 echo '<strong>'.get_string('config_no_quizzes_in_course', 'block_quiz_results').'</strong>';
12 echo '<p><input type="hidden" name="quizid" value="0" /></p>';
16 foreach($quizzes as $quiz) {
17 $options[$quiz->id
] = $quiz->name
;
19 choose_from_menu($options, 'quizid', empty($this->config
->quizid
) ?
0 : $this->config
->quizid
);
24 <?php } // end if($this->instance->pagetype != PAGE_QUIZ_VIEW) ?>
27 <?php
print_string('config_show_best', 'block_quiz_results') ?>
30 <input name=
"showbest" type=
"text" size=
"3" value=
"<?php
31 p(empty($this->config->showbest) ? 0 : max(0, intval($this->config->showbest)));
37 <?php
print_string('config_show_worst', 'block_quiz_results') ?>
40 <input name=
"showworst" type=
"text" size=
"3" value=
"<?php
41 p(empty($this->config->showworst) ? 0 : max(0, intval($this->config->showworst)));
47 <?php
print_string('config_use_groups', 'block_quiz_results') ?>
50 <input name=
"usegroups" type=
"radio" id=
"usegroups_yes" <?php if(!empty($this->config
->usegroups
)) echo 'checked="checked"'; ?> value=
"1" /> <label for=
"usegroups_yes"><?php print_string('yes');
?></label>
51 <input name=
"usegroups" type=
"radio" id=
"usegroups_no" <?php if(empty($this->config
->usegroups
)) echo 'checked="checked"'; ?> value=
"0" /> <label for=
"usegroups_no"><?php print_string('no');
?></label>
56 <?php print_string('config_name_format', 'block_quiz_results') ?>
60 $usenames = array(B_QUIZRESULTS_NAME_FORMAT_FULL
=> get_string('config_names_full', 'block_quiz_results'), B_QUIZRESULTS_NAME_FORMAT_ID
=> get_string('config_names_id', 'block_quiz_results'), B_QUIZRESULTS_NAME_FORMAT_ANON
=> get_string('config_names_anon', 'block_quiz_results'));
61 choose_from_menu($usenames, 'nameformat', empty($this->config
->nameformat
) ? B_QUIZRESULTS_NAME_FORMAT_FULL
: $this->config
->nameformat
, '');
67 <?php print_string('config_grade_format', 'block_quiz_results') ?>
71 $formats = array(B_QUIZRESULTS_GRADE_FORMAT_PCT
=> get_string('config_format_percentage', 'block_quiz_results'), B_QUIZRESULTS_GRADE_FORMAT_FRA
=> get_string('config_format_fraction', 'block_quiz_results'), B_QUIZRESULTS_GRADE_FORMAT_ABS
=> get_string('config_format_absolute', 'block_quiz_results'));
72 choose_from_menu($formats, 'gradeformat', empty($this->config
->gradeformat
) ?
0 : $this->config
->gradeformat
, '');
77 <td colspan=
"2" align=
"center">
78 <input type=
"submit" value=
"<?php print_string('savechanges') ?>" />