MDL-23784 converted question types to use new pix API and locations
@ -1834,15 +1834,14 @@ function question_apply_penalty_and_timelimit(&$question, &$state, $attempt, $cm
|
||||
* @param boolean $return If true the functions returns the link as a string
|
||||
*/
|
||||
function print_question_icon($question, $return = false) {
|
||||
global $QTYPES, $CFG;
|
||||
global $QTYPES, $CFG, $OUTPUT;
|
||||
|
||||
if (array_key_exists($question->qtype, $QTYPES)) {
|
||||
$namestr = $QTYPES[$question->qtype]->local_name();
|
||||
} else {
|
||||
$namestr = 'missingtype';
|
||||
}
|
||||
$html = '<img src="' . $CFG->wwwroot . '/question/type/' .
|
||||
$question->qtype . '/icon.gif" alt="' .
|
||||
$html = '<img src="' . $OUTPUT->pix_url('icon', 'qtype_'.$question->qtype) . '" alt="' .
|
||||
$namestr . '" title="' . $namestr . '" />';
|
||||
if ($return) {
|
||||
return $html;
|
||||
|
Before Width: | Height: | Size: 78 B After Width: | Height: | Size: 78 B |
Before Width: | Height: | Size: 909 B After Width: | Height: | Size: 909 B |
Before Width: | Height: | Size: 896 B After Width: | Height: | Size: 896 B |
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 149 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 84 B After Width: | Height: | Size: 84 B |
@ -302,7 +302,7 @@ class embedded_cloze_qtype extends default_questiontype {
|
||||
// adding an icon with alt to warn user this is a fill in the gap question
|
||||
// MDL-7497
|
||||
if (!empty($USER->screenreader)) {
|
||||
echo "<img src=\"$CFG->wwwroot/question/type/$question->qtype/icon.gif\" ".
|
||||
echo "<img src=\"".$OUTPUT->pix_url('icon', 'qtype_'.$question->qtype)."\" ".
|
||||
"class=\"icon\" alt=\"".get_string('clozeaid','qtype_multichoice')."\" /> ";
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 78 B After Width: | Height: | Size: 78 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 190 B |