XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3
    • 2.4
    • Web Services
    • MOODLE_23_STABLE
    • MOODLE_24_STABLE
    • MDL-32919-core_course_import_course
    • 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

    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

      Attachments

        Issue Links

          Activity

            People

              jleyva Juan Leyva
              jleyva Juan Leyva
              Jérôme Mouneyrac Jérôme Mouneyrac
              Sam Hemelryk Sam Hemelryk
              Adrian Greeve Adrian Greeve
              Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                3/Dec/12