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

Fix the backup options names in core_course_duplicate_course

    Details

    • Testing Instructions:
      Hide
      1. Create a course with 2 students enrolled
      2. enable actvity completion in course and site settings
      3. Create an assignment and a page resource
      4. Enable manual (student smarks as complete) activity completion on the page resource
      5. For the assignment, set the activity as completed when the students submits the assignment and the teacher grades it.
      6. As a student manually mark the page as completed
      7. As a student submit an assignment
      8. As a teaher grade the assignment
      9. Enable webservices, providing access to the core_course_duplicate_course webservice.
        #
        Use this client:
        https://github.com/moodlehq/sample-ws-clients/blob/master/PHP-REST/client.php
        functionname
        core_course_duplicate_course
        /// PARAMETERS
        $params = array(
        'courseid' => 4, // CHANGE TO THE COURSE you created above
        'fullname' => 'core_course_duplicate_course test', // New course full name
        'shortname' => 'core_course_duplicate_course', // New course shortname
        'categoryid' => 1, // New course category id
        'visible' => 1, // Make the course visible after duplicating
        'options' => array(array('name'=>'blocks', 'value'=>1), array('name'=>'activities', 'value'=>1), array('name'=>'users', 'value'=>1), array('name'=>'userscompletion', 'value'=>1), array('name'=>'grade_histories', 'value'=>1), ) // Backup options
        );
      1. VERIFY: that the course has been duplicated correctly
      2. VERIFY: that the student has been enrolled correctly into the new course
      3. VERIFY: that you can login as the student and see the completion information is restored in the new coruse
      4. VERFIY: that the grade history has been retained in the new course
      Show
      Create a course with 2 students enrolled enable actvity completion in course and site settings Create an assignment and a page resource Enable manual (student smarks as complete) activity completion on the page resource For the assignment, set the activity as completed when the students submits the assignment and the teacher grades it. As a student manually mark the page as completed As a student submit an assignment As a teaher grade the assignment Enable webservices, providing access to the core_course_duplicate_course webservice. # Use this client: https://github.com/moodlehq/sample-ws-clients/blob/master/PHP-REST/client.php functionname core_course_duplicate_course /// PARAMETERS $params = array( 'courseid' => 4, // CHANGE TO THE COURSE you created above 'fullname' => 'core_course_duplicate_course test', // New course full name 'shortname' => 'core_course_duplicate_course', // New course shortname 'categoryid' => 1, // New course category id 'visible' => 1, // Make the course visible after duplicating 'options' => array(array('name'=>'blocks', 'value'=>1), array('name'=>'activities', 'value'=>1), array('name'=>'users', 'value'=>1), array('name'=>'userscompletion', 'value'=>1), array('name'=>'grade_histories', 'value'=>1), ) // Backup options ); VERIFY: that the course has been duplicated correctly VERIFY: that the student has been enrolled correctly into the new course VERIFY: that you can login as the student and see the completion information is restored in the new coruse VERFIY: that the grade history has been retained in the new course
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      wip_master_mdl-34085

      Description

      Some backup options name are incorrect:

      "completion_information" (int) Include user course completion information (default to 0 that is equal to
      "histories" (int) Include histories (default to 0 that is equal to no)'

      Correct ones are:

      anonymize is missing

      "anonymize" (int) Anonymize backup (default to 0 that is equal to no),
      "userscompletion" (int) Include user course completion information (default to 0 that is equal to no),
      "grade_histories" (int) Include grade histories (default to 0 that is equal to no)'

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    8/Jul/13