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

Add xAPI result support on mod_h5pactivity

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      All new classes are covered by PHPunitests:

      vendor/bin/phpunit -c mod/h5pactivity/

      Manual Testing 1 (activity creation form)

      1. Create a course and a user and enrol it as student
      2. Activate edition in the course and create a new H5P activity. One in the form:
        1. Set the activity name to "H5P quiz"
        2. In "Package File" upload the provided H5P (file: question-set-616.h5p)
        3. Expand "Grade and "Attempt" configurations
          1. Check that Grade "type" is set to "Point" by default
          2. Check that Attempts options "Enable attempt tracking" is enabled by default
          3. Check that Attempt grading method is set to "highest attempt" by default
        4. Change grade "type" to "none"
          1. Check that "Attempt grading method" gets disabled
        5. Change grade "type" to "scale"
          1. Check that "Attempt grading method" still disabled
        6. Set again grade "type" to "point"
          1. Check that "Attempt grading method" get enabled again
        7. Set "Enable attempt tracking" to No
          1. Check that "Attempt grading method" disappears
        8. Put again "Enable attempt tracking" to Yes
          1. Check that "Attempt grading method" appears
        9. Click on "Save and display"
      3. Check that the H5P content appears like the image

       

      Manual Testing 2 (Point highest grading)

      1. Login as a student and go to the H5P activity created in the previous test.
      2. Access the H5P activity and do one attempt with this answers:
        1. Which of the berries listed below are berries you can pick in the wild? check "Halle Berry" and "Cocktail cherry"
        2. Drag and drop: from left to right drag the first image to "Blueberry", the second to "Redcurrant" ans the third to "Cloudberry" (like the image attached   )
        3. Which one of the following berries are red? select "Cranberries"
        4. Click on "Finish" button.
        5. Check that your result is 2/6 and a message "Oh, no! This didn't go so well" appears.
      3. Click on the "Retry" button to start a new attempt with the following answers:
        1. Which of the berries listed below are berries you can pick in the wild? check "Blueberry", "Strawberry", "Raspberry" and "Cloudberry".
        2. Drag and drop: from left to right drag the first image to "Blueberry", the second to "Redcurrant" ans the third to "Cloudberry" (the same as the image attached before)
        3. Which one of the following berries are red? select "Cranberries"
        4. Click on "Finish" button.
        5. Check that your result is 6/6 and a message "Congratulation! You did very well!" appears.
      4. Click on the "Retry" button again to start a third attempt with the following answers:
        1. Which of the berries listed below are berries you can pick in the wild? check "Strawberry", "Raspberry" and "Cloudberry".
        2. Drag and drop: from left to right drag the first image to "Blueberry", the second to "Redcurrant" ans the third to "Cloudberry" (the same as the image attached before)
        3. Which one of the following berries are red? select "Cranberries"
        4. Click on "Finish" button.
        5. Check that your result is 5/6 and a message "Congratulation! You did very well!" appears.
      5. Login as admin in the course and go to the grade book
        1. Check that the student grade on the activity is 100.

      Manual testing 3 (change grading method)

      1. With the same scenario as the previous test, login as admin and go to the course where you create the H5P activity
      2. Acces the H5P activity and on the cog menú go to "Edit settings"
      3. In attempt options change the attempt grading method to "average attempt" and click on "Save and return to course"
      4. Go to the gradebook:
        1. Check that the student have a grade of 77.22
      5. Edit again the activity settings and change the attempt grading method to "Last attempt" and click on "Save and return to course"
      6. Go to the gradebook:
        1. Check that the student have a grade of 83.33
      7. Edit again the activity settings and change the attempt grading method to "First attempt" and click on "Save and return to course"
      8. Go to the gradebook:
        1. Check that the student have a grade of 33.33
      9. Edit again the activity settings and change the attempt grading method to "Don't calculate grade" and click on "Save and return to course"
      10. Go to the gradebook:
        1. Check that the student still have a grade of - (empty grade)
      11. Edit again the activity settings and change the attempt grading method to "highest attempt" and click on "Save and return to course"
        1. Check that the student still have a grade of 100

       Manual testing 4 (regrade)

      1. Continuing in the course of the previous scenario edit the activity settings.
      2. Open Grade form:
        1. check that  a message "Some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades." is present
      3. In "Rescale existing grades" set to "Yes"
      4. Set "Maximum grade" to 50
      5. Submit the form
      6. Go to gradebook
        1. Check that the student have a grade of 50
      7. Go to the activity settings and now set:
        1. In "Rescale existing grades" set to "No"
        2. Set "Maximum grade" to 80
        3. Submit the form
      8. Go to the gradebook
        1. Check that the student still have a grade of 50 (no reagrade has been done)
      9. Go to the activity settings and now set:
        1. In "Rescale existing grades" set to "Yes"
        2. Set "Maximum grade" to 100
        3. Submit the form
      10. Go to the gradebook
        1. Check that the student still have a grade of 100
      Show
      All new classes are covered by PHPunitests: vendor/bin/phpunit -c mod/h5pactivity/ Manual Testing 1 (activity creation form) Create a course and a user and enrol it as student Activate edition in the course and create a new H5P activity. One in the form: Set the activity name to "H5P quiz" In "Package File" upload the provided H5P (file: question-set-616.h5p ) Expand "Grade and "Attempt" configurations Check that Grade "type" is set to "Point" by default Check that Attempts options "Enable attempt tracking" is enabled by default Check that Attempt grading method is set to "highest attempt" by default Change grade "type" to "none" Check that "Attempt grading method" gets disabled Change grade "type" to "scale" Check that "Attempt grading method" still disabled Set again grade "type" to "point" Check that "Attempt grading method" get enabled again Set "Enable attempt tracking" to No Check that "Attempt grading method" disappears Put again "Enable attempt tracking" to Yes Check that "Attempt grading method" appears Click on "Save and display" Check that the H5P content appears like the image   Manual Testing 2 (Point highest grading) Login as a student and go to the H5P activity created in the previous test. Access the H5P activity and do one attempt with this answers: Which of the berries listed below are berries you can pick in the wild? check "Halle Berry" and "Cocktail cherry" Drag and drop: from left to right drag the first image to "Blueberry", the second to "Redcurrant" ans the third to "Cloudberry" (like the image attached   ) Which one of the following berries are red? select "Cranberries" Click on "Finish" button. Check  that your result is 2/6 and a message "Oh, no! This didn't go so well" appears. Click on the "Retry" button to start a new attempt with the following answers: Which of the berries listed below are berries you can pick in the wild? check "Blueberry", "Strawberry", "Raspberry" and "Cloudberry". Drag and drop: from left to right drag the first image to "Blueberry", the second to "Redcurrant" ans the third to "Cloudberry" (the same as the image attached before) Which one of the following berries are red? select "Cranberries" Click on "Finish" button. Check  that your result is 6/6 and a message "Congratulation! You did very well!" appears. Click on the "Retry" button again to start a third attempt with the following answers: Which of the berries listed below are berries you can pick in the wild? check "Strawberry", "Raspberry" and "Cloudberry". Drag and drop: from left to right drag the first image to "Blueberry", the second to "Redcurrant" ans the third to "Cloudberry" (the same as the image attached before) Which one of the following berries are red? select "Cranberries" Click on "Finish" button. Check  that your result is 5/6 and a message "Congratulation! You did very well!" appears. Login as admin in the course and go to the grade book Check that the student grade on the activity is 100. Manual testing 3 (change grading method) With the same scenario as the previous test, login as admin and go to the course where you create the H5P activity Acces the H5P activity and on the cog menú go to "Edit settings" In attempt options change the attempt grading method to "average attempt" and click on "Save and return to course" Go to the gradebook: Check that the student have a grade of 77.22 Edit again the activity settings and change the attempt grading method to "Last attempt" and click on "Save and return to course" Go to the gradebook: Check that the student have a grade of 83.33 Edit again the activity settings and change the attempt grading method to "First attempt" and click on "Save and return to course" Go to the gradebook: Check that the student have a grade of 33.33 Edit again the activity settings and change the attempt grading method to "Don't calculate grade" and click on "Save and return to course" Go to the gradebook: Check that the student still have a grade of - (empty grade) Edit again the activity settings and change the attempt grading method to "highest attempt" and click on "Save and return to course" Check that the student still have a grade of 100  Manual testing 4 (regrade) Continuing in the course of the previous scenario edit the activity settings. Open Grade form: check that  a message "Some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades." is present In "Rescale existing grades" set to "Yes" Set "Maximum grade" to 50 Submit the form Go to gradebook Check that the student have a grade of 50 Go to the activity settings and now set: In "Rescale existing grades" set to "No" Set "Maximum grade" to 80 Submit the form Go to the gradebook Check that the student still have a grade of 50 (no reagrade has been done) Go to the activity settings and now set: In "Rescale existing grades" set to "Yes" Set "Maximum grade" to 100 Submit the form Go to the gradebook Check that the student still have a grade of 100
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
      MDL-68241-master

      Description

      Once the mod_h5pactivity accepts tracking information, the xAPI result in statement must be converted and stored in the gradebook.

        Attachments

        1. Selección_055.png
          Selección_055.png
          297 kB
        2. Selección_052.png
          Selección_052.png
          403 kB
        3. question-set-616.h5p
          2.92 MB
        4. MDL-68241 (3).jpg
          MDL-68241 (3).jpg
          35 kB
        5. MDL-68241 (2).jpg
          MDL-68241 (2).jpg
          69 kB
        6. MDL-68241.jpg
          MDL-68241.jpg
          71 kB
        7. attemptsoptions.png
          attemptsoptions.png
          54 kB

          Issue Links

            Activity

              People

              Assignee:
              tusefomal Ferran Recio
              Reporter:
              tusefomal Ferran Recio
              Peer reviewer:
              Carlos Escobedo
              Integrator:
              Sara Arjona (@sarjona)
              Tester:
              Anna Carissa Sadia
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jun/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 3 days, 35 minutes
                  1w 3d 35m