Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide

      For testing this new webservice:
      Use this client: https://github.com/moodlehq/sample-ws-clients/blob/master/PHP-REST/client.php

      functionname core_course_import_course

      /// PARAMETERS $params = array(
      'importfrom' => 2, // The id of the course we are importing from
      'importto' => 3, // The id of the course we are importing to
      'deletecontent' => 0, // Delete the content of the course we are importing to
      'options' => array(array('name'=>'blocks', 'value'=>1), array('name'=>'activities', 'value'=>1), array('name'=>'filters', 'value'=>1)) // Backup options );

      Change the importfrom and importto values to match your courses

      Show
      For testing this new webservice: Use this client: https://github.com/moodlehq/sample-ws-clients/blob/master/PHP-REST/client.php functionname core_course_import_course /// PARAMETERS $params = array( 'importfrom' => 2, // The id of the course we are importing from 'importto' => 3, // The id of the course we are importing to 'deletecontent' => 0, // Delete the content of the course we are importing to 'options' => array(array('name'=>'blocks', 'value'=>1), array('name'=>'activities', 'value'=>1), array('name'=>'filters', 'value'=>1)) // Backup options ); Change the importfrom and importto values to match your courses
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-32919-core_course_import_course

      Description

      This web service function will import the activites, blocks and filters from a course to an existing one

      It's a copy of the current backup Import functionallity in Moodle

      Parameters:
      ----------

      importfrom - int The id of the course we are importing from
      importto - int The id of the course we are importing to
      deletecontent - int Delete the content of the course we are importing to
      backup settings - struct of key value:
      Possible keys:
      'activities' => 'Default to 1',
      'blocks' => 'Default to 1',
      'filters' => 'Default to 1',

      Return value:
      -----------
      null

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    3/Dec/12