MDL-32065 Allow feedback images to be themed

This commit is contained in:
Andrew Robert Nicols
2012-03-21 09:25:22 +13:00
committed by Sam Hemelryk
parent 91e79a37cc
commit 9c6d59285e
15 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -349,10 +349,10 @@ if ($do_show == 'edit') {
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);
+2 -1
View File
@@ -216,6 +216,7 @@ class feedback_item_multichoice extends feedback_item_base {
}
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 @@ class feedback_item_multichoice extends feedback_item_base {
$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);
+2 -1
View File
@@ -192,6 +192,7 @@ class feedback_item_multichoicerated extends feedback_item_base {
}
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 @@ class feedback_item_multichoicerated extends feedback_item_base {
$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);

Before

Width:  |  Height:  |  Size: 35 B

After

Width:  |  Height:  |  Size: 35 B

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

Before

Width:  |  Height:  |  Size: 35 B

After

Width:  |  Height:  |  Size: 35 B

Before

Width:  |  Height:  |  Size: 35 B

After

Width:  |  Height:  |  Size: 35 B

Before

Width:  |  Height:  |  Size: 35 B

After

Width:  |  Height:  |  Size: 35 B

Before

Width:  |  Height:  |  Size: 35 B

After

Width:  |  Height:  |  Size: 35 B

Before

Width:  |  Height:  |  Size: 35 B

After

Width:  |  Height:  |  Size: 35 B

Before

Width:  |  Height:  |  Size: 35 B

After

Width:  |  Height:  |  Size: 35 B

Before

Width:  |  Height:  |  Size: 35 B

After

Width:  |  Height:  |  Size: 35 B

Before

Width:  |  Height:  |  Size: 35 B

After

Width:  |  Height:  |  Size: 35 B

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 143 B

Before

Width:  |  Height:  |  Size: 217 B

After

Width:  |  Height:  |  Size: 217 B