Moodle
  1. Moodle
  2. MDL-34083

Deprecated (and invalid) backup options in WS core_course_duplicate_course

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3.2
    • Component/s: Web Services
    • Labels:
      None
    • Testing Instructions:
      Hide

      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, // Course to be duplicated idnumber // CHANGE IT FOR AN EXISTING COURSE ID
      'fullname' => 'Nuevo curso', // New course full name
      'shortname' => 'NuevoCurso'.rand(), // 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'=>'filters', 'value'=>1)) // Backup options
      );

      Show
      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, // Course to be duplicated idnumber // CHANGE IT FOR AN EXISTING COURSE ID 'fullname' => 'Nuevo curso', // New course full name 'shortname' => 'NuevoCurso'.rand(), // 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'=>'filters', 'value'=>1)) // Backup options );
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      42390

      Description

        Issue Links

          Activity

          Hide
          Jérôme Mouneyrac added a comment - - edited

          Sending for integration

          Show
          Jérôme Mouneyrac added a comment - - edited Sending for integration
          Hide
          Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Dan Poltawski added a comment -

          Hi Juan,

          Should this be backported?

          Show
          Dan Poltawski added a comment - Hi Juan, Should this be backported?
          Hide
          Juan Leyva added a comment -

          I think it should, this bug actually fixes 2 things: the invalid backup option and the param type for using other valid options.

          Show
          Juan Leyva added a comment - I think it should, this bug actually fixes 2 things: the invalid backup option and the param type for using other valid options.
          Hide
          Dan Poltawski added a comment -

          So which branches?

          Show
          Dan Poltawski added a comment - So which branches?
          Hide
          Jérôme Mouneyrac added a comment -

          2.3 (it's not in 2.2)

          Show
          Jérôme Mouneyrac added a comment - 2.3 (it's not in 2.2)
          Hide
          Dan Poltawski added a comment -

          Thanks Jerome.

          I've integrated this to 2.3 and master.

          Show
          Dan Poltawski added a comment - Thanks Jerome. I've integrated this to 2.3 and master.
          Hide
          Adrian Greeve added a comment -

          I ran the web service and didn't encounter any errors. This also displayed an xml response to the screen.
          Test passed

          Show
          Adrian Greeve added a comment - I ran the web service and didn't encounter any errors. This also displayed an xml response to the screen. Test passed
          Hide
          Dan Poltawski added a comment -

          *Notice*: Undefined variable: friendlyintegrator in /Users/danp/git/tokenintegrationthanks.php on line 26

          Congratulations

          {tracker.user.name}

          !

          You've made into Moodle

          {tracker.fixversion-1}

          +

          I would like to personally thank you for this contribution on behalf of all Moodle users throughout the world.

          cheers!

          {tracker.friendlyintegrator}
          Show
          Dan Poltawski added a comment - * Notice *: Undefined variable: friendlyintegrator in /Users/danp/git/tokenintegrationthanks.php on line 26 Congratulations {tracker.user.name} ! You've made into Moodle {tracker.fixversion-1} + I would like to personally thank you for this contribution on behalf of all Moodle users throughout the world. cheers! {tracker.friendlyintegrator}

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: