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

Create a new H5P activity

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      1. Automatic testing

      1. PHPUnit Test: mod/h5pactivity/tests/events_test.php
      2. PHPUnit Test: mod/h5pactivity/tests/generator_test.php
      3. PHPUnit Test: mod/h5pactivity/tests/h5pactivity_test.php
      4. Behat: --tags=@mod_h5pactivity

      2. Manual Testing (activity view/duplicate/validate module)

      1. As admin create an H5P activity using ipsums.h5p and view the activity
        1. Then the ipsum content is displayed
      2. Go to the course and duplicate the activity
        1. Then in the new activity ispum content is displayed
      3. Do a backup of the course and restore adding the content to the same course
        1. Then in the new activity ispum content is displayed
      4. Delete one of the h5p activities
        1. Then no warning or error must be displayed
      5. Go to the course grades
        1. Then the 2 H5P activities remaining must appear in the grade book
        2. If you click on the lens icons next to a specific h5p grade the
          1. Then the link will go the regular activity view without any warning or error
      6. Go to "site administration -> users -> privacy -> Plugin privacy registry" and then navigate the tree structure to "Activity module -> H5P activity"
        1. Then the plugin privacy should be "The File resource plugin does not store any personal data."
        2. Then the plugin must not be marked as "additional"

      3. Manual Testing (backup/restore):

      1. Using the same activity as the previous test. Do a course backup (with user data)
        1. Then no warnings or errors should be displayed at any moment and the backup must be done without problems
      2. Now restore the resulting backup into a new course
      3. Access the new activity in the new course
        1. Then the ipsum content is displayed 

      4. Manual Testing (restrictions/completion):

      1. Using the course from the previous test, check that you have completion enabled in the course. If not, enable it.
      2. Go to the H5P activity and, once in, open the cog menú and edit the activity settings
      3. Set Activity completion to "show activity complete when conditions are met" and a tick on Student must view this activity to complete it
      4. Add an access restriction of date type defining that student can access from tomorrow 
      5. Enrol a student to the course, login as this student and go to the course.
      6. Then the H5P won't be available because of the restrict access.
      7. Logout and Login as teacher/admin and go the de course.
      8. Edit the access restrictions of date type defining that student can access from yesterday 
      9. Logout and login as the student and go the course.
      10. Then the H5P must be available
      11. Then when on the course the completion checkbox of the H5P activity must be dimmed.
      12. Access the H5P activity
      13. Go again to the course
      14. Then the completion checkbox of the H5P Activity must be marked a completed.

      5. Manual Testing (Grading / Reset)

      1. Create a course with 2 H5P activities
      2. Enrol 4 users as students into the course
      3. Edit settings on the first H5P activity and change:
        1. In "Grade -> Grade" set "Type" to "point" and "Maximum grade" to 10
        2. Save changes
      4. Edit settings on the second H5P activity and change:
        1. In "Grade -> Grade" set "Type" to "scale" and "Default complete scale"
        2. Save Changes
      5. Go to the course grades, click over the "Turn editing on" button (to enable quick grading) and edit:
        1. Student 1: 1st H5P activity "50", 2dn H5P activity "Not yet competent"
        2. Student 2: 1st H5P activity  "5", 2dn H5P activity "Competent"
        3. Student 3: 1st H5P activity "0", 2dn H5P activity leave it as "Not graded"
        4. Student 4: leave 1st H5P activity empty, 2dn H5P activity leave it as "Competent"
      6. Save gradings
        1. Then a red error will appear on top of the grading table with a text like "The grade entered for {1st H5P activity} for {student 1} is more than the maximum allowed"
        2. Then on the grading table:
          1. Student 1: 1rst H5P "10", 2nd H5P "Not yet competent"
          2. Student 1: 1rst H5P "5", 2nd H5P "Competent"
          3. Student 1: 1rst H5P "0", 2nd H5P "No Grade"
          4. Student 1: 1rst H5P empty, 2nd H5P "Competent"
      7. Go again to the course page and go to "Course administration -> reset"
      8. Select "Delete all grades" in the "Gradebook" section and then in "Reset course" button
      9. Click on the "Continue" button to perform the reset
        1. Then no errors or warnings must be shown.
      10. When the course reset is performed, go to the course grades
        1. No grade should be displayed for the students on the list.

      6. Manual Testing (group mode)

      1. Create two users and enrol into a course
      2. Go to course administration -> groups and Auto-generate 2 groups in the course
      3. Return to course, enable edition and create an H5P activity
      4. Then in the creation form "common module settings -> group mode" has 3 options "no groups, visible groups, separate groups".
      5. Create the activity with the same H5P ipsum and "no groups"
      6. In the course click on the "no groups icon"
      7. Then the group mode change without any warning or error.
      8. Duplicate two times the activity and put each of the three activities in a different group mode
      9. Logout and login as a student in the course.
      10. The student can access all three activities and see the "ipsum" content.

       
       
       
       

      Show
      1. Automatic testing PHPUnit Test: mod/h5pactivity/tests/events_test.php PHPUnit Test: mod/h5pactivity/tests/generator_test.php PHPUnit Test: mod/h5pactivity/tests/h5pactivity_test.php Behat: --tags=@mod_h5pactivity 2. Manual Testing (activity view/duplicate/validate module) As admin create an H5P activity using ipsums.h5p  and view the activity Then the ipsum content is displayed Go to the course and duplicate the activity Then in the new activity ispum content is displayed Do a backup of the course and restore adding the content to the same course Then in the new activity ispum content is displayed Delete one of the h5p activities Then no warning or error must be displayed Go to the course grades Then the 2 H5P activities remaining must appear in the grade book If you click on the lens icons next to a specific h5p grade the Then the link will go the regular activity view without any warning or error Go to "site administration -> users -> privacy -> Plugin privacy registry" and then navigate the tree structure to "Activity module -> H5P activity" Then the plugin privacy should be "The File resource plugin does not store any personal data." Then the plugin must not be marked as "additional" 3. Manual Testing (backup/restore): Using the same activity as the previous test. Do a course backup (with user data) Then no warnings or errors should be displayed at any moment and the backup must be done without problems Now restore the resulting backup into a new course Access the new activity in the new course Then the ipsum content is displayed   4. Manual Testing (restrictions/completion): Using the course from the previous test, check that you have completion enabled in the course. If not, enable it. Go to the H5P activity and, once in, open the cog menú and edit the activity settings Set Activity completion to "show activity complete when conditions are met" and a tick on Student must view this activity to complete it Add an access restriction of date type defining that student can access from tomorrow  Enrol a student to the course, login as this student and go to the course. Then the H5P won't be available because of the restrict access. Logout and Login as teacher/admin and go the de course. Edit the access restrictions of date type defining that student can access from yesterday  Logout and login as the student and go the course. Then the H5P must be available Then when on the course the completion checkbox of the H5P activity must be dimmed. Access the H5P activity Go again to the course Then the completion checkbox of the H5P Activity must be marked a completed. 5. Manual Testing (Grading / Reset) Create a course with 2 H5P activities Enrol 4 users as students into the course Edit settings on the first H5P activity and change: In "Grade -> Grade" set "Type" to "point" and "Maximum grade" to 10 Save changes Edit settings on the second H5P activity and change: In "Grade -> Grade" set "Type" to "scale" and "Default complete scale" Save Changes Go to the course grades, click over the "Turn editing on" button (to enable quick grading) and edit: Student 1: 1st H5P activity "50", 2dn H5P activity "Not yet competent" Student 2: 1st H5P activity  "5", 2dn H5P activity "Competent" Student 3: 1st H5P activity "0", 2dn H5P activity leave it as "Not graded" Student 4: leave 1st H5P activity empty, 2dn H5P activity leave it as "Competent" Save gradings Then a red error will appear on top of the grading table with a text like "The grade entered for {1st H5P activity} for {student 1} is more than the maximum allowed" Then on the grading table: Student 1: 1rst H5P "10", 2nd H5P "Not yet competent" Student 1: 1rst H5P "5", 2nd H5P "Competent" Student 1: 1rst H5P "0", 2nd H5P "No Grade" Student 1: 1rst H5P empty, 2nd H5P "Competent" Go again to the course page and go to "Course administration -> reset" Select "Delete all grades" in the "Gradebook" section and then in "Reset course" button Click on the "Continue" button to perform the reset Then no errors or warnings must be shown. When the course reset is performed, go to the course grades No grade should be displayed for the students on the list. 6. Manual Testing (group mode) Create two users and enrol into a course Go to course administration -> groups and Auto-generate 2 groups in the course Return to course, enable edition and create an H5P activity Then in the creation form "common module settings -> group mode" has 3 options "no groups, visible groups, separate groups". Create the activity with the same H5P ipsum and "no groups" In the course click on the "no groups icon" Then the group mode change without any warning or error. Duplicate two times the activity and put each of the three activities in a different group mode Logout and login as a student in the course. The student can access all three activities and see the "ipsum" content.        
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
      MDL-67707-master
    • Sprint:
      Moodle 3.9 - Moppies Kanban

      Description

      As a teacher
      I want to create an H5P content activity
      So that I can use the H5P activities as other Moodle activities

      Acceptance criteria:

      • Create a new activity type for teachers to be able to upload an H5P file and render it in the course.
      • Be able to define activities standard options such as Availability, Restrict access and other common module settings.

      List of tasks:

      • Create new mod_h5p plugin skeleton
      • Adapt or create DB tables as needed
      • Create capabilities
      • Implement a null privacy provider for now
      • Create a new edit page and its form
      • Create a new view page
      • Implement Moodle's basic activity completion not using H5P completion
      • Add behat tests or create a new issue to add them

        Attachments

        1. grade_h5pactivity.gif
          grade_h5pactivity.gif
          488 kB
        2. ipsums.h5p
          529 kB
        3. MDL-67707_test.gif
          MDL-67707_test.gif
          2.14 MB
        4. MDL-67707-test1-step4.png
          MDL-67707-test1-step4.png
          41 kB
        5. MDL-67707-test2-step2.png
          MDL-67707-test2-step2.png
          119 kB
        6. MDL-67707-test2-step3.png
          MDL-67707-test2-step3.png
          103 kB
        7. MDL-67707-test2-step4.png
          MDL-67707-test2-step4.png
          27 kB
        8. MDL-67707-test2-step5.png
          MDL-67707-test2-step5.png
          16 kB
        9. MDL-67707-test2-step6.png
          MDL-67707-test2-step6.png
          9 kB
        10. MDL-67707-test3-step2.png
          MDL-67707-test3-step2.png
          33 kB
        11. MDL-67707-test3-step3.png
          MDL-67707-test3-step3.png
          58 kB
        12. MDL-67707-test4-step14.png
          MDL-67707-test4-step14.png
          22 kB
        13. MDL-67707-test4-step6.png
          MDL-67707-test4-step6.png
          29 kB
        14. MDL-67707-test4-steps10-11.png
          MDL-67707-test4-steps10-11.png
          21 kB
        15. MDL-67707-test5-step1.png
          MDL-67707-test5-step1.png
          13 kB
        16. MDL-67707-test5-step10.png
          MDL-67707-test5-step10.png
          55 kB
        17. MDL-67707-test5-step6.2-possiblefail.png
          MDL-67707-test5-step6.2-possiblefail.png
          66 kB
        18. MDL-67707-test5-step6-RETEST.png
          MDL-67707-test5-step6-RETEST.png
          84 kB
        19. MDL-67707-test6-step10.png
          MDL-67707-test6-step10.png
          234 kB
        20. MDL-67707-test6-step7.png
          MDL-67707-test6-step7.png
          5 kB
        21. MDL-67707-test6-step8.png
          MDL-67707-test6-step8.png
          16 kB
        22. mod_h5pactivity.yaml
          4 kB

          Issue Links

            Activity

              People

              Assignee:
              tusefomal Ferran Recio
              Reporter:
              amaia Amaia Anabitarte
              Peer reviewer:
              Carlos Escobedo
              Integrator:
              Sara Arjona (@sarjona)
              Tester:
              Michael Hawkins
              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:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/May/20

                  Time Tracking

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