Fixing image link, closing bug 4489

This commit is contained in:
gustav_delius 2006-02-05 18:58:49 +00:00
parent 205e0e2dd6
commit d28ca2be6f
10 changed files with 12 additions and 12 deletions

View File

@ -806,7 +806,7 @@ function quiz_print_question_icon($question, $editlink=true, $return = false) {
*
* @param object $question The question object
*/
function quiz_print_possible_question_image($question) {
function quiz_print_possible_question_image($question, $courseid) {
global $CFG;
@ -817,10 +817,10 @@ function quiz_print_possible_question_image($question) {
echo $question->image;
} else if ($CFG->slasharguments) { // Use this method if possible for better caching
echo "$CFG->wwwroot/file.php/$question->image";
echo "$CFG->wwwroot/file.php/$courseid/$question->image";
} else {
echo "$CFG->wwwroot/file.php?file=$question->image";
echo "$CFG->wwwroot/file.php?file=$courseid/$question->image";
}
echo '" alt="" />';

View File

@ -32,7 +32,7 @@ class quiz_description_qtype extends quiz_default_questiontype {
echo format_text($question->questiontext,
$question->questiontextformat,
NULL, $cmoptions->course);
quiz_print_possible_question_image($question);
quiz_print_possible_question_image($question, $cmoptions->course);
print_simple_box_end('center', '90%');
}

View File

@ -80,7 +80,7 @@ class quiz_essay_qtype extends quiz_default_questiontype {
$question->questiontextformat,
NULL, $cmoptions->course);
quiz_print_possible_question_image($question);
quiz_print_possible_question_image($question, $cmoptions->course);
/// Print input controls
$stranswer = get_string("answer", "quiz");

View File

@ -213,7 +213,7 @@ class quiz_match_qtype extends quiz_default_questiontype {
$question->questiontextformat,
NULL, $cmoptions->course);
}
quiz_print_possible_question_image($question);
quiz_print_possible_question_image($question, $cmoptions->course);
///// Print the input controls //////
echo '<table border="0" cellpadding="10" align="right">';

View File

@ -187,7 +187,7 @@ class quiz_embedded_cloze_qtype extends quiz_default_questiontype {
$nameprefix = $question->name_prefix;
// For this question type, we better print the image on top:
quiz_print_possible_question_image($question);
quiz_print_possible_question_image($question, $cmoptions->course);
$qtextremaining = format_text($question->questiontext,
$question->questiontextformat,

View File

@ -254,7 +254,7 @@ class quiz_multichoice_qtype extends quiz_default_questiontype {
echo format_text($question->questiontext,
$question->questiontextformat,
NULL, $cmoptions->course);
quiz_print_possible_question_image($question);
quiz_print_possible_question_image($question, $cmoptions->course);
// Print input controls and alternatives
echo '<table align="right">';

View File

@ -274,7 +274,7 @@ class quiz_numerical_qtype extends quiz_shortanswer_qtype {
echo format_text($question->questiontext,
$question->questiontextformat,
NULL, $cmoptions->course);
quiz_print_possible_question_image($question);
quiz_print_possible_question_image($question, $cmoptions->course);
/// Print input controls

View File

@ -288,7 +288,7 @@ class quiz_default_questiontype {
* a correct answer if there are many, is returned. This is used by some question
* types in the {@link grade_responses()} function but it is also used by the
* question preview screen to fill in correct responses.
* @return mixed An array of values giving the responses corresponding
* @return mixed A response array giving the responses corresponding
* to the (or a) correct answer to the question. If there is
* no correct answer that scores 100% then null is returned.
* @param object $question The question for which the correct answer is to

View File

@ -118,7 +118,7 @@ class quiz_shortanswer_qtype extends quiz_default_questiontype {
echo format_text($question->questiontext,
$question->questiontextformat,
NULL, $cmoptions->course);
quiz_print_possible_question_image($question);
quiz_print_possible_question_image($question, $cmoptions->course);
/// Print input controls

View File

@ -133,7 +133,7 @@ class quiz_truefalse_qtype extends quiz_default_questiontype {
echo format_text($question->questiontext,
$question->questiontextformat,
NULL, $cmoptions->course);
quiz_print_possible_question_image($question);
quiz_print_possible_question_image($question, $cmoptions->course);
// Update the answer strings
$stranswer = get_string('answer', 'quiz');