MDL-28471 make the question flag smaller, and give it a label.

This commit is contained in:
Wale Olujide 2011-07-26 12:07:24 +01:00 committed by Tim Hunt
parent 6f05796919
commit 474ee9389a
3 changed files with 29 additions and 3 deletions

View file

@ -632,20 +632,24 @@ abstract class question_flags {
'requires' => array('base', 'dom', 'event-delegate', 'io-base'),
);
$actionurl = $CFG->wwwroot . '/question/toggleflag.php';
$fltext = array(0 => get_string('clickflag', 'question'),
1 => get_string('clickunflag', 'question'));
$flagattributes = array(
0 => array(
'src' => $OUTPUT->pix_url('i/unflagged') . '',
'title' => get_string('clicktoflag', 'question'),
'alt' => get_string('notflagged', 'question'),
// 'text' => get_string('clickflag', 'question'),
),
1 => array(
'src' => $OUTPUT->pix_url('i/flagged') . '',
'title' => get_string('clicktounflag', 'question'),
'alt' => get_string('flagged', 'question'),
// 'text' => get_string('clickunflag', 'question'),
),
);
$PAGE->requires->js_init_call('M.core_question_flags.init',
array($actionurl, $flagattributes), false, $module);
array($actionurl, $flagattributes, $fltext), false, $module);
$done = true;
}
}