Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.7, 2.2.4, 2.3.1
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      1. Import the question/format/examview/tests/fixtures/questions.examview.xml file into the question bank. Verify that there are no errors during import.

      2. Preview the 6 imported questions, and make sure they work as they should.

      3. 6 questions should be imported :
      a. A true/false question with text "This is a T/F question. Tim and Jean-Michael are great people." Good answer : True Feedback for the response 'True' : "Correct", Feedback for the response 'False' : "Incorrect" (Sorry I didn't write this question ! )
      b. A multichoice question with text "This is an example of a multiple choice question. This is only an ________". One answer only (shuffle should be set to the default) and 4 choices "example" (100%, feedback : "Correct"), "the real thing" (0%, feedback : "Incorrect"), "a true false question" (0%, feedback : "Incorrect"), "none of these" (0%, feedback : "Incorrect").
      c. A numerical question with text "This is a numeric response question. How much is 12 * 2?". Answer : 24 Grade : 100% Accepted error : 0. Unit handling : unit are not used at all
      d. A match question with text "This is a matching question type." and 3 subquestions : question 1 "This is question 1." answer : "Question 1", question 2 "This is question 2." answer : "Question 2", question 3 "This is question 3." answer : "Question 3". note : there should be a fourth subquestion with empty question and just an answer "Question 4" but currently such subquestions are not imported correctly. This default was already present in Moodle 1.9 and will need to be corrected later. My proposal is for the moment to pass the test if the 3 first subquestions are imported correctly (as it was in Moodle 1.9)
      e. A shortanswer question with text "This is a short answer question. This is a ___________ answer question.", case sensitivity set as default, answer 1 : "short" garde 100%, feedback : "Correct"
      f; An essay question with text "This is an essay question. I am not sure if an answer is needed." response format : HTML, 15 lines no attachments and instructions for graders "This is the answer in Examview. I am curious to see how this shows in Moodle." in HTML format.
      Note : for each question the name of the question is derivated from the question text as Examview don't provide a name.

      Show
      1. Import the question/format/examview/tests/fixtures/questions.examview.xml file into the question bank. Verify that there are no errors during import. 2. Preview the 6 imported questions, and make sure they work as they should. 3. 6 questions should be imported : a. A true/false question with text "This is a T/F question. Tim and Jean-Michael are great people." Good answer : True Feedback for the response 'True' : "Correct", Feedback for the response 'False' : "Incorrect" (Sorry I didn't write this question ! ) b. A multichoice question with text "This is an example of a multiple choice question. This is only an ________". One answer only (shuffle should be set to the default) and 4 choices "example" (100%, feedback : "Correct"), "the real thing" (0%, feedback : "Incorrect"), "a true false question" (0%, feedback : "Incorrect"), "none of these" (0%, feedback : "Incorrect"). c. A numerical question with text "This is a numeric response question. How much is 12 * 2?". Answer : 24 Grade : 100% Accepted error : 0. Unit handling : unit are not used at all d. A match question with text "This is a matching question type." and 3 subquestions : question 1 "This is question 1." answer : "Question 1", question 2 "This is question 2." answer : "Question 2", question 3 "This is question 3." answer : "Question 3". note : there should be a fourth subquestion with empty question and just an answer "Question 4" but currently such subquestions are not imported correctly. This default was already present in Moodle 1.9 and will need to be corrected later. My proposal is for the moment to pass the test if the 3 first subquestions are imported correctly (as it was in Moodle 1.9) e. A shortanswer question with text "This is a short answer question. This is a ___________ answer question.", case sensitivity set as default, answer 1 : "short" garde 100%, feedback : "Correct" f; An essay question with text "This is an essay question. I am not sure if an answer is needed." response format : HTML, 15 lines no attachments and instructions for graders "This is the answer in Examview. I am curious to see how this shows in Moodle." in HTML format. Note : for each question the name of the question is derivated from the question text as Examview don't provide a name.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      42900

      Description

      This format is, apparently, important to many American teachers. Changes since 1.9 have left it broken. Jean-Michel Vedrine has now come up with a patch that basically fixes it. See http://moodle.org/mod/forum/discuss.php?d=207425#p904510

      I have created this issue for getting those fixes into Moodle

      1. examview_example.xml
        6 kB
        Jean-Michel Vedrine
      2. examview_fix2.patch
        3 kB
        Jean-Michel Vedrine
      3. ExamView Pro - Moodle.pdf
        8 kB
        Jean-Michel Vedrine

        Issue Links

          Activity

          Hide
          Tim Hunt added a comment -

          I have taken Jean-Michel's changes and made them in to git commits.

          I have reviewed the changes, and they look good to me.

          Before this can be submitted for integration, we need:

          1. Someone to upload an example Examview file that we can use to test this.

          2. Jean-Michel, can you confirm that I have not messed anything up when I made your changes into a git branch.

          Show
          Tim Hunt added a comment - I have taken Jean-Michel's changes and made them in to git commits. I have reviewed the changes, and they look good to me. Before this can be submitted for integration, we need: 1. Someone to upload an example Examview file that we can use to test this. 2. Jean-Michel, can you confirm that I have not messed anything up when I made your changes into a git branch.
          Hide
          Tim Hunt added a comment -

          Just moving this into peer-review state.

          Show
          Tim Hunt added a comment - Just moving this into peer-review state.
          Hide
          Jean-Michel Vedrine added a comment -

          I checked and your git branch is identical to my local file.
          I will ask Rick in the forum to create an example file as he already has Examview 4 running. I think it would be interesting to have at least one question of each type this format can import : truefalse, multichoice, shortanswer, match, numerical, essay

          Show
          Jean-Michel Vedrine added a comment - I checked and your git branch is identical to my local file. I will ask Rick in the forum to create an example file as he already has Examview 4 running. I think it would be interesting to have at least one question of each type this format can import : truefalse, multichoice, shortanswer, match, numerical, essay
          Hide
          Tim Hunt added a comment -

          Thanks Jean-Michel. I will submit this for integration next week. Of course, the integrators will probably reject this if we have not attached a test file before then.

          Show
          Tim Hunt added a comment - Thanks Jean-Michel. I will submit this for integration next week. Of course, the integrators will probably reject this if we have not attached a test file before then.
          Hide
          Aparup Banerjee added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Aparup Banerjee added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Tim Hunt added a comment -

          Rebase done.

          Show
          Tim Hunt added a comment - Rebase done.
          Hide
          Jean-Michel Vedrine added a comment -

          Hello,
          I have added an example file done by Rick Jerz named "examview_example.xml". This file contains one question of each 6 types the format is now able to import : multichoice, match, numeric, shortanswer, essay, truefalse.
          To be imported cleanly these 6 questions need additionnal fixes so sorry Tim, you will have to add one more commit to each branch !
          I have provided a new diff file including just the new changes needed. Name : examview_fix3.
          Detail of the new fixes

          • fixed object created from empty value warning
          • fixed tolerance field not initialized correctly for numeric questions
          • fixed several fields not initialized correctly for essay questions : graderinfo, responseformat, rsponsefieldlines
          • fixed a problem in matching question : subquestions text was not inported corectly
          • but having Rick example file has also permitted to fix a confusion between essay and shortanswer questions that was present for ages in the format : shortansers were imported as essay and essay were not imported at all. Now examview type "es" is correctly mapped to ESSAY and "sa" to SHORTANSWER !!
            Thanks a lot Rick.
          Show
          Jean-Michel Vedrine added a comment - Hello, I have added an example file done by Rick Jerz named "examview_example.xml". This file contains one question of each 6 types the format is now able to import : multichoice, match, numeric, shortanswer, essay, truefalse. To be imported cleanly these 6 questions need additionnal fixes so sorry Tim, you will have to add one more commit to each branch ! I have provided a new diff file including just the new changes needed. Name : examview_fix3. Detail of the new fixes fixed object created from empty value warning fixed tolerance field not initialized correctly for numeric questions fixed several fields not initialized correctly for essay questions : graderinfo, responseformat, rsponsefieldlines fixed a problem in matching question : subquestions text was not inported corectly but having Rick example file has also permitted to fix a confusion between essay and shortanswer questions that was present for ages in the format : shortansers were imported as essay and essay were not imported at all. Now examview type "es" is correctly mapped to ESSAY and "sa" to SHORTANSWER !! Thanks a lot Rick.
          Hide
          Jean-Michel Vedrine added a comment -

          Examview example file provided by Rick and new fixes diff file to be commited.

          Show
          Jean-Michel Vedrine added a comment - Examview example file provided by Rick and new fixes diff file to be commited.
          Hide
          Jean-Michel Vedrine added a comment -

          To help integrators testing I add a pdf of the printed output by Examview that show the 6 questions of the example file and their right answers.

          Show
          Jean-Michel Vedrine added a comment - To help integrators testing I add a pdf of the printed output by Examview that show the 6 questions of the example file and their right answers.
          Hide
          Tim Hunt added a comment -

          Thanks Jean-Michel, I will process the extra patch tomorrow.

          Show
          Tim Hunt added a comment - Thanks Jean-Michel, I will process the extra patch tomorrow.
          Hide
          Tim Hunt added a comment -

          OK, extra commit created. Also, I added the test file in tests/fixtures (like with GIFT) so we never find ourselves stuck without test data in future.

          Show
          Tim Hunt added a comment - OK, extra commit created. Also, I added the test file in tests/fixtures (like with GIFT) so we never find ourselves stuck without test data in future.
          Hide
          Dan Poltawski added a comment -

          I'm holding this from integration just at the moment because it will introduce whitespace errors from the XML file and this will make our whitespace integration tests fail, and the world will burn up (it'll stop the rest of the tests running succesfully).

          I need to talk to Eloy about adding it to the list of files we whitespace on (assuming .xml files aren't already ignored).

          BTW I suppose the test instructions can now use the fixture file? Can we make this this unit testable?

          Show
          Dan Poltawski added a comment - I'm holding this from integration just at the moment because it will introduce whitespace errors from the XML file and this will make our whitespace integration tests fail, and the world will burn up (it'll stop the rest of the tests running succesfully). I need to talk to Eloy about adding it to the list of files we whitespace on (assuming .xml files aren't already ignored). BTW I suppose the test instructions can now use the fixture file? Can we make this this unit testable?
          Hide
          Jean-Michel Vedrine added a comment -

          Hello Dan,
          Yes I will rewrite the testing instructions to make clear that the tester should use the fixture file and what is the expected result for the 6 included questions.
          My intention is also to add some phpunit tests now that I have phpunit working but unfortunately I didn't find the time to write the tests (as I am only starting to use phpunit I am rather slow at writting tests).
          Presently unfortunately no question import format include phpunit tests except gift and Moodle xml, surely it would be good that each format include phpunit tests but this will require some time to acheive.

          Show
          Jean-Michel Vedrine added a comment - Hello Dan, Yes I will rewrite the testing instructions to make clear that the tester should use the fixture file and what is the expected result for the 6 included questions. My intention is also to add some phpunit tests now that I have phpunit working but unfortunately I didn't find the time to write the tests (as I am only starting to use phpunit I am rather slow at writting tests). Presently unfortunately no question import format include phpunit tests except gift and Moodle xml, surely it would be good that each format include phpunit tests but this will require some time to acheive.
          Hide
          Jean-Michel Vedrine added a comment -

          Maybe it would be possible to correct the whitespaces problem in the xml file and consider that this doesn't change the test even if the file is altered and is no more a "true" examview file ? I don't know Tim's opinion on this subject, but I suppose that I will have to deal with this whitespace problem when I will include xml fragments in my phpunit tests.
          This will in fact be a problem for all import formats that deal with files produced by softwares external to Moodle. For gift and Moodle XML formats this problem wasn't present as these 2 formats are Moodle creations so they respect "Moodle rules".

          Show
          Jean-Michel Vedrine added a comment - Maybe it would be possible to correct the whitespaces problem in the xml file and consider that this doesn't change the test even if the file is altered and is no more a "true" examview file ? I don't know Tim's opinion on this subject, but I suppose that I will have to deal with this whitespace problem when I will include xml fragments in my phpunit tests. This will in fact be a problem for all import formats that deal with files produced by softwares external to Moodle. For gift and Moodle XML formats this problem wasn't present as these 2 formats are Moodle creations so they respect "Moodle rules".
          Hide
          Tim Hunt added a comment -

          I will try cleaning up the whitespace in that XML file, and amend the commit. XML parsing tends to be pretty tolerant of whitespace changes.

          Yes, unit tests would be good, but their lack should not prevent us from getting this fix in. This bug is causing pain for many US teachers. What we have here is an enormous improvement over the totally broken state this plugin was in. We need to get it out there, and work on polishing later.

          Show
          Tim Hunt added a comment - I will try cleaning up the whitespace in that XML file, and amend the commit. XML parsing tends to be pretty tolerant of whitespace changes. Yes, unit tests would be good, but their lack should not prevent us from getting this fix in. This bug is causing pain for many US teachers. What we have here is an enormous improvement over the totally broken state this plugin was in. We need to get it out there, and work on polishing later.
          Hide
          Dan Poltawski added a comment -

          I will try cleaning up the whitespace in that XML file, and amend the commit. XML parsing tends to be pretty tolerant of whitespace changes.

          Thanks.

          Yes, unit tests would be good, but their lack should not prevent us from getting this fix in.

          Agreed, I was not suggesting anything different.

          Show
          Dan Poltawski added a comment - I will try cleaning up the whitespace in that XML file, and amend the commit. XML parsing tends to be pretty tolerant of whitespace changes. Thanks. Yes, unit tests would be good, but their lack should not prevent us from getting this fix in. Agreed, I was not suggesting anything different.
          Hide
          Tim Hunt added a comment -

          The only white-space error I could see was lots of tabs. I replaced them all with 4 spaces. That should not cause problems, and should be enough to keep the checker happy.

          Show
          Tim Hunt added a comment - The only white-space error I could see was lots of tabs. I replaced them all with 4 spaces. That should not cause problems, and should be enough to keep the checker happy.
          Hide
          Dan Poltawski added a comment -

          Thanks Jean-Michel and Tim, i've integrated this now.

          As noted it'd be great to have unit tests for this in the future

          Show
          Dan Poltawski added a comment - Thanks Jean-Michel and Tim, i've integrated this now. As noted it'd be great to have unit tests for this in the future
          Hide
          David Monllaó added a comment -

          Passes. Tested both in MOODLE_22_STABLE and master

          Show
          David Monllaó added a comment - Passes. Tested both in MOODLE_22_STABLE and master
          Hide
          Dan Poltawski added a comment -

          asko, Дзякуй, ধন্যবাদ, Благодаря, Gràcies, 感谢, 謝謝, Hvala, Díky, Tak, Bedankt, Tänan, متشکریم, Salamat, Kiitokset, Merci, Grazas, Danke, Ευχαριστώ, આભાર, תודה, धन्यवाद, Köszönjük, Takk fyrir, Terima Kasih, Grazie, ありがとうございます, Рахмет, សូមអរគុណ, 감사합니다, gratiās, Pateicamies, Ačiū, Благодарам, Tēnā koa, Kia Ora Rawa Atu, आभारी आहोत, Талархал, Takk, Dziękuję, Obrigado, Mulţumesc, Engraziel, Спасибо, Fa'afetai, Хвала, Hvala, ස්තූතියි, Vďaka, Hvala, Mahadsanid, Thanks, Gracias, Tack, Salamat, நன்றி, నెనరులు, ขอบคุณค่ะ!

          Your work has made it into this weeks Moodle release! There are no gold medals available this week - but millions around the world will benefit. Thank you!

          Show
          Dan Poltawski added a comment - asko, Дзякуй, ধন্যবাদ, Благодаря, Gràcies, 感谢, 謝謝, Hvala, Díky, Tak, Bedankt, Tänan, متشکریم, Salamat, Kiitokset, Merci, Grazas, Danke, Ευχαριστώ, આભાર, תודה, धन्यवाद, Köszönjük, Takk fyrir, Terima Kasih, Grazie, ありがとうございます, Рахмет, សូមអរគុណ, 감사합니다, gratiās, Pateicamies, Ačiū, Благодарам, Tēnā koa, Kia Ora Rawa Atu, आभारी आहोत, Талархал, Takk, Dziękuję, Obrigado, Mulţumesc, Engraziel, Спасибо, Fa'afetai, Хвала, Hvala, ස්තූතියි, Vďaka, Hvala, Mahadsanid, Thanks, Gracias, Tack, Salamat, நன்றி, నెనరులు, ขอบคุณค่ะ! Your work has made it into this weeks Moodle release! There are no gold medals available this week - but millions around the world will benefit. Thank you!

            People

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

              Dates

              • Created:
                Updated:
                Resolved: