Moodle
  1. Moodle
  2. MDL-29216

Penalty & hints not available Cloze question type

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.2
    • Fix Version/s: 2.1.2
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      1. Create a multi-answer question, including hints and a penalty.
      2. Re-edit the question, to verify the hints were saved properly.
      3. Preview the question in interactive mode, and verify the hints are there.
      4. Export the question as Moodle XML, re-import and verify the hints came across OK.
      5. backup and restore the course and verify the hints came across OK.

      Show
      1. Create a multi-answer question, including hints and a penalty. 2. Re-edit the question, to verify the hints were saved properly. 3. Preview the question in interactive mode, and verify the hints are there. 4. Export the question as Moodle XML, re-import and verify the hints came across OK. 5. backup and restore the course and verify the hints came across OK.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      18919

      Description

      The penalty is not available on the Cloze question form.

      It is displaced lower in the form so should be added.

        Issue Links

          Activity

          Hide
          Pierre Pichet added a comment - - edited
          Show
          Pierre Pichet added a comment - - edited See also http://moodle.org/mod/forum/discuss.php?d=184566
          Hide
          Pierre Pichet added a comment -

          My first version of this bug was gecause I did not see it in the other question types as it is after the answers fields.

          Show
          Pierre Pichet added a comment - My first version of this bug was gecause I did not see it in the other question types as it is after the answers fields.
          Hide
          Pierre Pichet added a comment -

          Adding
          $this->add_interactive_settings();
          in edit_multianswer_form solve the problem by adding simultaneously the question penalty and the hints.

          The necessary commit will be created in the next days when working on MDL-26511 (Adding images in multichoice included in multianswer)

          Show
          Pierre Pichet added a comment - Adding $this->add_interactive_settings(); in edit_multianswer_form solve the problem by adding simultaneously the question penalty and the hints. The necessary commit will be created in the next days when working on MDL-26511 (Adding images in multichoice included in multianswer)
          Hide
          Tim Hunt added a comment -

          I think this simple commit should fix this, but I have only tested it a little bit. Can anyone else confirm that it is working?

          Show
          Tim Hunt added a comment - I think this simple commit should fix this, but I have only tested it a little bit. Can anyone else confirm that it is working?
          Hide
          Pierre Pichet added a comment - - edited

          In the middle of the night ...
          Test MDL-29216 version (i.e. master) and its work correctly, the hints are saved and displayed correctly and the penalty is correctly saved in the question table.
          No bug or notice displayed...

          Show
          Pierre Pichet added a comment - - edited In the middle of the night ... Test MDL-29216 version (i.e. master) and its work correctly, the hints are saved and displayed correctly and the penalty is correctly saved in the question table. No bug or notice displayed...
          Hide
          Tim Hunt added a comment -

          Thanks for testing Pierre.

          Show
          Tim Hunt added a comment - Thanks for testing Pierre.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrating, thanks!

          So both the penalty and the hits were missing, yup? Perhaps worth changing the issue title a bit?

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Integrating, thanks! So both the penalty and the hits were missing, yup? Perhaps worth changing the issue title a bit? Ciao
          Hide
          Ankit Agarwal added a comment -

          Hi,
          I Am not able to get the hint text when am exporting questions as Moodle XML format (Testing instructions #4)

          Show
          Ankit Agarwal added a comment - Hi, I Am not able to get the hint text when am exporting questions as Moodle XML format (Testing instructions #4)
          Hide
          Tim Hunt added a comment -

          Sorry, Ankit, I don't understand what you mean. What exactly are you doing, and what exactly are you seeing that is different from your expectations.

          (My view is that if everything works except XML import/export, then we leave this as integrated, and file a new bug about the regression that I fix next week. Unless it is an easy fix, in which case I can do it this week.)

          Show
          Tim Hunt added a comment - Sorry, Ankit, I don't understand what you mean. What exactly are you doing, and what exactly are you seeing that is different from your expectations. (My view is that if everything works except XML import/export, then we leave this as integrated, and file a new bug about the regression that I fix next week. Unless it is an easy fix, in which case I can do it this week.)
          Hide
          Ankit Agarwal added a comment -

          Hi Tim,
          Let me make this more clear.

          Created a Cloze question with "hint text". Exported the question as Moodle XML format.
          Imported the questions back.However there was no "hint text" in the imported questions.

          Expected:-Hint text should stay intact during XML import/exports.

          Rest things seems working to me. The only regression is XML import/export.
          Thanks

          Show
          Ankit Agarwal added a comment - Hi Tim, Let me make this more clear. Created a Cloze question with "hint text". Exported the question as Moodle XML format. Imported the questions back.However there was no "hint text" in the imported questions. Expected:-Hint text should stay intact during XML import/exports. Rest things seems working to me. The only regression is XML import/export. Thanks
          Hide
          Tim Hunt added a comment -

          Can you open the XML file in your editor and see if there are some <hint> tags there inside the chunk of the output that is the Cloze question. That will tell us if the problem is on import or export.

          Anyway, there is clearly something for me to fix here. Please could you create a new MDL issue for it. Thanks.

          Show
          Tim Hunt added a comment - Can you open the XML file in your editor and see if there are some <hint> tags there inside the chunk of the output that is the Cloze question. That will tell us if the problem is on import or export. Anyway, there is clearly something for me to fix here. Please could you create a new MDL issue for it. Thanks.
          Hide
          Ankit Agarwal added a comment -

          hint tags are not present in the exported file.

            <question type="cloze">
              <name>
          <text>cloze question (multi answer)</text>
              </name>
              <questiontext>
                <text><![CDATA[<pre>Match the following cities with the correct state:
          * San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
          * Tucson: {1:MULTICHOICE:California#Wrong~%100%Arizona#OK}
          * Los Angeles: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
          * Phoenix: {1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}
          </pre>]]></text>
              </questiontext>
              <generalfeedback>
                <text></text>
              </generalfeedback>
            </question>
          

          Will create and MDL for this.
          Thanks

          Show
          Ankit Agarwal added a comment - hint tags are not present in the exported file. <question type= "cloze" > <name> <text> cloze question (multi answer) </text> </name> <questiontext> <text> <![CDATA[<pre> Match the following cities with the correct state: * San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong} * Tucson: {1:MULTICHOICE:California#Wrong~%100%Arizona#OK} * Los Angeles: {1:MULTICHOICE:=California#OK~Arizona#Wrong} * Phoenix: {1:MULTICHOICE:%0%California#Wrong~=Arizona#OK} </pre> ]]> </text> </questiontext> <generalfeedback> <text> </text> </generalfeedback> </question> Will create and MDL for this. Thanks
          Hide
          Ankit Agarwal added a comment -

          Created MDL-29644
          Thanks

          Show
          Ankit Agarwal added a comment - Created MDL-29644 Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          I'm passing this as far as the only problem found (exporting / importing cloze questions) has been fixed and tested @ MDL-29644

          Thanks all, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - I'm passing this as far as the only problem found (exporting / importing cloze questions) has been fixed and tested @ MDL-29644 Thanks all, ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          git repositories have been updated with your awesome changes, thanks! Closing.

          Show
          Eloy Lafuente (stronk7) added a comment - git repositories have been updated with your awesome changes, thanks! Closing.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: