Get the alt text for the question type icon in a better way.

This commit is contained in:
tjhunt
2007-01-30 11:09:32 +00:00
parent 01e85af9cc
commit a95cd8a650
+1 -3
View 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.'" />';