History | Log In     View a printable version of the current page.  
We are currently focused especially on Moodle 2.0, Moodle 1.9.x bugs and Moodle 1.9.x testing.    Confused? Lost? Please read this introduction to the Tracker.
Issue Details (XML | Word | Printable)

Key: MDL-15792
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Tim Hunt
Reporter: Yolanda Ordoñez Rufat
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Moodle

Images in question don't display

Created: 23/Jul/08 04:18 PM   Updated: 13/Aug/08 09:00 AM
Component/s: Quiz
Affects Version/s: 1.9.2
Fix Version/s: 1.9.3

Issue Links:
Duplicate
 

Participants: Petr Škoda, Tim Hunt and Yolanda Ordoñez Rufat
Security Level: None
QA Assignee: Petr Škoda


 Description  « Hide
When you set an image in a question from the combo 'Image to display' (not in the html) the image is not displayed in the quiz.

If you set the debuging messages you'll get this notice:
    Notice: Undefined variable: courseid in /www/moodle/lib/questionlib.php on line 1508

There's an error in the function get_question_image($question) from the moodle/lib/questionlib.php

The solution:
around line 1508
    $img = get_file_url("$courseid/{$question->image}");
should be
    $img = get_file_url("$coursefilesdir/{$question->image}");

So just need to change $courseid to $coursefilesdir

We test the solution on a 1.9.2 moodle with a 8.2.4 postgres installed in a SUSE Linux Enterprise Server 10 SP1



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Tim Hunt - 23/Jul/08 06:32 PM
This is a regression from MDL-14279. Thanks for the fix.

Petr Škoda - 29/Jul/08 03:01 PM
thanks, closing