Skip to content

Commit

Permalink
MDL-75759 courseformat: Link classes in PHPDocs with @see tags
Browse files Browse the repository at this point in the history
- Linking classes/methods mentioned in PHPDoc with @see tags help devs
checking the PHPDoc to quickly navigate to the class/method mentioned
and also helps us ensure that it points to the correct class/method.
- Some typo/grammar fixes as well in existing PHPDoc descriptions.
- Fixed parameter type in execute()'s PHPDoc block.
  • Loading branch information
junpataleta committed Nov 3, 2022
1 parent e43fef8 commit a343faa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions course/format/classes/external/update_course.php
Expand Up @@ -72,22 +72,22 @@ public static function execute_parameters(): external_function_parameters {

/**
* This webservice will execute any action from the course editor. The default actions
* are located in core_courseformat\stateactions but the format plugin can extend that class
* are located in {@see \core_courseformat\stateactions} but the format plugin can extend that class
* in format_XXX\course.
*
* The specific action methods will register in a core_courseformat\stateupdates all the affected
* sections, cms and course attribute. This object (in JSON) will be send back to the
* The specific action methods will register in a {@see \core_courseformat\stateupdates} all the affected
* sections, cms and course attribute. This object (in JSON) will be sent back to the
* frontend editor to refresh the updated state elements.
*
* By default, core_courseformat\stateupdates will register only create, delete and update events
* By default, {@see \core_courseformat\stateupdates} will register only create, delete and update events
* on cms, sections and the general course data. However, if some plugin needs adhoc messages for
* its own mutation module, it extend this class in format_XXX\course.
* its own mutation module, extend this class in format_XXX\course.
*
* @param string $action the action name to execute
* @param int $courseid the course id
* @param int[] $ids the affected ids (section or cm depending on the action)
* @param int $targetsectionid optional target section id (for move action)
* @param int $targetcmid optional target cm id (for move action)
* @param int|null $targetsectionid optional target section id (for move action)
* @param int|null $targetcmid optional target cm id (for move action)
* @return string Course state in JSON
*/
public static function execute(string $action, int $courseid, array $ids = [],
Expand Down
4 changes: 2 additions & 2 deletions course/format/classes/stateupdates.php
Expand Up @@ -30,8 +30,8 @@
*
* Each format plugin could extend this class to provide new updates to the frontend
* mutation module.
* Extended classes should be locate in "format_XXX\course" namespace and
* extends core_courseformat\stateupdates.
* Extended classes should be located in "format_XXX\course" namespace and
* extends {@see \core_courseformat\stateupdates}.
*
* @package core_course
* @copyright 2021 Ferran Recio <ferran@moodle.com>
Expand Down

0 comments on commit a343faa

Please sign in to comment.