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

Create xAPI activity report inside mod_h5p

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      The  main internal methods have PHPUnitTesting:

      • vendor/bin/phpunit -c mod/h5pactivity

      Setup manual testing

      1. For this test you need an empty moodle instance with no users created (otherwise the restore could detect user conflicts)
      2. Login as admin and edit the user profile
        1. Change the username to "mainadmin"
        2. Change the email to "mainadmin@moodletest.com"
      3. Now that the platform has only one user which cannot collide with the backup ones it's time to proceed with the restore
      4. Download and restore the provided course backup with all activities and enrolments (mbz file: MDL-67791_testing_scenario_v6.mbz)
        1. Check that this creates a user called "teststudent"
        2. Check that the new course is full of H5P activities like the screenshot 
      5. Change the "teststudent" password and remember it, you will need to navigate this course.

      Test 1: Reports navigation as teacher

      1. Acces the course as admin and go to the first H5P activity called "H5P navigation test"
        1. Check that a link "View all attempts (2 submitted)" appears under the cog menu.
      2. Click on that link to access the reports
        1. Check that you see a participants list like the screenshot 
      3. Now click on the "100%" link in the score column of the table
        1. Check that you see a results report like the screenshot  
      4. Go back to the participants report using the "Attempts link" in the navbar
      5. Click on "View user attempts (2)" in the Attempts column of the table
        1. Check that you see something like the screenshot 
      6. Go back to the activity using the link "H5P navigation test" on the navbar
      7. Open the cog menu and go to "Edit settings"
      8. Modify the "Attempt grading method" on the "Attempts options" and set the value to "Use average attempt result for grading"
      9. Click on Save and display
      10. Once loaded, click on "View all attempts (2 submitted)" link
        1. Check that the score column from Testing Student is now 67% and is not a link anymore.
      11. Click on "View user attempts (2)" on the Attempts column.
        1. Check that now only the "All users attempts" table appears and the "Highest score attempts" have disappeared 

       

      Test 2: report navigation as student

      1. Login as "teststudent" and go in the "H5P navigation test" in the course
        1. Check that you see a link "View my attempts" floating on the right over the H5P content
      2. Click on "View my attempts"
        1. Check that you see a report like the screenshot 
        2. Check that the last element of the navbar is "My attempts"
      3. Click on the second "view report" (the one with a score 6)
        1. Check that you see a report like the screenshot  

      Test 3: results validation

      The course tipic "H5P packages with tracking" is full of H5P activities and, under everyone, an image resource of what it's expected. All of them have some attempts from this user. The objective of this test is validate that all result reports are OK.

      This test will be repeated for every H5P activity on this topic and the test is the same for every activity.

      1. Still as "teststudent" go back to the course.
      2. Acces the H5P activity (for example "Arithmetic quiz")
      3. Click on the "View my attempts" link
      4. Click on the "View report" on the "Highest score attempt" table
        1. Check that the report is like the screenshot which is under the H5P activity (in the example the one called "Arithmetic quiz expected")
      Show
      The  main internal methods have PHPUnitTesting: vendor/bin/phpunit -c mod/h5pactivity Setup manual testing For this test you need an empty moodle instance with no users created (otherwise the restore could detect user conflicts) Login as admin and edit the user profile Change the username to "mainadmin" Change the email to "mainadmin@moodletest.com" Now that the platform has only one user which cannot collide with the backup ones it's time to proceed with the restore Download and restore the provided course backup with all activities and enrolments (mbz file: MDL-67791_testing_scenario_v6.mbz ) Check that this creates a user called "teststudent" Check that the new course is full of H5P activities like the screenshot  Change the "teststudent" password and remember it, you will need to navigate this course. Test 1: Reports navigation as teacher Acces the course as admin and go to the first H5P activity called "H5P navigation test" Check that a link "View all attempts (2 submitted)" appears under the cog menu. Click on that link to access the reports Check that you see a participants list like the screenshot  Now click on the "100%" link in the score column of the table Check that you see a results report like the screenshot   Go back to the participants report using the "Attempts link" in the navbar Click on "View user attempts (2)" in the Attempts column of the table Check that you see something like the screenshot  Go back to the activity using the link "H5P navigation test" on the navbar Open the cog menu and go to "Edit settings" Modify the "Attempt grading method" on the "Attempts options" and set the value to "Use average attempt result for grading" Click on Save and display Once loaded, click on "View all attempts (2 submitted)" link Check that the score column from Testing Student is now 67% and is not a link anymore. Click on "View user attempts (2)" on the Attempts column. Check that now only the "All users attempts" table appears and the "Highest score attempts" have disappeared    Test 2: report navigation as student Login as "teststudent" and go in the "H5P navigation test" in the course Check that you see a link "View my attempts" floating on the right over the H5P content Click on "View my attempts" Check that you see a report like the screenshot  Check that the last element of the navbar is "My attempts" Click on the second "view report" (the one with a score 6) Check that you see a report like the screenshot   Test 3: results validation The course tipic "H5P packages with tracking" is full of H5P activities and, under everyone, an image resource of what it's expected. All of them have some attempts from this user. The objective of this test is validate that all result reports are OK. This test will be repeated for every H5P activity on this topic and the test is the same for every activity. Still as "teststudent" go back to the course. Acces the H5P activity (for example "Arithmetic quiz") Click on the "View my attempts" link Click on the "View report" on the "Highest score attempt" table Check that the report is like the screenshot which is under the H5P activity (in the example the one called "Arithmetic quiz expected")
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
      MDL-67791-master

      Description

      Add the possibility to show a report on the xAPI statements reported to a specific mod_h5p activity.

      This issue include:

      • Add a attempts view in the mod_h5p
      • Display the log data from the xAPI statement posted by a specific attempt
      • Add behat test for this features

        Attachments

        1. 072_attempts_report_student.png
          072_attempts_report_student.png
          45 kB
        2. 072_participants_report_teacher.png
          072_participants_report_teacher.png
          49 kB
        3. 073_results_report_student.png
          073_results_report_student.png
          72 kB
        4. 073_results_report_teacher.png
          073_results_report_teacher.png
          72 kB
        5. 074_attempts_results_teacher.png
          074_attempts_results_teacher.png
          64 kB
        6. 075_attempts_results_teacher_2.png
          075_attempts_results_teacher_2.png
          47 kB
        7. attempt_report_header.jpg
          attempt_report_header.jpg
          35 kB
        8. h5p-outcome.png
          h5p-outcome.png
          45 kB
        9. incorrect_answer.png
          incorrect_answer.png
          31 kB
        10. Manual Set up.png
          Manual Set up.png
          90 kB
        11. MDL-67791_testing_scenario_v6.mbz
          17.34 MB
        12. screenshot_018.png
          screenshot_018.png
          75 kB
        13. screenshot_019.png
          screenshot_019.png
          78 kB
        14. Suggested UI changes.jpeg
          Suggested UI changes.jpeg
          97 kB
        15. Suggested UI changes quick visual guide.jpeg
          Suggested UI changes quick visual guide.jpeg
          155 kB
        16. test_scenario.png
          test_scenario.png
          214 kB
        17. TEST1.png
          TEST1.png
          259 kB
        18. TEST2.png
          TEST2.png
          117 kB
        19. TEST3.PNG
          TEST3.PNG
          29 kB
        20. unknown-success-state.png
          unknown-success-state.png
          95 kB

          Issue Links

            Activity

              People

              Assignee:
              tusefomal Ferran Recio
              Reporter:
              tusefomal Ferran Recio
              Peer reviewer:
              Carlos Escobedo
              Integrator:
              Adrian Greeve
              Tester:
              Gladys Basiana
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

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

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 4 days, 2 hours, 15 minutes
                  1w 4d 2h 15m