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

Content bank content's author is not restored when copying a course

XMLWordPrintable

    • MOODLE_311_STABLE
    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • MDL-71107-master
    • Hide

      Setup

      In a different Moodle site (you can use https://sandbox.moodledemo.net/):

      1. Create a course and enrol two teachers: t1 and t2.
      2. Logout.
      3. Login as t1 and access the course.
      4. Go to the Content bank and upload the attached chart.h5p H5P file.
      5. Logout.
      6. Login as t2 and access the course.
      7. Go to the Content bank and upload the attached helloworld.h5p H5P file.
      8. Logout.
      9. Login as admin.
      10. Go to the course.
      11. Create a backup of this course (you can leave default values).
      12. Download the backup file (backup-moodle2-xxxxxxx-202104XX-YYZZ). You'll need this file during the testing, to restore this course to a different Moodle site.

      Testing scenario: For backups done in different sites, the current user running restore is set as the author for CB content.

      1. Login as admin in your local Moodle site where you'll test this patch.
      2. Access to "Site administration > Courses > Manage courses and categories > Add a new course" and create an empty course.
      3. Enrol t1 and t2 as teachers in that course.
      4. Logout.
      5. Login as t1 and access this course.
      6. Select the "Restore" option from the course cog.
      7. Upload the backup file you created during the Setup (backup-moodle2-xxxxxxx-202104XX-YYZZ) and restore it in this existing course.
        • You can select "Delete the contents of this course and then restore".
      8. Access to the restored course.
      9. Go to the Content bank and click on chart.h5p content.
      10. Confirm you can see 'Edit' button. 
      11. Go back to Content bank using breadcrumbs.
      12. Click on helloworld.h5p content.
      13. Confirm you can see 'Edit' button.
      14. Logout.
      15. Login as t2 and access the restored course.
      16. Go to the Content bank and click on chart.h5p content.
      17. Confirm you cannot see 'Edit' button. 
      18. Go back to Content bank using breadcrumbs.
      19. Click on helloworld.h5p content.
      20. Confirm you cannot see 'Edit' button.

       

      Show
      Setup In a different Moodle site (you can use https://sandbox.moodledemo.net/): Create a course and enrol two teachers: t1 and t2. Logout. Login as t1 and access the course. Go to the Content bank and upload the attached chart.h5p H5P file. Logout. Login as t2 and access the course. Go to the Content bank and upload the attached helloworld.h5p H5P file. Logout. Login as admin. Go to the course. Create a backup of this course (you can leave default values). Download the backup file ( backup-moodle2-xxxxxxx-202104XX-YYZZ ). You'll need this file during the testing, to restore this course to a different Moodle site. Testing scenario: For backups done in different sites, the current user running restore is set as the author for CB content. Login as admin in your local Moodle site where you'll test this patch. Access to "Site administration > Courses > Manage courses and categories > Add a new course" and create an empty course. Enrol t1 and t2 as teachers in that course. Logout. Login as t1 and access this course. Select the "Restore" option from the course cog. Upload the backup file you created during the Setup ( backup-moodle2-xxxxxxx-202104XX-YYZZ ) and restore it in this existing course. You can select "Delete the contents of this course and then restore". Access to the restored course. Go to the Content bank and click on chart.h5p content. Confirm you can see 'Edit' button.  Go back to Content bank using breadcrumbs. Click on helloworld.h5p content. Confirm you can see 'Edit' button. Logout. Login as t2 and access the restored course. Go to the Content bank and click on chart.h5p content. Confirm you cannot see 'Edit' button.  Go back to Content bank using breadcrumbs. Click on helloworld.h5p content. Confirm you cannot see 'Edit' button.  
    • Moppies Kanban

      Steps to reproduce

      1. Login as admin.
      2. Create a course and enrol teacher t1.
      3. Logout.
      4. Login as t1 and access to the course.
      5. Go to the Content bank and upload or create an H5P content.
      6. Logout.
      7. Login as admin.
      8. Go to the course.
      9. Copy course. In "Include role enrolments", select "Teacher".

      Expected result

      Teacher can edit the content in the content bank.

       

      Current result

      Teacher can see the content in the content bank but he can't edit it because author is empty.

       

      Reported in https://moodle.org/mod/forum/discuss.php?d=419522 by Olivier Wenger

        1. chart.h5p
          110 kB
          Amaia Anabitarte
        2. helloworld.h5p
          35 kB
          Amaia Anabitarte
        3. MDL-71107.jpg
          41 kB
          Anna Carissa Sadia

            amaia Amaia Anabitarte
            sarjona Sara Arjona (@sarjona)
            Carlos Escobedo Carlos Escobedo
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day
                1d

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