Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
roblesjoel committed Jun 17, 2022
2 parents fcb875d + 695610a commit 2cf5676
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
Binary file removed .DS_Store
Binary file not shown.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The script in the [clients](/clients/) folder can be invoked without commands:
`python3 Rsync.py`

After the start of the script, you will be asked to input a token and a host url.
If you leave both inputs empty, the script wil lused the default values, which are coded in the script ([Will be changed](#12))
If you leave both inputs empty, the script will use the default values which are coded in the script.

## Python with options

Expand Down Expand Up @@ -112,9 +112,9 @@ Command description:

## Uploading files

There is a possibility to upload files to a moodle course. For that you need the `Moodle mobile web service`.
If you use the script u can change the variable `web_service_token` in the Rsync.py file.
An option to override the default is comming in the future.
There is a possibility to upload files to a Moodle course. For that you need the `Moodle mobile web service`.
If you use the script you can change the variable `web_service_token` in the Rsync.py file.
An option to override the default is coming in the future.

If you use cURL you need to make 3 calls:

Expand All @@ -125,4 +125,4 @@ If you use cURL you need to make 3 calls:

## Acknowledgements

Thanks a lot to @lucaboesch for helping us in this project.
Thanks a lot to [@lucaboesch](https://github.com/lucaboesch) for helping us in this project.
3 changes: 2 additions & 1 deletion db/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@
'local_rsync_remove_file_from_section', 'local_rsync_rename_section', 'local_rsync_remove_section',
'local_rsync_set_file_visibility', 'local_rsync_remove_all_files_from_section', 'local_rsync_change_course_visibility',
'local_rsync_move_file_to_other_section', 'local_rsync_move_all_modules_to_other_section', 'local_rsync_copy_course',
'local_rsync_remove_all_sections', 'local_rsync_copy_module', 'local_rsync_create_section', 'local_rsync_copy_all_section_modules'),
'local_rsync_remove_all_sections', 'local_rsync_copy_module', 'local_rsync_create_section',
'local_rsync_copy_all_section_modules'),
'restrictedusers' => 0,
'enabled' => 1,
)
Expand Down
9 changes: 7 additions & 2 deletions section.php
Original file line number Diff line number Diff line change
Expand Up @@ -779,9 +779,14 @@ public static function create_section($courseid, $sectionname) {

/**
* Lets the user copy all modules of a section and place it in a target section
*
*
* @param int $courseid courseid
* @param int $sectionnumber section number
* @param int $targetsectionnumber target section number
* @return string A string describing the result.
* @throws moodle_exception if the specified course doesn't exist or the user doesn't have the rights
*/
public static function copy_all_section_modules($courseid, $sectionnumber, $targetsectionnumber){
public static function copy_all_section_modules($courseid, $sectionnumber, $targetsectionnumber) {
global $DB, $USER;

// Check parameters.
Expand Down

0 comments on commit 2cf5676

Please sign in to comment.