XMLWordPrintable

    Details

    • 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_create_backups

      /// PARAMETERS
      $params = array('backups' => array(
      array('courseid' => 40, 'destination' => 'course'),
      array('courseid' => 40, 'destination' => 'userprivate'),
      array('courseid' => 40, 'destination' => 'userbackup'),
      array('courseid' => 40, 'destination' => 'automated'),
      array('courseid' => 40, 'destination' => '/var/html/moodledata/')
      )
      );

      Replace the courseid and the last path for your targeted 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_create_backups /// PARAMETERS $params = array('backups' => array( array('courseid' => 40, 'destination' => 'course'), array('courseid' => 40, 'destination' => 'userprivate'), array('courseid' => 40, 'destination' => 'userbackup'), array('courseid' => 40, 'destination' => 'automated'), array('courseid' => 40, 'destination' => '/var/html/moodledata/') ) ); Replace the courseid and the last path for your targeted courses
    • Pull from Repository:
    • Pull Master Branch:
      MDL-33708-core_course_create_backups

      Description

      This web service function will perform a full backup of a course

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

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

      course id - int The course id to backup

      backup settings - struct of backup settings:
      'users' => 'Default to true',
      'role_assignments' => 'Default to true',
      'user_files' => 'Default to true',
      'activities' => 'Default to true',
      'blocks' => 'Default to true',
      'filters' => 'Default to true',
      'comments' => 'Default to true',
      'completion_information' => 'Default to true',
      'logs' => 'Default to true',
      'histories' => 'Default to true'

      destination - Where to store the mbz file, string possible values
      course - Default, store the backup in the own course backup area
      userprivate - Current user private files
      automatic - Automatic backups area
      /any/path - A directory writable in the server

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

      Jerome, I need some feedback about the WS function name and parameters, other options are:

      core_backup_course_backup

      I will start developing the method, I will change anything to get this function in core

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: