Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-27869

Problem displaying images on question preview

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1
    • Component/s: Questions
    • Labels:
    • Environment:
      mysql, mac, php53
    • Testing Instructions:
      Hide

      1. Create calculated* questions with images everywhere you can add an image.
      2. Preview them, and check all the images appear.

      3. Also, create a multianswer question with images in as many places as possible (try adding images to http://docs.moodle.org/20/en/Embedded_Answers_%28Cloze%29_question_type#Example_2).

      If the multianswer thing is broken, please files a new MDL. Thanks.

      Show
      1. Create calculated* questions with images everywhere you can add an image. 2. Preview them, and check all the images appear. 3. Also, create a multianswer question with images in as many places as possible (try adding images to http://docs.moodle.org/20/en/Embedded_Answers_%28Cloze%29_question_type#Example_2 ). If the multianswer thing is broken, please files a new MDL. Thanks.
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      To reproduce:

      1) Create calculated question with some image in the question text.
      2) From the question bank page, click over the preview icon
      3) The question is previewed, everything looks ok, but the image is not show.

      Clicking on the image, I get this notices/warnings:

      Warning: Missing argument 7 for qtype_numerical_question::check_file_access(), called in /Users/stronk7/git_moodle/integration/question/behaviour/behaviourbase.php on line 138 and defined in /Users/stronk7/git_moodle/integration/question/type/numerical/question.php on line 244
      Call Stack
      #	Time	Memory	Function	Location
      1	0.0001	661600	{main}( )	../pluginfile.php:0
      2	0.0316	4342688	question_pluginfile( )	../pluginfile.php:658
      3	0.0384	4730952	question_preview_question_pluginfile( )	../questionlib.php:1779
      4	0.0599	5440240	question_usage_by_activity->check_file_access( )	../previewlib.php:249
      5	0.0599	5440240	question_attempt->check_file_access( )	../questionusage.php:391
      6	0.0599	5440240	question_behaviour->check_file_access( )	../questionattempt.php:745
      7	0.0599	5440288	qtype_numerical_question->check_file_access( )	../behaviourbase.php:138
       
      ( ! ) Notice: Undefined variable: qa in /Users/stronk7/git_moodle/integration/question/type/numerical/question.php on line 255
      Call Stack
      #	Time	Memory	Function	Location
      1	0.0001	661600	{main}( )	../pluginfile.php:0
      2	0.0316	4342688	question_pluginfile( )	../pluginfile.php:658
      3	0.0384	4730952	question_preview_question_pluginfile( )	../questionlib.php:1779
      4	0.0599	5440240	question_usage_by_activity->check_file_access( )	../previewlib.php:249
      5	0.0599	5440240	question_attempt->check_file_access( )	../questionusage.php:391
      6	0.0599	5440240	question_behaviour->check_file_access( )	../questionattempt.php:745
      7	0.0599	5440288	qtype_numerical_question->check_file_access( )	../behaviourbase.php:138
       
      ( ! ) Notice: Undefined variable: args in /Users/stronk7/git_moodle/integration/question/type/numerical/question.php on line 256
      Call Stack
      #	Time	Memory	Function	Location
      1	0.0001	661600	{main}( )	../pluginfile.php:0
      2	0.0316	4342688	question_pluginfile( )	../pluginfile.php:658
      3	0.0384	4730952	question_preview_question_pluginfile( )	../questionlib.php:1779
      4	0.0599	5440240	question_usage_by_activity->check_file_access( )	../previewlib.php:249
      5	0.0599	5440240	question_attempt->check_file_access( )	../questionusage.php:391
      6	0.0599	5440240	question_behaviour->check_file_access( )	../questionattempt.php:745
      7	0.0599	5440288	qtype_numerical_question->check_file_access( )	../behaviourbase.php:138
       
      ( ! ) Notice: Undefined variable: forcedownload in /Users/stronk7/git_moodle/integration/question/type/numerical/question.php on line 256
      Call Stack
      #	Time	Memory	Function	Location
      1	0.0001	661600	{main}( )	../pluginfile.php:0
      2	0.0316	4342688	question_pluginfile( )	../pluginfile.php:658
      3	0.0384	4730952	question_preview_question_pluginfile( )	../questionlib.php:1779
      4	0.0599	5440240	question_usage_by_activity->check_file_access( )	../previewlib.php:249
      5	0.0599	5440240	question_attempt->check_file_access( )	../questionusage.php:391
      6	0.0599	5440240	question_behaviour->check_file_access( )	../questionattempt.php:745
      7	0.0599	5440288	qtype_numerical_question->check_file_access( )	../behaviourbase.php:138

      Ciao

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                1/Jul/11