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

Course copy: idnumber field is missing if not permitted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Development in progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.9, 4.0
    • Fix Version/s: 3.9.2, 4.0
    • Component/s: Backup, Course
    • Labels:
    • Testing Instructions:
      Hide
      1. Log in as an admin and go to assign system roles (Site admin / Users / Assign system roles).
      2. Assign a user as the manager role at the site. (You can skip this step if you already have a manager account.)
      3. Make sure that the manager role does not have the capability{{ moodle/course:changeidnumber}} capability.
      4. Log out and log back in as the manager user.
      5. Go to a course.
      6. Select 'Copy course' from the Actions menu.
      7. Enter a course full name and short name then click the button 'Copy and view'.
      8. Verify that course being copied is listed as source course and that the current operation goes from backup to restore to complete. (This will take a few minutes.)
      9. Click the link for the course copy and verify that a correct copy has been made.
      10. Repeat steps 5 to 9 after changing the manager role capability moodle/course:changeidnumber to Allow.
      Show
      Log in as an admin and go to assign system roles (Site admin / Users / Assign system roles). Assign a user as the manager role at the site. (You can skip this step if you already have a manager account.) Make sure that the manager role does not have the capability{{ moodle/course:changeidnumber}} capability. Log out and log back in as the manager user. Go to a course. Select 'Copy course' from the Actions menu. Enter a course full name and short name then click the button 'Copy and view'. Verify that course being copied is listed as source course and that the current operation goes from backup to restore to complete. (This will take a few minutes.) Click the link for the course copy and verify that a correct copy has been made. Repeat steps 5 to 9 after changing the manager role capability moodle/course:changeidnumber to Allow.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_39_STABLE, MOODLE_40_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE, MOODLE_40_STABLE
    • Pull from Repository:
    • Pull 3.9 Branch:
    • Pull Master Branch:
      MDL-69156_master

      Description

      Actual result

      1. Log in to your Moodle site as not admin user.
      2. The logged in user should not have the capability moodle/course:changeidnumber.
      3. Go to a course.
      4. Select 'Copy course' from the Actions menu.
      5. Enter a course full name and short name then click the button 'Copy and view'.
      6. Now should be thrown a error/copy_class_field_not_found exception.

      Expected result

      1. Log in to your Moodle site as not admin user.
      2. The logged in user should not have the capability moodle/course:changeidnumber.
      3. Go to a course.
      4. Select 'Copy course' from the Actions menu.
      5. Enter a course full name and short name then click the button 'Copy and view'.
      6. Verify that course being copied is listed as source course and that the current operation goes from backup to restore to complete. (This will take a few minutes.)
      7. Verify that you receive a message that the backup and restore is complete.
      8. Click the link for the course copy and verify that a correct copy has been made.

        Attachments

          Activity

            People

            Assignee:
            pead Adrian Perez
            Reporter:
            pead Adrian Perez
            Peer reviewer:
            Peter Dias
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Fix Release Date:
              14/Sep/20

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m