Permalink
Browse files

MDL-32065 Allow feedback images to be themed

  • Loading branch information...
1 parent 23778a4 commit 536328fb0ad1221d00ba1b5fcba6cfc5e99efef3 @andrewnicols andrewnicols committed Mar 15, 2012
@@ -349,10 +349,10 @@
echo '<span class="feedback_item_command_toggle">';
if ($feedbackitem->required == 1) {
$buttontitle = get_string('switch_item_to_not_required', 'feedback');
- $buttonimg = 'pics/required.gif';
+ $buttonimg = $OUTPUT->pix_url('required', 'feedback');
} else {
$buttontitle = get_string('switch_item_to_required', 'feedback');
- $buttonimg = 'pics/notrequired.gif';
+ $buttonimg = $OUTPUT->pix_url('notrequired', 'feedback');
}
$urlparams = array('switchitemrequired'=>$feedbackitem->id);
$requiredurl = new moodle_url($url, $urlparams);
@@ -216,6 +216,7 @@ public function get_printval($item, $value) {
}
public function print_analysed($item, $itemnr = '', $groupid = false, $courseid = false) {
+ global $OUTPUT;
$sep_dec = get_string('separator_decimal', 'feedback');
if (substr($sep_dec, 0, 2) == '[[') {
$sep_dec = FEEDBACK_DECIMAL;
@@ -237,7 +238,7 @@ public function print_analysed($item, $itemnr = '', $groupid = false, $courseid
$pixnr = 0;
foreach ($analysed_vals as $val) {
$intvalue = $pixnr % 10;
- $pix = "pics/$intvalue.gif";
+ $pix = $OUTPUT->pix_url('multichoice/' . $intvalue, 'feedback');
$pixnr++;
$pixwidth = intval($val->quotient * FEEDBACK_MAX_PIX_LENGTH);
$quotient = number_format(($val->quotient * 100), 2, $sep_dec, $sep_thous);
@@ -192,6 +192,7 @@ public function get_printval($item, $value) {
}
public function print_analysed($item, $itemnr = '', $groupid = false, $courseid = false) {
+ global $OUTPUT;
$sep_dec = get_string('separator_decimal', 'feedback');
if (substr($sep_dec, 0, 2) == '[[') {
$sep_dec = FEEDBACK_DECIMAL;
@@ -212,7 +213,7 @@ public function print_analysed($item, $itemnr = '', $groupid = false, $courseid
$avg = 0.0;
foreach ($analysed_vals as $val) {
$intvalue = $pixnr % 10;
- $pix = "pics/$intvalue.gif";
+ $pix = $OUTPUT->pix_url('multichoice/' . $intvalue, 'feedback');
$pixnr++;
$pixwidth = intval($val->quotient * FEEDBACK_MAX_PIX_LENGTH);
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit 536328f

Please sign in to comment.