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

Teachers cannot use the H5P editor within the content bank

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Prerequisites:

      1. A teacher user enrolled in a course.
      2. As an admin, go to Site administration > H5P > Manage H5P content types
      3. If 'Arithmetic Quiz' is not listed in the 'Installed H5P content types', upload attached 'arithmetic-quiz.h5p' file on 'Upload H5P content types' and click on 'Upload H5P conten types' button.

      Test 1: Teachers can edit uploaded content when libraries are installed

      1. Log in as a teacher.
      2. Go to the course
      3. Follow Content bank link (in the drawer for Boost theme, in Navigation block > Site pages for Classic theme)
      4. Click on the 'Upload' button.
      5. Upload attached 'arithmetic-quiz.h5p' file and Save changes.
      6. Confirm the content is rendered properly and there's no error.
      7. Click on 'Edit' button
      8. Confirm there's no error.
      9. Add a Title and change the value for the 'Intro' field, and 'Save'.
      10. Confirm there's no error and the new value for the 'Intro' field is rendered.
      11. Click on 'Close' button

      Test 2: Teachers can create content when libraries are installed

      1. Open 'Add' button/dropdown and click on 'Arithmetic Quiz' option
      2. Fill 'Title' and 'Intro' fields and leave the rest of the fields as default.
      3. 'Save'
      4. Confirm there's no error and the new value for the 'Intro' field is rendered.
      5. Click on 'Edit' button
      6. Change the value for the 'Intro' field, and 'Save'.
      7. Confirm there's no error and the new value for the 'Intro' field is rendered.
      8. Click on 'Close' button

      Test 3: Teachers get an error when libraries are not installed

      1. Log in as admin
      2. Go to Site administration > H5P > Manage H5P content types
      3. Delete 'Arithmetic Quiz' from 'Installed H5P content types' list and confirm deletion.
      4. Log out and log in as a teacher.
      5. Go to the course
      6. Follow Content bank link (in the drawer for Boost theme, in Navigation block > Site pages for Classic theme)
      7. Click on 'arithmetic-quiz.h5p' content.
      8. Confirm there's a 'missing-required-library' error.
      9. Click on 'Close' button
      10. Click on 'Upload' button.
      11. Upload attached 'arithmetic-quiz.h5p' file and Save changes.
      12. Confirm there's a 'missing-required-library' error.
      13. Click on 'Close' button
      14. Open 'Add' button.
      15. Confirm 'Arithmetic Quiz' is not in the list

      Test 4: Contents work when the libraries are installed again

      1. Log in as admin
      2. Go to Site administration > H5P > Manage H5P content types
      3. Upload attached 'arithmetic-quiz.h5p' file on 'Upload H5P content types' and click on 'Upload H5P conten types' button.
      4. Log out and log in as a teacher.
      5. Go to the course
      6. Follow Content bank link (in the drawer for Boost theme, in Navigation block > Site pages for Classic theme)
      7. Click on one of the 'arithmetic-quiz.h5p' contents.
      8. Confirm the content is rendered ok and there's no error.
      9. Click on 'Close' button
      10. Click on the other 'arithmetic-quiz.h5p' content
      11. Confirm the content is rendered ok and there's no error.
      Show
      Prerequisites: A teacher user enrolled in a course. As an admin, go to Site administration > H5P > Manage H5P content types If 'Arithmetic Quiz' is not listed in the 'Installed H5P content types', upload attached 'arithmetic-quiz.h5p' file on 'Upload H5P content types' and click on 'Upload H5P conten types' button. Test 1: Teachers can edit uploaded content when libraries are installed Log in as a teacher. Go to the course Follow Content bank link (in the drawer for Boost theme, in Navigation block > Site pages for Classic theme) Click on the 'Upload' button. Upload attached 'arithmetic-quiz.h5p' file and Save changes. Confirm the content is rendered properly and there's no error. Click on 'Edit' button Confirm there's no error. Add a Title and change the value for the 'Intro' field, and 'Save' . Confirm there's no error and the new value for the 'Intro' field is rendered. Click on 'Close' button Test 2: Teachers can create content when libraries are installed Open 'Add' button/dropdown and click on 'Arithmetic Quiz' option Fill 'Title' and 'Intro' fields and leave the rest of the fields as default. 'Save' Confirm there's no error and the new value for the 'Intro' field is rendered. Click on 'Edit' button Change the value for the 'Intro' field, and 'Save' . Confirm there's no error and the new value for the 'Intro' field is rendered. Click on 'Close' button Test 3: Teachers get an error when libraries are not installed Log in as admin Go to Site administration > H5P > Manage H5P content types Delete 'Arithmetic Quiz' from 'Installed H5P content types' list and confirm deletion. Log out and log in as a teacher. Go to the course Follow Content bank link (in the drawer for Boost theme, in Navigation block > Site pages for Classic theme) Click on 'arithmetic-quiz.h5p' content. Confirm there's a 'missing-required-library' error. Click on 'Close' button Click on 'Upload' button. Upload attached 'arithmetic-quiz.h5p' file and Save changes . Confirm there's a 'missing-required-library' error. Click on 'Close' button Open 'Add' button. Confirm 'Arithmetic Quiz' is not in the list Test 4: Contents work when the libraries are installed again Log in as admin Go to Site administration > H5P > Manage H5P content types Upload attached 'arithmetic-quiz.h5p' file on 'Upload H5P content types' and click on 'Upload H5P conten types' button. Log out and log in as a teacher. Go to the course Follow Content bank link (in the drawer for Boost theme, in Navigation block > Site pages for Classic theme) Click on one of the 'arithmetic-quiz.h5p' contents. Confirm the content is rendered ok and there's no error. Click on 'Close' button Click on the other 'arithmetic-quiz.h5p' content Confirm the content is rendered ok and there's no error.
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-68641-master

      Description

      To reproduced the problem:
      1. Log in as a user enrolled in course as a teacher.
      2. Access the content bank.
      3. Create new H5P content (H5P content type libraries must be available).
      4. In the edition page, the editor doesn't load.

      The problem is that the H5P editor can't get the data of the content type libraries, because of the ajax endpoint (h5p/ajax.php) checking permissions at the system level that the user doesn't have.

        Attachments

        1. arithmetic-quiz.h5p
          758 kB
        2. MDL-68641_TEST4-1.png
          MDL-68641_TEST4-1.png
          61 kB
        3. MDL-68641_TEST1-1.png
          MDL-68641_TEST1-1.png
          105 kB
        4. MDL-68641_TEST2-1.png
          MDL-68641_TEST2-1.png
          64 kB
        5. MDL-68641_TEST3-1.png
          MDL-68641_TEST3-1.png
          94 kB

          Issue Links

            Activity

              People

              Assignee:
              amaia Amaia Anabitarte
              Reporter:
              vmdef Víctor Déniz Falcón
              Peer reviewer:
              Carlos Escobedo
              Integrator:
              Víctor Déniz Falcón
              Tester:
              Anna Carissa Sadia
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              7 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 - 3 days, 4 hours, 10 minutes
                  3d 4h 10m