]> git.mjollnir.org Git - moodle.git/commitdiff
Get the alt text for the question type icon in a better way.
authortjhunt <tjhunt>
Tue, 30 Jan 2007 11:09:32 +0000 (11:09 +0000)
committertjhunt <tjhunt>
Tue, 30 Jan 2007 11:09:32 +0000 (11:09 +0000)
lib/questionlib.php

index bdb7b98fbf71f36465d5b7fabbfdb8ac51fa9950..6d9fec8b8e6c6fe68713c6fd91b51eee5f276821 100644 (file)
@@ -1195,11 +1195,9 @@ 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, $editlink=true, $return = false) {
-// returns a question icon
-
     global $QTYPES, $CFG;
 
-    $namestr = get_string($question->qtype, 'quiz');
+    $namestr = $QTYPES[$question->qtype]->menu_name();
     $html = '<img src="'.$CFG->wwwroot.'/question/type/'.
             $question->qtype.'/icon.gif" alt="'.
             $namestr.'" title="'.$namestr.'" />';