Skip to content

Commit

Permalink
Merge pull request #20 from lucaboesch/badge
Browse files Browse the repository at this point in the history
Moodle CI Github Actions Badge
  • Loading branch information
roblesjoel authored Jun 16, 2022
2 parents a276a8d + c79e66c commit dc9852d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<h1 align="center">Moodle_Rsync</h1>
Moodle Rsync
=========================
[![Moodle Plugin
CI](https://github.com/RockstaYT/Moodle_Rsync/workflows/Moodle%20Plugin%20CI/badge.svg?branch=master)](https://github.com/RockstaYT/Moodle_Rsync/actions?query=workflow%3A%22Moodle+Plugin+CI%22+branch%3Amaster)

Thsis Plugin was developed as a part of the course Project 1 at [BFH](https://www.bfh.ch/de/).
This Plugin was developed as a part of the course Project 1 at [BFH](https://www.bfh.ch/de/).
It was made with the intention to help teachers with their file and course management.

If you want to test out this plugin, just download the newest [Release](https://github.com/RockstaYT/Moodle_Rsync/releases) and install it.
If you want to test out this plugin, just download the newest [Release](https://github.com/RockstaYT/Moodle_Rsync/releases) and install it in the local/ directory under local/rsync.
If you dont know how to install plugins in Moodle, please refer to this [help page](https://docs.moodle.org/400/en/Installing_plugins).

## How to use it
Expand Down
27 changes: 13 additions & 14 deletions section.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public static function set_section_visibilty($courseid, $sectionnumber, $visibil
/**
* Lets the user remove a file from a section
*
* @param int $courseud course id
* @param int $courseid course id
* @param int $sectionnumber section number
* @param string $filename the name of the file to be removed
* @return string A string describing the result
Expand Down Expand Up @@ -277,7 +277,7 @@ public static function remove_file_from_section($courseid, $sectionnumber, $file
/**
* Lets the user renane a section
*
* @param int $courseud course id
* @param int $courseid course id
* @param int $sectionnumber section number
* @param string $sectionname the new name of the section
* @return string A string describing the result
Expand Down Expand Up @@ -319,9 +319,8 @@ public static function rename_section($courseid, $sectionnumber, $sectionname) {
/**
* Lets the user remove a section
*
* @param int $courseud course id
* @param int $courseid course id
* @param int $sectionnumber section number
* @param string $sectionname the new name of the section
* @return string A string describing the result
* @throws moodle_exception to be explained
*/
Expand Down Expand Up @@ -367,7 +366,7 @@ public static function remove_section($courseid, $sectionnumber) {
/**
* Lets the user remove all sections from course
*
* @param int $course id
* @param int $courseid course id
* @return string A string describing the result
* @throws moodle_exception to be explained
*/
Expand Down Expand Up @@ -412,10 +411,10 @@ public static function remove_all_sections($courseid) {
/**
* Lets the user set the visibility of a file in a section
*
* @param int $courseud course id
* @param int $courseid course id
* @param int $sectionnumber section number
* @param string $sectionname the new name of the section
* @param int $visiblity the visiblity of the file
* @param string $filename the file name
* @param int $visibility the visiblity of the file
* @return string A string describing the result
* @throws moodle_exception to be explained
*/
Expand Down Expand Up @@ -579,7 +578,7 @@ public static function move_file_to_other_section($courseid, $sectionnumber, $ta
* Lets the user move all modules from a section to an other
*
* @param int $courseid course id
* @param int $sectionumber section number
* @param int $sectionnumber section number
* @param int $targetsectionnumber target section number
* @return string A string describing the result
* @throws moodle_exception to be explained
Expand Down Expand Up @@ -629,8 +628,8 @@ public static function move_all_modules_to_other_section($courseid, $sectionnumb
* Lets the user copy a module and insert it into section
*
* @param int $courseid courseid
* @param int $sectionumber section number
* @param int $targetsectionumber target section number
* @param int $sectionnumber section number
* @param int $targetsectionnumber target section number
* @param string $modulename name of the module to be copied
* @return string A string describing the result
* @throws moodle_exception if the course, the section, the target section or the module doesn't exist
Expand Down Expand Up @@ -732,13 +731,13 @@ public static function copy_module($courseid, $sectionnumber, $targetsectionnumb

/**
* Lets the user create a section at the end of a course
*
*
* @param int $courseid course id
* @param string $sectionname name of the section
* @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 create_section($courseid, $sectionname){
public static function create_section($courseid, $sectionname) {
global $USER;

// Context validation.
Expand All @@ -753,7 +752,7 @@ public static function create_section($courseid, $sectionname){
// Create the new section in the course.
$section = course_create_section($courseid);

// Rename section
// Rename section.
course_update_section($courseid, $section, array('name' => $sectionname));

// Return the success message.
Expand Down

0 comments on commit dc9852d

Please sign in to comment.