Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backup/moodle2/backup_ratingallocate_activity_task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ protected function define_my_steps() {
/**
* Code the transformations to perform in the activity in
* order to get transportable (encoded) links
*
* @param array $content
*/
public static function encode_content_links($content) {
return $content;
Expand Down
6 changes: 3 additions & 3 deletions backup/moodle2/backup_restore_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/**
* Get fields for tableclass
*
* @param $class
* @param \stdClass $class
* @return array
* @throws ReflectionException
*/
Expand All @@ -45,7 +45,7 @@ function get_fields_for_tableclass($class) {
/**
* Get tablename for tableclass.
*
* @param $class
* @param \stdClass $class
* @return mixed
* @throws ReflectionException
*/
Expand All @@ -58,7 +58,7 @@ function get_tablename_for_tableclass($class) {
/**
* Get id for tableclass.
*
* @param $class
* @param \stdClass $class
* @return array
* @throws ReflectionException
*/
Expand Down
12 changes: 6 additions & 6 deletions backup/moodle2/restore_ratingallocate_activity_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected function define_structure() {
/**
* Process ratingallocate.
*
* @param $data
* @param array $data
* @return void
* @throws base_step_exception
* @throws dml_exception
Expand Down Expand Up @@ -89,7 +89,7 @@ protected function process_ratingallocate($data) {

/**
* Restore data for ratingallocate choices.
* @param $data
* @param array $data
* @return void
* @throws dml_exception
* @throws restore_step_exception
Expand All @@ -108,7 +108,7 @@ protected function process_ratingallocate_choices($data) {

/**
* Restore data for the ratingallocate ratings of users.
* @param $data
* @param array $data
* @return void
* @throws dml_exception
* @throws restore_step_exception
Expand All @@ -128,7 +128,7 @@ protected function process_ratingallocate_ratings($data) {

/**
* Restore data of allocations of users to choices.
* @param $data
* @param array $data
* @return void
* @throws dml_exception
* @throws restore_step_exception
Expand Down Expand Up @@ -167,7 +167,7 @@ protected function process_ratingallocate_group_choices($data) {

/**
* Restore data for generated groups based on allocations.
* @param $data
* @param array $data
* @return void
* @throws dml_exception
* @throws restore_step_exception
Expand All @@ -186,7 +186,7 @@ protected function process_ratingallocate_ch_gengroups($data) {

/**
* Restore data for generated groupings based on allocations.
* @param $data
* @param array $data
* @return void
* @throws dml_exception
* @throws restore_step_exception
Expand Down
8 changes: 4 additions & 4 deletions backup/moodle2/restore_ratingallocate_activity_task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ public static function define_decode_rules() {

/**
* Define the restore log rules that will be applied
* by the {@link restore_logs_processor} when restoring
* by the {@see restore_logs_processor} when restoring
* ratingallocate logs.
* It must return one array
* of {@link restore_log_rule} objects
* of {@see restore_log_rule} objects
*/
public static function define_restore_log_rules() {
$rules = [];
Expand All @@ -86,10 +86,10 @@ public static function define_restore_log_rules() {

/**
* Define the restore log rules that will be applied
* by the {@link restore_logs_processor} when restoring
* by the {@see restore_logs_processor} when restoring
* course logs.
* It must return one array
* of {@link restore_log_rule} objects
* of {@see restore_log_rule} objects
*
* Note this rules are applied when restoring course logs
* by the restore final task, but are defined here at
Expand Down
2 changes: 1 addition & 1 deletion classes/allocations_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public function build_table_by_sql() {

/**
* Returns a link to a user profile labeled with the full name of the user.
* @param $user \stdClass user object.
* @param \stdClass $user user object.
* @return string HTML code representing the link to the users profile.
*/
private function get_user_link($user) {
Expand Down
4 changes: 2 additions & 2 deletions classes/choice_importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public static function print_fields($fields=self::REQUIRED_FIELDS) {
/**
* Construct.
*
* @param $ratingallocateid
* @param $ratingallocate
* @param int $ratingallocateid
* @param \ratingallocate $ratingallocate
*/
public function __construct($ratingallocateid, $ratingallocate) {
$this->ratingallocate = $ratingallocate;
Expand Down
5 changes: 3 additions & 2 deletions classes/event/all_ratings_deleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ class all_ratings_deleted extends \core\event\base {

/**
* Create simple all_ratings_deleted event.
* @param $modulecontext
* @param $ratingallocateid
*
* @param \stdClass $modulecontext
* @param int $ratingallocateid
* @return \core\event\base
* @throws \coding_exception
*/
Expand Down
5 changes: 3 additions & 2 deletions classes/event/allocation_published.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ class allocation_published extends \core\event\base {

/**
* Create simple allocation_published event.
* @param $modulecontext
* @param $ratingallocateid
*
* @param \stdClass $modulecontext
* @param int $ratingallocateid
* @return \core\event\base
* @throws \coding_exception
*/
Expand Down
5 changes: 3 additions & 2 deletions classes/event/allocation_statistics_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ class allocation_statistics_viewed extends \core\event\base {

/**
* Create simple allocation_statistics_viewed event.
* @param $modulecontext
* @param $ratingallocateid
*
* @param \stdClass $modulecontext
* @param int $ratingallocateid
* @return \core\event\base
* @throws \coding_exception
*/
Expand Down
5 changes: 3 additions & 2 deletions classes/event/allocation_table_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ class allocation_table_viewed extends \core\event\base {

/**
* Create simple allocation_table_viewed event.
* @param $modulecontext
* @param $ratingallocateid
*
* @param \stdClass $modulecontext
* @param int $ratingallocateid
* @return \core\event\base
* @throws \coding_exception
*/
Expand Down
7 changes: 4 additions & 3 deletions classes/event/distribution_triggered.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ class distribution_triggered extends \core\event\base {

/**
* Create simple distribution_triggered event.
* @param $modulecontext
* @param $ratingallocateid
* @param $timeneeded
*
* @param \stdClass $modulecontext
* @param int $ratingallocateid
* @param float $timeneeded
* @return \core\event\base
* @throws \coding_exception
*/
Expand Down
3 changes: 2 additions & 1 deletion classes/event/index_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class index_viewed extends \core\event\base {

/**
* Create simple index_viewed event.
* @param $coursecontext
*
* @param \stdClass $coursecontext
* @return \core\event\base
* @throws \coding_exception
*/
Expand Down
5 changes: 3 additions & 2 deletions classes/event/manual_allocation_saved.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ class manual_allocation_saved extends \core\event\base {

/**
* Create simple manual_allocation_saved event.
* @param $modulecontext
* @param $ratingallocateid
*
* @param \stdClass $modulecontext
* @param int $ratingallocateid
* @return \core\event\base
* @throws \coding_exception
*/
Expand Down
5 changes: 3 additions & 2 deletions classes/event/rating_deleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ class rating_deleted extends \core\event\base {

/**
* Create simple rating_deleted event.
* @param $modulecontext
* @param $ratingallocateid
*
* @param \stdClass $modulecontext
* @param int $ratingallocateid
* @return \core\event\base
* @throws \coding_exception
*/
Expand Down
6 changes: 3 additions & 3 deletions classes/event/rating_saved.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class rating_saved extends \core\event\base {

/**
* Create simple rating_saved event.
* @param $modulecontext
* @param $ratingallocateid
* @param $rating
* @param \stdClass $modulecontext
* @param int $ratingallocateid
* @param float $rating
* @return \core\event\base
* @throws \coding_exception
*/
Expand Down
5 changes: 3 additions & 2 deletions classes/event/rating_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ class rating_viewed extends \core\event\base {

/**
* Create simple rating_viewed event.
* @param $modulecontext
* @param $ratingallocateid
*
* @param \stdClass $modulecontext
* @param int $ratingallocateid
* @return \core\event\base
* @throws \coding_exception
*/
Expand Down
5 changes: 3 additions & 2 deletions classes/event/ratingallocate_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ class ratingallocate_viewed extends \core\event\base {

/**
* Create simple ratingallocate_viewed event.
* @param $modulecontext
* @param $ratingallocateid
*
* @param \stdClass $modulecontext
* @param int $ratingallocateid
* @return \core\event\base
* @throws \coding_exception
*/
Expand Down
5 changes: 3 additions & 2 deletions classes/event/ratings_and_allocation_table_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ class ratings_and_allocation_table_viewed extends \core\event\base {

/**
* Create simple ratings_and_allocation_table_viewed event.
* @param $modulecontext
* @param $ratingallocateid
*
* @param \stdClass $modulecontext
* @param int $ratingallocateid
* @return \core\event\base
* @throws \coding_exception
*/
Expand Down
33 changes: 18 additions & 15 deletions classes/ratings_and_allocations_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ class ratings_and_allocations_table extends \table_sql {
* Construct.
*
* @param \mod_ratingallocate_renderer $renderer
* @param $titles
* @param $ratingallocate
* @param $action
* @param $uniqueid
* @param $downloadable
* @param array $titles
* @param \ratingallocate $ratingallocate
* @param int $action
* @param string|null $uniqueid
* @param bool $downloadable
* @throws \coding_exception
* @throws \dml_exception
*/
Expand Down Expand Up @@ -132,8 +132,9 @@ public function __construct(\mod_ratingallocate_renderer $renderer, $titles, $ra
* Setup this table with choices and filter options
*
* @param array $choices an array of choices
* @param $hidenorating
* @param $showallocnecessary
* @param bool|null $hidenorating
* @param bool|null $showallocnecessary
* @param int|null $groupselect
*/
public function setup_table($choices, $hidenorating = null, $showallocnecessary = null, $groupselect = 0) {

Expand Down Expand Up @@ -338,9 +339,9 @@ function ($c) {
/**
* Adds one row for each user
*
* @param $user object of the user for who a row should be added.
* @param $userratings array consisting of pairs of choiceid to rating for the user.
* @param $userallocations array constisting of paris of choiceid and allocation of the user.
* @param object $user of the user for who a row should be added.
* @param array $userratings consisting of pairs of choiceid to rating for the user.
* @param array $userallocations constisting of pairs of choiceid and allocation of the user.
*/
private function add_user_ratings_row($user, $userratings, $userallocations) {

Expand Down Expand Up @@ -524,7 +525,7 @@ private function render_cell($userid, $choiceid, $text, $checked, $class = '') {
/**
* Prints one hidden field for every user currently displayed in the table.
* Is used for checking, which allocation have to be deleted.
* @param $users array of users displayed for the current filter settings.
* @param array $users of users displayed for the current filter settings.
*/
private function print_hidden_user_fields($users) {
if ($this->writeable) {
Expand All @@ -551,8 +552,9 @@ private function print_hidden_user_fields($users) {
/**
* Setup for filtering the table.
* Loads the filter settings from the user preferences and overrides them if wanted, with the two parameters.
* @param $hidenorating bool if true it shows also users with no rating.
* @param $showallocnecessary bool if true it shows only users without allocations.
* @param bool $hidenorating if true it shows also users with no rating.
* @param bool $showallocnecessary if true it shows only users without allocations.
* @param int $groupselect int if 0 it shows all users, if -1 it shows all users not in a group, otherwise it shows only users in the selected group.
*/
private function setup_filter($hidenorating = null, $showallocnecessary = null, $groupselect = null) {
// Get the filter settings.
Expand Down Expand Up @@ -597,7 +599,8 @@ public function get_filter() {
/**
* Filters a set of given userids in accordance of the two filter variables $hidenorating and $showallocnecessary
* and the selected group
* @param $userids array ids, which should be filtered.
*
* @param array $userids ids, which should be filtered.
* @return array of filtered user ids.
*/
private function filter_userids($userids) {
Expand Down Expand Up @@ -657,7 +660,7 @@ function($u) {
/**
* Filter choiceids.
*
* @param $choiceids
* @param array $choiceids
* @return array
* @throws \dml_exception
*/
Expand Down
3 changes: 0 additions & 3 deletions form_manual_allocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,6 @@ public function definition_after_data() {
/**
* Overriding formslib's add_action_buttons() method, to add an extra submit "save changes and continue" button.
*
* @param bool $cancel show cancel button
* @param string $submitlabel null means default, false means none, string is label text
* @param string $submit2label null means default, false means none, string is label text
* @return void
*/
public function add_special_action_buttons() {
Expand Down
10 changes: 8 additions & 2 deletions form_modify_choice.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@ class modify_choice_form extends moodleform {

/**
* Constructor
*
* @param string $url
* @param ratingallocate $ratingallocate
* @param ratingallocate_choice $choice
* @param array $customdata
* @param ratingallocate_choice|null $choice
* @param array|null $customdata
* @return void
* @throws coding_exception
*/
public function __construct($url, ratingallocate $ratingallocate,
?ratingallocate_choice $choice, ?array $customdata) {
Expand Down Expand Up @@ -172,6 +175,9 @@ public function to_html() {

/**
* Checks that accesstimestart is before accesstimestop
*
* @param array $data
* @param array $files
*/
public function validation($data, $files) {
$errors = parent::validation($data, $files);
Expand Down
Loading