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

Method of saving embedded H5P content grades in the gradebook (Backport of MDL-69174)

XMLWordPrintable

    • MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • Hide

      Requirements

      1. Access to the database to run some SQL queries.

      Setup

      1. Login as admin.
      2. Create a course ("C1") and enrol student s1.
      3. Create a course ("C2") and enrol students s1 and s2.
      4. Create an H5P activity ("Activity 1") to the course "C1" in section 1 using the arithmetic-quiz-addition.h5p H5P file. Remember to select the "Embed button" checkbox in the "H5P options" section before saving the H5P activity.
      5. Click over the "<> Embed" icon that appears below the H5P activity and copy the H5P embed code (you'll need later).
      6. Access to the course C1 and create a Label in section 1. In the "Label text" field, show the advanced Atto buttons, click over the "</> HTML" button and paste the embedded code copied previously.

      Testing scenario 1: Embed code from H5P activity

      1. Login as student s1.
      2. Access to Course C1.
      3. Check the gradebook is empty.
      4. Answer the H5P questions embedded into the label in the main course page and proceed to the H5P summary to see your points.
      5. Check the gradebook is not empty: the points of the previous step should appear in the H5P activity column.
      6. Login as admin.
      7. Run the following SQL query and annotate the result:

        SELECT count(*) FROM mdl_h5pactivity_attempts

      8. Access to Course C1.
      9. Answer the H5P questions embedded into the label in the main course page and proceed to the H5P summary to see your points.
      10. Run again the previous SQL query and check the result is the same in #7.

        SELECT count(*) FROM mdl_h5pactivity_attempts

      Testing scenario 2: Embed code from hidden H5P activity

      1. Login as admin.
      2. Access to Course C1.
      3. Hide "Activity 1" from students.
      4. Login as student s1.
      5. Access to Course C1.
      6. Check the H5P activity doesn't appear now in the label and the following text is displayed: "Course or activity not accessible. (Activity is hidden)".

      Testing scenario 3: Embed code from a stealth H5P activity

      1. Login as admin.
      2. Access to "Site administration / Advanced features".
      3. Enable "Allow stealth activities" and Save changes.
      4. Access to the Course C1.
      5. Create an H5P activity to the course ("Activity 2") in section 2 using the attached H5P file. Before saving the H5P activity:
        • Select the "Embed button" checkbox in the "H5P options" section.
        • Set "Availability" to "Make available but not shown on course page" in the "Common module settings".
      6. Click over the "<> Embed" icon that appears below the H5P activity and copy the H5P embed code (you'll need later).
      7. Access to the course C1 and create a Label in section 2. In the "Label text" field, show the advanced Atto buttons, click over the "</> HTML" button and paste the embedded code copied previously.
      8. Login as student s1.
      9. Check the gradebook is empty for "Activity 2".
      10. Answer the H5P questions embedded into the label in section 2 and proceed to the H5P summary to see your points.
      11. Check the gradebook for "Activity 2" is not empty any more: the points of the previous step should appear in the H5P activity column. 

      Testing scenario 4: H5P activity with tracking disabled

      1. Login as admin.
      2. Access to the Course C1.
      3. Create an H5P activity to the course ("Activity 3 - No tracking") in section 3 using the attached H5P file. Before saving the H5P activity:
        • Select the "Embed button" checkbox in the "H5P options" section.
        • Set "No" in "Enable attempt tracking".
      4. Click over the "<> Embed" icon that appears below the H5P activity and copy the H5P embed code (you'll need later).
      5. Access to the course C1 and create a Label in section 3. In the "Label text" field, show the advanced Atto buttons, click over the "</> HTML" button and paste the embedded code copied previously.
      6. Login as student s1.
      7. Check the gradebook is empty for "Activity 3 - No tracking".
      8. Answer the H5P questions embedded into the label in section 3 and proceed to the H5P summary to see your points.
      9. Check the gradebook for "Activity 3 - No tracking" is still empty.

      Testing scenario 5: Embed code in a different course

      1. Login as admin.
      2. Create an H5P activity ("Activity 3") to the course "C1" in section 3 using the attached H5P file. Remember to select the "Embed button" checkbox in the "H5P options" section before saving the H5P activity.
      3. Click over the "<> Embed" icon that appears below the H5P activity and copy the H5P embed code (you'll need later).
      4. Access to the course C2.
      5. Create a Label in section 1. In the "Label text" field, show the advanced Atto buttons, click over the "</> HTML" button and paste the embedded code copied previously.
      6. Login as student s1.
      7. Access to Course C1.
      8. Check the gradebook is empty for "Activity 3".
      9. Access to Course C2.
      10. Check the gradebook is empty.
      11. Answer the H5P questions embedded into the label and proceed to the H5P summary to see your points.
      12. Check the gradebook in C2 is still empty.
      13. Access to Course C1.
      14. Check the gradebook for "Activity 3" is not empty any more: the points of the step #11 should appear in the H5P activity column. 
      15. Logout.
      16. Login as student s2.
      17. Access to Course C2.
      18. Check the H5P activity doesn't appear in the label and the following text is displayed: "Course or activity not accessible. (Not enrolled)".

       

      Show
      Requirements Access to the database to run some SQL queries. Setup Login as admin. Create a course ("C1") and enrol student s1. Create a course ("C2") and enrol students s1 and s2. Create an H5P activity ("Activity 1") to the course "C1" in section 1 using the arithmetic-quiz-addition.h5p  H5P file. Remember to select the "Embed button" checkbox in the "H5P options" section before saving the H5P activity. Click over the "<> Embed" icon that appears below the H5P activity and copy the H5P embed code (you'll need later). Access to the course C1 and create a Label in section 1. In the "Label text" field, show the advanced Atto buttons, click over the "</> HTML" button and paste the embedded code copied previously. Testing scenario 1: Embed code from H5P activity Login as student s1. Access to Course C1. Check the gradebook is empty. Answer the H5P questions embedded into the label in the main course page and proceed to the H5P summary to see your points. Check the gradebook is not empty: the points of the previous step should appear in the H5P activity column. Login as admin. Run the following SQL query and annotate the result: SELECT count(*) FROM mdl_h5pactivity_attempts Access to Course C1. Answer the H5P questions embedded into the label in the main course page and proceed to the H5P summary to see your points. Run again the previous SQL query and check the result is the same in #7. SELECT count(*) FROM mdl_h5pactivity_attempts Testing scenario 2: Embed code from hidden H5P activity Login as admin. Access to Course C1. Hide "Activity 1" from students. Login as student s1. Access to Course C1. Check the H5P activity doesn't appear now in the label and the following text is displayed: "Course or activity not accessible. (Activity is hidden)". Testing scenario 3: Embed code from a stealth H5P activity Login as admin. Access to "Site administration / Advanced features". Enable "Allow stealth activities" and Save changes. Access to the Course C1. Create an H5P activity to the course ("Activity 2") in section 2 using the attached H5P file. Before saving the H5P activity: Select the "Embed button" checkbox in the "H5P options" section. Set "Availability" to "Make available but not shown on course page" in the "Common module settings". Click over the "<> Embed" icon that appears below the H5P activity and copy the H5P embed code (you'll need later). Access to the course C1 and create a Label in section 2. In the "Label text" field, show the advanced Atto buttons, click over the "</> HTML" button and paste the embedded code copied previously. Login as student s1. Check the gradebook is empty for "Activity 2". Answer the H5P questions embedded into the label in section 2 and proceed to the H5P summary to see your points. Check the gradebook for "Activity 2" is not empty any more: the points of the previous step should appear in the H5P activity column.  Testing scenario 4: H5P activity with tracking disabled Login as admin. Access to the Course C1. Create an H5P activity to the course ("Activity 3 - No tracking") in section 3 using the attached H5P file. Before saving the H5P activity: Select the "Embed button" checkbox in the "H5P options" section. Set "No" in "Enable attempt tracking". Click over the "<> Embed" icon that appears below the H5P activity and copy the H5P embed code (you'll need later). Access to the course C1 and create a Label in section 3. In the "Label text" field, show the advanced Atto buttons, click over the "</> HTML" button and paste the embedded code copied previously. Login as student s1. Check the gradebook is empty for "Activity 3 - No tracking". Answer the H5P questions embedded into the label in section 3 and proceed to the H5P summary to see your points. Check the gradebook for "Activity 3 - No tracking" is still empty. Testing scenario 5: Embed code in a different course Login as admin. Create an H5P activity ("Activity 3") to the course "C1" in section 3 using the attached H5P file. Remember to select the "Embed button" checkbox in the "H5P options" section before saving the H5P activity. Click over the "<> Embed" icon that appears below the H5P activity and copy the H5P embed code (you'll need later). Access to the course C2. Create a Label in section 1. In the "Label text" field, show the advanced Atto buttons, click over the "</> HTML" button and paste the embedded code copied previously. Login as student s1. Access to Course C1. Check the gradebook is empty for "Activity 3". Access to Course C2. Check the gradebook is empty. Answer the H5P questions embedded into the label and proceed to the H5P summary to see your points. Check the gradebook in C2 is still empty. Access to Course C1. Check the gradebook for "Activity 3" is not empty any more: the points of the step #11 should appear in the H5P activity column.  Logout. Login as student s2. Access to Course C2. Check the H5P activity doesn't appear in the label and the following text is displayed: "Course or activity not accessible. (Not enrolled)".  
    • Moppies Kanban

      This is about how if you create a mod_h5p with embedding on, then embed that somewhere in the course, any attempts/grades created when attempting that embed are not recorded to the activity.

      The reason I think this is worthy of backport is that it's a pretty small code change, and more importantly, this was a working feature of mod_hvp. So on sites migrating from mod_hvp to mod_h5p, this would cause a loss of functionality - we've already had this come up multiple times here.

        1. arithmetic-quiz-addition.h5p
          731 kB
        2. Screenshot_1.jpg
          Screenshot_1.jpg
          75 kB
        3. Screenshot_2.jpg
          Screenshot_2.jpg
          85 kB
        4. Screenshot_3.jpg
          Screenshot_3.jpg
          86 kB

            emerrill Eric Merrill
            emerrill Eric Merrill
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Jun Pataleta Jun Pataleta
            Janelle Barcega Janelle Barcega
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 26 minutes
                1h 26m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.