Browse files

MDL-32065 Allow feedback images to be themed

  • Loading branch information...
1 parent 91e79a3 commit 9c6d59285ea5aca48e8a0f11a10e1bfe0b2a153c @andrewnicols andrewnicols committed with Sam Hemelryk Mar 15, 2012
View
4 mod/feedback/edit.php
@@ -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);
View
3 mod/feedback/item/multichoice/lib.php
@@ -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);
View
3 mod/feedback/item/multichoicerated/lib.php
@@ -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);
View
0 mod/feedback/pics/0.gif → mod/feedback/pix/multichoice/0.gif
File renamed without changes
View
0 mod/feedback/pics/1.gif → mod/feedback/pix/multichoice/1.gif
File renamed without changes
View
0 mod/feedback/pics/2.gif → mod/feedback/pix/multichoice/2.gif
File renamed without changes
View
0 mod/feedback/pics/3.gif → mod/feedback/pix/multichoice/3.gif
File renamed without changes
View
0 mod/feedback/pics/4.gif → mod/feedback/pix/multichoice/4.gif
File renamed without changes
View
0 mod/feedback/pics/5.gif → mod/feedback/pix/multichoice/5.gif
File renamed without changes
View
0 mod/feedback/pics/6.gif → mod/feedback/pix/multichoice/6.gif
File renamed without changes
View
0 mod/feedback/pics/7.gif → mod/feedback/pix/multichoice/7.gif
File renamed without changes
View
0 mod/feedback/pics/8.gif → mod/feedback/pix/multichoice/8.gif
File renamed without changes
View
0 mod/feedback/pics/9.gif → mod/feedback/pix/multichoice/9.gif
File renamed without changes
View
0 mod/feedback/pics/notrequired.gif → mod/feedback/pix/notrequired.gif
File renamed without changes
View
0 mod/feedback/pics/required.gif → mod/feedback/pix/required.gif
File renamed without changes

0 comments on commit 9c6d592

Please sign in to comment.