Permalink
Browse files

MDL-32065 Allow feedback images to be themed

  • Loading branch information...
1 parent c91704e commit 9f1495aabce216e64052981edea33e27887bab5f @andrewnicols andrewnicols committed Mar 15, 2012
View
@@ -315,12 +315,12 @@
// echo '<input title="'.get_string('switch_item_to_not_required','feedback').'" type="image" src="pics/required.gif" hspace="1" height="11" width="11" border="0" />';
// echo '<input class="feedback_required_button" title="'.get_string('switch_item_to_not_required','feedback').'" type="image" src="pics/required.gif" />';
$buttontitle = get_string('switch_item_to_not_required','feedback');
- $buttonimg = 'pics/required.gif';
+ $buttonimg = $OUTPUT->pix_url('required', 'feedback');
} else {
// echo '<input title="'.get_string('switch_item_to_required','feedback').'" type="image" src="pics/notrequired.gif" hspace="1" height="11" width="11" border="0" />';
// echo '<input class="feedback_required_button" title="'.get_string('switch_item_to_required','feedback').'" type="image" src="pics/notrequired.gif" />';
$buttontitle = get_string('switch_item_to_required','feedback');
- $buttonimg = 'pics/notrequired.gif';
+ $buttonimg = $OUTPUT->pix_url('notrequired', 'feedback');
}
$requiredurl = new moodle_url($url, array('switchitemrequired'=>$feedbackitem->id));
$buttonlink = $requiredurl->out();
@@ -195,6 +195,7 @@ function get_printval($item, $value) {
}
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;
@@ -214,7 +215,7 @@ function print_analysed($item, $itemnr = '', $groupid = false, $courseid = false
$pixnr = 0;
foreach($analysedVals 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);
@@ -165,6 +165,7 @@ function get_printval($item, $value) {
}
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;
@@ -185,7 +186,7 @@ function print_analysed($item, $itemnr = '', $groupid = false, $courseid = false
$avg = 0.0;
foreach($analysedVals 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
File renamed without changes

0 comments on commit 9f1495a

Please sign in to comment.