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

Add xAPI statement support to mod_h5p

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Waiting for integration review
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9
    • Fix Version/s: None
    • Component/s: Module: H5P
    • Labels:
    • Testing Instructions:
      Hide

      Automated testings

      All new features classes have their own test:

      Manual Testing

      In the near future this plugin will provide a report to list attempts and tracking information. For now the test require to look at the DB to check the tracking information.

      Setup test:

      1. Check in your DB that your h5pactivity_attemps and h5pactivity_attempts_results are empty.
      2. If they are not empty delete all content (should not happen but if it's the second time you test this issue could be)

      Manual test:

      1. Create a course with a H5P activity on it with the H5P attached in this issue (question-set-616.h5p).
      2. Enrol a student and access to the activity as this student
      3. Complete one attempt (3 questions, doesn't matter if you pass or fail)
      4. Remember your result and click on "Retry" 
      5. Repeat the attempt and remember the new result also (if possible, change some answer to generate different results)
      6. Once both attempts are done login as admin in the course and go "course administration -> reports -> logs" and show all today logs from the student.
      7. Check that 1 "H5P content viewed" and 8 xAPI statement received log entries appears.
      8. Now go to the DB select all rows from h5pactivity_attempts and:
        1. Check 2 attempts have been created with the student "userid"
        2. Check that the "rawscore" corresponds to both results you obtain.
      9. Now select all rows from h5pactivity_attempts_results and:
        1. Check that there are 4 rows with one attemptid and 4 with another (corresponding with the ids from h5pactivity_attempts)
        2. Check that on the rows from one attemptid the "interactiontype" are: 1 compound, 2 choice, 1 matching
        3. Check that only the rows with "compound" interactiontype have an empty "response" and "correctpattern".
      10. Go to the course and go to "course administration -> reset course"
        1. Check that in the form appears a header called "H5P activities" and inside it there's a unchecked element called "Delete all H5P attempts"
        2. Click on "Select default" at the end of the form.
        3. Check that "Delete all H5P attempts" is now checked
      11. Now click on "reset course"
        1. Check that no errors or warning appears and "Delete all H5P attempts" displays an OK.
        2. Check that both h5pactivity_attemps and h5pactivity_attempts_results are empty in the DB

       

      Show
      Automated testings All new features classes have their own test: PHPUnitTests: vendor/bin/phpunit -c mod/h5pactivity  https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/773/ Behat: execute behat with --tags=@mod_h5pactivity  https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/5238/ Manual Testing In the near future this plugin will provide a report to list attempts and tracking information. For now the test require to look at the DB to check the tracking information. Setup test: Check in your DB that your h5pactivity_attemps and h5pactivity_attempts_results are empty. If they are not empty delete all content (should not happen but if it's the second time you test this issue could be) Manual test: Create a course with a H5P activity on it with the H5P attached in this issue ( question-set-616.h5p ). Enrol a student and access to the activity as this student Complete one attempt (3 questions, doesn't matter if you pass or fail) Remember your result and click on "Retry"  Repeat the attempt and remember the new result also (if possible, change some answer to generate different results) Once both attempts are done login as admin in the course and go "course administration -> reports -> logs" and show all today logs from the student. Check that 1 "H5P content viewed" and 8 xAPI statement received log entries appears . Now go to the DB select all rows from h5pactivity_attempts and: Check 2 attempts have been created with the student "userid" Check that the "rawscore" corresponds to both results you obtain. Now select all rows from h5pactivity_attempts_results and: Check that there are 4 rows with one attemptid and 4 with another (corresponding with the ids from h5pactivity_attempts) Check that on the rows from one attemptid the "interactiontype" are: 1 compound, 2 choice, 1 matching Check that only the rows with "compound" interactiontype have an empty "response" and "correctpattern". Go to the course and go to "course administration -> reset course" Check that in the form appears a header called "H5P activities" and inside it there's a unchecked element called "Delete all H5P attempts" Click on "Select default" at the end of the form. Check that "Delete all H5P attempts" is now checked Now click on "reset course" Check that no errors or warning appears and "Delete all H5P attempts" displays an OK. Check that both h5pactivity_attemps and h5pactivity_attempts_results are empty in the DB  
    • Affected Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
      MDL-67788-master
    • Sprint:
      Moodle 3.9 - Moppies Kanban

      Description

      Implement the required classes to use xAPI statement post inside mod_h5p.

      This implementation requires:

      • Implement the extension of xapi_statement_base as \mod_h5p\xapi_handler class which override:
        • statement_to_event: convert a xAPI statement to a mod_h5p event (plus programming that event)
      • Add xAPI LRS URL to mod_h5p player and implement the JS method to send xAPI statements from the H5P content
      • Code behat tests

       

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 weeks, 1 day, 2 hours, 30 minutes
                  3w 1d 2h 30m