mirror of
https://github.com/moodle/moodle.git
synced 2025-02-24 03:53:49 +01:00
70 lines
2.8 KiB
HTML
70 lines
2.8 KiB
HTML
<table cellpadding="9" cellspacing="0">
|
|
<?php if($this->instance->pagetype == MOODLE_PAGE_COURSE) { ?>
|
|
<tr valign="top">
|
|
<td align="right">
|
|
<?php print_string('config_select_quiz', 'block_quiz_results') ?>
|
|
</td>
|
|
<td>
|
|
<?php
|
|
$quizzes = get_records('quiz', 'course', $this->instance->pageid, '', 'id, name');
|
|
if(empty($quizzes)) {
|
|
echo '<strong>'.get_string('config_no_quizzes_in_course', 'block_quiz_results').'</strong>';
|
|
echo '<p><input type="hidden" name="quizid" value="0" /></p>';
|
|
}
|
|
else {
|
|
$options = array();
|
|
foreach($quizzes as $quiz) {
|
|
$options[$quiz->id] = $quiz->name;
|
|
}
|
|
choose_from_menu($options, 'quizid', empty($this->config->quizid) ? 0 : $this->config->quizid);
|
|
}
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<?php } // end if($this->instance->pagetype == MOODLE_PAGE_COURSE) ?>
|
|
<tr valign="top">
|
|
<td align="right">
|
|
<?php print_string('config_show_best', 'block_quiz_results') ?>
|
|
</td>
|
|
<td>
|
|
<input name="showbest" type="text" size="3" value="<?php
|
|
p(empty($this->config->showbest) ? 0 : max(0, intval($this->config->showbest)));
|
|
?>" />
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td align="right">
|
|
<?php print_string('config_show_worst', 'block_quiz_results') ?>
|
|
</td>
|
|
<td>
|
|
<input name="showworst" type="text" size="3" value="<?php
|
|
p(empty($this->config->showworst) ? 0 : max(0, intval($this->config->showworst)));
|
|
?>" />
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td align="right">
|
|
<?php print_string('config_use_groups', 'block_quiz_results') ?>
|
|
</td>
|
|
<td>
|
|
<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>
|
|
<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>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td align="right">
|
|
<?php print_string('config_grade_format', 'block_quiz_results') ?>
|
|
</td>
|
|
<td>
|
|
<?php
|
|
$formats = array(GRADE_FORMAT_PCT => get_string('config_format_percentage', 'block_quiz_results'), GRADE_FORMAT_FRA => get_string('config_format_fraction', 'block_quiz_results'), GRADE_FORMAT_ABS => get_string('config_format_absolute', 'block_quiz_results'));
|
|
choose_from_menu($formats, 'gradeformat', empty($this->config->gradeformat) ? 0 : $this->config->gradeformat, '');
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" align="center">
|
|
<input type="submit" value="<?php print_string('savechanges') ?>">
|
|
</td>
|
|
</tr>
|
|
</table> |