diff --git a/.github/workflows/moodle-plugin-ci.yml b/.github/workflows/moodle-plugin-ci.yml index 9d10d48c..cf09fbc9 100644 --- a/.github/workflows/moodle-plugin-ci.yml +++ b/.github/workflows/moodle-plugin-ci.yml @@ -143,11 +143,11 @@ jobs: - name: Moodle Code Checker if: ${{ always() }} - run: moodle-plugin-ci phpcs --max-warnings 0 || true + run: moodle-plugin-ci phpcs --max-warnings 0 - name: Moodle PHPDoc Checker if: ${{ always() }} - run: moodle-plugin-ci phpdoc || true + run: moodle-plugin-ci phpdoc - name: Validating if: ${{ always() }} diff --git a/backup/moodle2/restore_plagiarism_turnitin_plugin.class.php b/backup/moodle2/restore_plagiarism_turnitin_plugin.class.php index ac1f6272..fc0676e0 100644 --- a/backup/moodle2/restore_plagiarism_turnitin_plugin.class.php +++ b/backup/moodle2/restore_plagiarism_turnitin_plugin.class.php @@ -37,6 +37,10 @@ protected function define_course_plugin_structure() { * Restore the Turnitin course * This will only be done this if the course is from the same site it was backed up from * and if the Turnitin course id does not currently exist in the database. + * + * @param array $data The data to be restored + * @return void + * @throws dml_exception */ public function process_turnitin_course($data) { global $DB; @@ -72,6 +76,10 @@ protected function define_module_plugin_structure() { * Restore the Turnitin assignment id for this module * This will only be done this if the module is from the same site it was backed up from * and if the Turnitin assignment id does not currently exist in the database. + * + * @param array $data The data to be restored + * @return void + * @throws dml_exception */ public function process_turnitin_config($data) { global $DB; @@ -98,6 +106,10 @@ public function process_turnitin_config($data) { * Restore the links to Turnitin files. * This will only be done this if the module is from the same site it was backed up from * and if the Turnitin submission does not currently exist in the database. + * + * @param array $data The data to be restored + * @return void + * @throws dml_exception */ public function process_turnitin_files($data) { global $DB; diff --git a/classes/digitalreceipt/pp_receipt_message.php b/classes/digitalreceipt/pp_receipt_message.php index dba93da9..d7ad5da4 100644 --- a/classes/digitalreceipt/pp_receipt_message.php +++ b/classes/digitalreceipt/pp_receipt_message.php @@ -26,7 +26,9 @@ class pp_receipt_message { /** * Send digital receipt to submitter * + * @param int $userid * @param string $message + * @param int $courseid * @return void */ public function send_message($userid, $message, $courseid) { diff --git a/classes/forms/turnitin_setupform.class.php b/classes/forms/turnitin_setupform.class.php index edc11990..c2af8168 100644 --- a/classes/forms/turnitin_setupform.class.php +++ b/classes/forms/turnitin_setupform.class.php @@ -259,6 +259,8 @@ public function display() { /** * Save the plugin config data + * + * @param stdClass $data */ public function save($data) { global $CFG; diff --git a/classes/modules/turnitin_assign.class.php b/classes/modules/turnitin_assign.class.php index 072cc98e..41ab9415 100644 --- a/classes/modules/turnitin_assign.class.php +++ b/classes/modules/turnitin_assign.class.php @@ -51,7 +51,7 @@ public function __construct() { /** * Check whether the user is a tutor * - * @param $context + * @param context $context The context * @return bool * @throws coding_exception */ @@ -68,22 +68,10 @@ public function get_tutor_capability() { return 'mod/'.$this->modname.':grade'; } - /** - * Whether the user is enrolled on the course and has the capability to submit assignments - * - * @param $context - * @param $userid - * @return bool - * @throws coding_exception - */ - public function user_enrolled_on_course($context, $userid) { - return has_capability('mod/'.$this->modname.':submit', $context, $userid); - } - /** * Get the author of the submission * - * @param $itemid + * @param int $itemid The item id * @return int * @throws dml_exception */ @@ -97,11 +85,23 @@ public function get_author($itemid) { } } + /** + * Whether the user is enrolled on the course and has the capability to submit assignments + * + * @param context $context The context + * @param int $userid The user id + * @return bool + * @throws coding_exception + */ + public function user_enrolled_on_course($context, $userid) { + return has_capability('mod/'.$this->modname.':submit', $context, $userid); + } + /** * Set the content of the submission * - * @param $linkarray - * @param $cm + * @param array $linkarray The link array + * @param object $cm The course module. * @return string */ public function set_content($linkarray, $cm) { @@ -114,7 +114,11 @@ public function set_content($linkarray, $cm) { /** * Check if resubmissions in a Turnitin sense are allowed to an assignment. * - * @param $assignid + * @param int $assignid The assignment id + * @param int $reportgenspeed The report generation speed + * @param string $submissiontype The submission type + * @param int $attemptreopenmethod The attempt reopen method + * @param string $attemptreopened The attempt reopened status */ public function is_resubmission_allowed($assignid, $reportgenspeed, $submissiontype, $attemptreopenmethod, $attemptreopened = null) { @@ -150,8 +154,8 @@ public function is_resubmission_allowed($assignid, $reportgenspeed, $submissiont /** * Get the onlinetext submission * - * @param $userid - * @param $cm + * @param int $userid The user id + * @param object $cm The course module. * @return stdClass * @throws dml_exception */ @@ -181,7 +185,7 @@ public function get_onlinetext($userid, $cm) { /** * Create a file event * - * @param $params + * @param array $params The params * @return \core\event\base * @throws coding_exception */ @@ -192,7 +196,7 @@ public function create_file_event($params) { /** * Create a text event * - * @param $params + * @param array $params The params * @return \core\event\base * @throws coding_exception */ @@ -203,9 +207,9 @@ public function create_text_event($params) { /** * Get the current grade query * - * @param $userid - * @param $moduleid - * @param $itemid + * @param int $userid The user id + * @param int $moduleid The module id + * @param int $itemid The item id * @return false|mixed * @throws dml_exception */ @@ -222,7 +226,7 @@ public function get_current_gradequery($userid, $moduleid, $itemid = 0) { /** * Initialise the post date for the module * - * @param $moduledata + * @param stdClass $moduledata The module data * @return int */ public function initialise_post_date($moduledata) { diff --git a/classes/modules/turnitin_coursework.class.php b/classes/modules/turnitin_coursework.class.php index f9f7f557..5ff8780f 100644 --- a/classes/modules/turnitin_coursework.class.php +++ b/classes/modules/turnitin_coursework.class.php @@ -51,7 +51,7 @@ public function __construct() { /** * Check whether the user is a tutor * - * @param $context + * @param context $context The context * @return bool */ public function is_tutor($context) { @@ -72,8 +72,8 @@ public function get_tutor_capability() { /** * Whether the user is enrolled on the course and has the capability to submit coursework * - * @param $context - * @param $userid + * @param context $context The context + * @param int $userid The user id * @return bool * @throws coding_exception */ @@ -84,7 +84,7 @@ public function user_enrolled_on_course($context, $userid) { /** * Get the author of the submission * - * @param $itemid + * @param int $itemid The item id * @return int * @throws dml_exception */ @@ -103,7 +103,7 @@ public function get_author($itemid) { /** * Create a file event * - * @param $params + * @param array $params The params * @return mixed */ public function create_file_event($params) { @@ -113,9 +113,9 @@ public function create_file_event($params) { /** * Get the current grade query * - * @param $userid - * @param $moduleid - * @param $itemid + * @param int $userid The user id + * @param int $moduleid The module id + * @param int $itemid The item id * @return false|mixed * @throws dml_exception */ @@ -140,7 +140,7 @@ public function get_current_gradequery($userid, $moduleid, $itemid = 0) { /** * Initialise the post date for the module * - * @param $moduledata + * @param stdClass $moduledata The module data * @return int */ public function initialise_post_date($moduledata) { diff --git a/classes/modules/turnitin_forum.class.php b/classes/modules/turnitin_forum.class.php index 5b14c429..cec4c235 100644 --- a/classes/modules/turnitin_forum.class.php +++ b/classes/modules/turnitin_forum.class.php @@ -51,7 +51,7 @@ public function __construct() { /** * Check whether the user is a tutor * - * @param $context + * @param context $context The context * @return bool * @throws coding_exception */ @@ -71,8 +71,8 @@ public function get_tutor_capability() { /** * Whether the user is enrolled on the course and has the capability to reply to posts * - * @param $context - * @param $userid + * @param context $context The context + * @param int $userid The user id * @return bool * @throws coding_exception */ @@ -83,7 +83,7 @@ public function user_enrolled_on_course($context, $userid) { /** * Get the author of the forum post * - * @param $itemid + * @param int $itemid The item id * @return void */ public function get_author($itemid = 0) { @@ -93,7 +93,7 @@ public function get_author($itemid = 0) { /** * Set the content of the forum post * - * @param $linkarray + * @param array $linkarray The link array * @return mixed * @throws dml_exception */ @@ -111,7 +111,7 @@ public function set_content($linkarray) { /** * Create a file event * - * @param $params + * @param array $params The params * @return \core\event\base * @throws coding_exception */ @@ -122,9 +122,9 @@ public function create_file_event($params) { /** * Get the current grade query * - * @param $userid - * @param $moduleid - * @param $itemid + * @param int $userid The user id + * @param int $moduleid The module id + * @param int $itemid The item id * @return false|mixed|stdClass * @throws dml_exception */ @@ -138,7 +138,7 @@ public function get_current_gradequery($userid, $moduleid, $itemid = 0) { /** * Initialise the post date for the module * - * @param $moduledata + * @param stdClass $moduledata The module data * @return int */ public function initialise_post_date($moduledata) { @@ -150,7 +150,7 @@ public function initialise_post_date($moduledata) { /** * Get the forum discussion id * - * @param $forumdata + * @param string $forumdata The forum data * @return string */ public function get_discussionid($forumdata) { diff --git a/classes/modules/turnitin_quiz.class.php b/classes/modules/turnitin_quiz.class.php index 6ced1af3..3802630d 100644 --- a/classes/modules/turnitin_quiz.class.php +++ b/classes/modules/turnitin_quiz.class.php @@ -54,7 +54,7 @@ public function __construct() { /** * Check whether the user is a tutor * - * @param $context + * @param context $context The context * @return bool * @throws coding_exception */ @@ -65,8 +65,8 @@ public function is_tutor($context) { /** * Whether the user is enrolled on the course and has the capability to submit quiz attempts * - * @param $context - * @param $userid + * @param context $context The context + * @param int $userid The user id * @return bool * @throws coding_exception */ @@ -77,7 +77,7 @@ public function user_enrolled_on_course($context, $userid) { /** * Get the author of the quiz attempt * - * @param $itemid + * @param int $itemid The item id * @return void */ public function get_author($itemid = 0) { @@ -96,7 +96,7 @@ public function get_tutor_capability() { /** * Set the content of the quiz attempt * - * @param $linkarray + * @param array $linkarray The link array * @return mixed */ public function set_content($linkarray) { @@ -106,9 +106,9 @@ public function set_content($linkarray) { /** * Get the current grade query * - * @param $userid - * @param $moduleid - * @param $itemid + * @param int $userid The user id + * @param int $moduleid The module id + * @param int $itemid The item id * @return false|mixed|stdClass * @throws dml_exception */ @@ -124,9 +124,9 @@ public function get_current_gradequery($userid, $moduleid, $itemid = 0) { /** * Calculate the mark for a question attempt based on the grade given for the answer in TFS. * - * @param $grade - * @param $questionmaxmark - * @param $quizgrade + * @param float $grade The grade given for the answer in TFS + * @param float $questionmaxmark The maximum mark for the question + * @param float $quizgrade The total grade for the quiz * @return float|int */ public function calculate_mark($grade, $questionmaxmark, $quizgrade) { @@ -137,11 +137,11 @@ public function calculate_mark($grade, $questionmaxmark, $quizgrade) { /** * Set a new mark for a question attempt based on the grade given for the answer in TFS. * - * @param $attemptid - * @param $identifier - * @param $userid - * @param $grade - * @param $quizgrade + * @param int $attemptid The attempt id + * @param string $identifier The question slot identifier + * @param int $userid The user id + * @param float $grade The grade given for the answer in TFS + * @param float $quizgrade The total grade for the quiz * @return void * @throws dml_exception * @throws dml_transaction_exception diff --git a/classes/modules/turnitin_workshop.class.php b/classes/modules/turnitin_workshop.class.php index 9c354909..11f248a2 100644 --- a/classes/modules/turnitin_workshop.class.php +++ b/classes/modules/turnitin_workshop.class.php @@ -51,7 +51,7 @@ public function __construct() { /** * Check whether the user is a tutor * - * @param $context + * @param context $context The context * @return bool * @throws coding_exception */ @@ -71,8 +71,8 @@ public function get_tutor_capability() { /** * Whether the user is enrolled on the course and has the capability to submit a workshop submission * - * @param $context - * @param $userid + * @param context $context The context + * @param int $userid The user id * @return bool * @throws coding_exception */ @@ -83,7 +83,7 @@ public function user_enrolled_on_course($context, $userid) { /** * Get the author of the workshop submission * - * @param $itemid + * @param int $itemid The item id * @return void */ public function get_author($itemid) { @@ -93,8 +93,8 @@ public function get_author($itemid) { /** * Set the content of the workshop submission * - * @param $linkarray - * @param $moduleid + * @param array $linkarray The link array + * @param int $moduleid The module id * @return mixed */ public function set_content($linkarray, $moduleid) { @@ -104,8 +104,8 @@ public function set_content($linkarray, $moduleid) { /** * Get the onlinetext * - * @param $userid - * @param $cm + * @param int $userid The user id + * @param object $cm The course module. * @return stdClass * @throws dml_exception */ @@ -126,7 +126,7 @@ public function get_onlinetext($userid, $cm) { /** * Create a file event * - * @param $params + * @param array $params The params * @return \core\event\base * @throws coding_exception */ @@ -137,7 +137,7 @@ public function create_file_event($params) { /** * Create a text event * - * @param $params + * @param array $params The params * @return \core\event\base * @throws coding_exception */ @@ -148,9 +148,9 @@ public function create_text_event($params) { /** * Get the current grade query * - * @param $userid - * @param $moduleid - * @param $itemid + * @param int $userid The user id + * @param int $moduleid The module id + * @param int $itemid The item id * @return false|mixed|stdClass * @throws dml_exception */ @@ -164,7 +164,7 @@ public function get_current_gradequery($userid, $moduleid, $itemid = 0) { /** * Initialise the post date for the module * - * @param $moduledata + * @param stdClass $moduledata The module data * @return mixed */ public function initialise_post_date($moduledata) { diff --git a/classes/observer.php b/classes/observer.php index ab960278..42ae4369 100644 --- a/classes/observer.php +++ b/classes/observer.php @@ -40,8 +40,8 @@ public static function course_module_deleted( } /** - * Handle the course_module_deleted event. - * @param \core\event\course_module_deleted $event + * Handle the course_module_ended event. + * @param \core\event\course_reset_ended $event */ public static function course_reset( \core\event\course_reset_ended $event) { @@ -109,8 +109,9 @@ public static function assignsubmission_onlinetext_uploaded( } /** - * Handle the assignment assessable_submitted event. - * @param \mod_assign\event\assessable_submitted $event + * Handle the coursework assessable_uploaded event. + * + * @param \mod_coursework\event\assessable_uploaded $event */ public static function coursework_submitted( \mod_coursework\event\assessable_uploaded $event) { diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php index 0faf1539..abafd839 100644 --- a/classes/privacy/provider.php +++ b/classes/privacy/provider.php @@ -51,7 +51,7 @@ class provider implements /** * Return the fields which contain personal data. * - * @param $collection collection a reference to the collection to use to store the metadata. + * @param collection $collection a reference to the collection to use to store the metadata. * @return $collection the updated collection of metadata items. */ public static function _get_metadata(collection $collection) { diff --git a/classes/turnitin_assignment.class.php b/classes/turnitin_assignment.class.php index afd6fd45..9dbe3e6c 100644 --- a/classes/turnitin_assignment.class.php +++ b/classes/turnitin_assignment.class.php @@ -44,8 +44,8 @@ class turnitin_assignment { /** * turnitin_assignment constructor. * - * @param $id - * @param $turnitincomms + * @param int $id The ID of the assignment + * @param turnitin_comms $turnitincomms The Turnitin comms object */ public function __construct($id = 0, $turnitincomms = null) { $this->id = $id; @@ -141,7 +141,7 @@ public function create_tii_course($course, $workflowcontext = "site") { /** * Edit the course title in Turnitin * - * @param var $course The course object + * @param object $course The course object */ public function edit_tii_course($course) { global $DB; @@ -207,7 +207,7 @@ public static function truncate_title($title, $limit) { /** * Create Assignment on Turnitin and return id, delete the instance if it fails * - * @param object $assignment add assignment instance + * @param object $assignment The assignment instance * @param string $workflowcontext The workflow being used to call this - site or cron. */ public function create_tii_assignment($assignment, $workflowcontext = "site") { @@ -235,7 +235,7 @@ public function create_tii_assignment($assignment, $workflowcontext = "site") { /** * Edit Assignment on Turnitin * - * @param object $assignment edit assignment instance + * @param object $assignment The assignment instance * @param string $workflowcontext The workflow being used to call this - site or cron. */ public function edit_tii_assignment($assignment, $workflowcontext = "site") { @@ -280,7 +280,7 @@ public function edit_tii_assignment($assignment, $workflowcontext = "site") { /** * Get the Peermark assignments for this activity. * - * @param $tiiassignid + * @param int $tiiassignid The Turnitin assignment id * @return array */ public function get_peermark_assignments($tiiassignid) { @@ -295,8 +295,8 @@ public function get_peermark_assignments($tiiassignid) { /** * Wrapper for Turnitin API call createClass(). * - * @param $turnitincall - * @param $class + * @param object $turnitincall + * @param TiiClass $class * @return mixed */ public function api_create_class($turnitincall, $class) { @@ -306,8 +306,8 @@ public function api_create_class($turnitincall, $class) { /** * Wrapper for Turnitin API call createClass(). * - * @param $turnitincall - * @param $class + * @param object $turnitincall + * @param TiiClass $class * @return mixed */ public function api_update_class($turnitincall, $class) { @@ -317,7 +317,7 @@ public function api_update_class($turnitincall, $class) { /** * Wrapper for Turnitin API call getClass(). * - * @param $object + * @param object $object * @return mixed */ public function api_get_class($object) { @@ -327,7 +327,7 @@ public function api_get_class($object) { /** * Wrapper for Turnitin API call getClassId(). * - * @param $class + * @param TiiClass $class * @return mixed */ public function api_get_class_id($class) { @@ -337,8 +337,8 @@ public function api_get_class_id($class) { /** * Wrapper for Turnitin API call setClassId(). * - * @param $object - * @param $classid + * @param object $object + * @param int $classid * @return mixed */ public function api_set_class_id($object, $classid) { @@ -348,8 +348,8 @@ public function api_set_class_id($object, $classid) { /** * Wrapper for Turnitin API call createAssignment(). * - * @param $turnitincall - * @param $assignment + * @param object $turnitincall + * @param object $assignment The assignment instance * @return mixed */ public function api_create_assignment($turnitincall, $assignment) { @@ -359,8 +359,8 @@ public function api_create_assignment($turnitincall, $assignment) { /** * Wrapper for Turnitin API call createAssignment(). * - * @param $turnitincall - * @param $assignment + * @param object $turnitincall + * @param object $assignment The assignment instance * @return mixed */ public function api_update_assignment($turnitincall, $assignment) { @@ -370,7 +370,7 @@ public function api_update_assignment($turnitincall, $assignment) { /** * Wrapper for Turnitin API call getAssignment(). * - * @param $object + * @param object $object * @return mixed */ public function api_get_assignment($object) { @@ -380,7 +380,7 @@ public function api_get_assignment($object) { /** * Wrapper for Turnitin API call getAssignmentId(). * - * @param $assignment + * @param object $assignment The assignment instance * @return mixed */ public function api_get_assignment_id($assignment) { @@ -390,7 +390,7 @@ public function api_get_assignment_id($assignment) { /** * Wrapper for Turnitin API call getTitle(). * - * @param $assignment + * @param object $assignment The assignment instance * @return mixed */ public function api_get_title($assignment) { diff --git a/classes/turnitin_class.class.php b/classes/turnitin_class.class.php index e53d90f4..fb2d8ebf 100644 --- a/classes/turnitin_class.class.php +++ b/classes/turnitin_class.class.php @@ -53,7 +53,7 @@ class turnitin_class { /** * turnitin_class constructor. * - * @param $id + * @param int $id * @throws dml_exception */ public function __construct($id) { @@ -70,7 +70,7 @@ public function __construct($id) { /** * Update class from Turnitin, mainly to get shared rubrics * - * @return + * @return void */ public function read_class_from_tii() { // Initialise Comms Object. diff --git a/classes/turnitin_comms.class.php b/classes/turnitin_comms.class.php index f7d2961d..79867bb7 100644 --- a/classes/turnitin_comms.class.php +++ b/classes/turnitin_comms.class.php @@ -67,9 +67,9 @@ class turnitin_comms { /** * Constructor * - * @param $accountid - * @param $accountshared - * @param $url + * @param string $accountid + * @param string $accountshared + * @param string $url * @throws moodle_exception */ public function __construct($accountid = null, $accountshared = null, $url = null) { @@ -98,6 +98,7 @@ public function __construct($accountid = null, $accountshared = null, $url = nul /** * Initialise the API object * + * @param bool $istestingconnection * @return object \APITurnitin */ public function initialise_api($istestingconnection = false) { @@ -157,7 +158,8 @@ public function initialise_api($istestingconnection = false) { * * @param object $e * @param string $tterrorstr - * @param boolean $toscreen + * @param bool $toscreen + * @param bool $embedded */ public function handle_exceptions($e, $tterrorstr = "", $toscreen = true, $embedded = false) { $errorstr = ""; @@ -199,7 +201,6 @@ public function handle_exceptions($e, $tterrorstr = "", $toscreen = true, $embed /** * Outputs a language code to use with the Turnitin API * - * @param string $langcode The Moodle language code * @return string The cleaned and mapped associated Turnitin lang code */ private function get_lang() { diff --git a/classes/turnitin_submission.class.php b/classes/turnitin_submission.class.php index f81f6b19..9133872e 100644 --- a/classes/turnitin_submission.class.php +++ b/classes/turnitin_submission.class.php @@ -43,8 +43,8 @@ class turnitin_submission { /** * Class turnitin_submission constructor. * - * @param $id - * @param $data + * @param int $id + * @param stdClass $data * @throws coding_exception * @throws dml_exception */ diff --git a/classes/turnitin_user.class.php b/classes/turnitin_user.class.php index 23f87001..79e38778 100644 --- a/classes/turnitin_user.class.php +++ b/classes/turnitin_user.class.php @@ -81,11 +81,11 @@ class turnitin_user { /** * Constructor for the Turnitin User class * - * @param $id - * @param $role - * @param $enrol - * @param $workflowcontext - * @param $finduser + * @param int $id The id + * @param string $role The role + * @param bool $enrol Whether to enrol the user + * @param string $workflowcontext The workflow context + * @param bool $finduser Whether to find the user */ public function __construct($id, $role = "Learner", $enrol = true, $workflowcontext = "site", $finduser = true) { $this->id = $id; @@ -175,7 +175,6 @@ public function get_pseudo_firstname() { /** * Convert a regular lastname into the pseudo equivelant for student data privacy purpose * - * @param string $email The users email address * @return string A pseudo lastname address */ public function get_pseudo_lastname() { @@ -210,7 +209,6 @@ public function get_pseudo_lastname() { * or if none found, it will try and find user in Turnitin. If not found it * will create them in Turnitin if necessary * - * @param object $user A data object for the user * @return var A Turnitin User ID or null */ private function get_tii_user_id() { @@ -281,8 +279,6 @@ private function find_tii_user_id() { /** * Create the user on Turnitin * - * @param object $user_details A data object for the user - * @param var $role user role to create * @return var Turnitin user id */ private function create_tii_user() { @@ -328,8 +324,6 @@ private function create_tii_user() { /** * Edit the user's details on Turnitin (only name can be updated) * - * @param object $user_details A data object for the user - * @param var $role user role to create * @return boolean */ public function edit_tii_user() { @@ -418,7 +412,7 @@ private function save_tii_user() { /** * Enrol the user on this course/class in Turnitin * - * @param type $tiicourseid id for the course/class in Turnitin + * @param int $tiicourseid id for the course/class in Turnitin * @return boolean */ public function join_user_to_class($tiicourseid) { @@ -587,6 +581,7 @@ public function get_user_role() { /** * Set the rubrics the instructor has in Turnitin * + * @param string $role The role of the user * @return int */ private function set_user_role($role) { diff --git a/classes/turnitin_view.class.php b/classes/turnitin_view.class.php index 4a68c14d..2438a81e 100644 --- a/classes/turnitin_view.class.php +++ b/classes/turnitin_view.class.php @@ -56,6 +56,7 @@ public function output_header($url, $title = '', $heading = '', $return = false) * Prints the tab menu for the plugin settings * * @param string $currenttab The currect tab to be styled as selected + * @param array $notice An array containing the message and type of notice to display */ public function draw_settings_tab_menu($currenttab, $notice = null) { global $OUTPUT; @@ -84,8 +85,13 @@ public function draw_settings_tab_menu($currenttab, $notice = null) { * Due to moodle's internal plugin hooks we can not use our bespoke form class for Turnitin * settings. This form shows in settings > defaults as well as the activity creation screen. * - * @param type $plugin_defaults - * @return type + * @param moodleform $mform The form object + * @param object $course The course object + * @param string $location The location of the form + * @param string $modulename The name of the module + * @param int $cmid The course module id + * @param int $currentrubric The current rubric id + * @return void */ public function add_elements_to_settings_form($mform, $course, $location = "activity", $modulename = "", $cmid = 0, $currentrubric = 0) { @@ -450,7 +456,7 @@ public function add_elements_to_settings_form($mform, $course, $location = "acti /** * Show the errors table for file uploads. * - * @param $page + * @param int $page The page number to show. * @return string * @throws coding_exception * @throws moodle_exception @@ -586,6 +592,10 @@ public function show_file_errors_table($page = 0) { /** * This adds a site lock check to the most recently added field + * + * @param moodleform $mform the form object + * @param string $location the location of the form + * @param array $locks the locks array */ public function lock($mform, $location, $locks) { @@ -618,6 +628,7 @@ public function lock($mform, $location, $locks) { * @param int $userid the Turnitin user id * @param string $userrole the role the user has on Turnitin in the course/class * @param string $buttonstring string for the submit button + * @param bool $ltireturn return the LTI form as a string * @return string form */ public static function output_launch_form($type, $submissionid, $userid, $userrole, @@ -676,8 +687,10 @@ public static function output_launch_form($type, $submissionid, $userid, $userro * Return the output for a form to launch the relevant LTi function * It is then submitted on load via Javascript * + * @param string $type the type of document viewer that needs to be opened * @param string $userrole either Instructor or Learner - * @param int $userid + * @param int $partid the part id of the assignment + * @param int $classid the class id of the assignment * @return string form */ public static function output_lti_form_launch($type, $userrole, $partid = 0, $classid = 0) { diff --git a/lib.php b/lib.php index b04fd1f1..c4ee2e27 100755 --- a/lib.php +++ b/lib.php @@ -116,6 +116,7 @@ public function get_settings_fields() { /** * Get the configuration settings for the plagiarism plugin * + * @param string $modulename the name of the module * @return mixed if plugin is enabled then an array of config settings is returned or false if not */ public static function get_config_settings($modulename) { @@ -200,8 +201,8 @@ public function get_file_upload_errors($offset = 0, $limit = 0, $count = false) * This function is called from the inbox in mod assign. * This will alert the user to refresh the assignment when there has been a change in scores. * - * @param $course - Course the module is part of - * @param $cm - Course module + * @param object $course The course object + * @param object $cm The course module. * @return string */ public function update_status($course, $cm) { @@ -269,9 +270,10 @@ public function save_form_data($data) { /** * Add the Turnitin settings form to an add/edit activity page * - * @param object $mform - * @param object $context - * @return type + * @param moodleform $mform The form object + * @param context $context The context of the form + * @param string $modulename The name of the module + * @return void */ public function add_settings_form_to_activity_page($mform, $context, $modulename = "") { global $DB, $PAGE, $COURSE; @@ -356,7 +358,7 @@ public function add_settings_form_to_activity_page($mform, $context, $modulename * Remove Turnitin class and assignment links from database * so that new classes and assignments will be created. * - * @param type $eventdata + * @param object $eventdata * @return boolean */ public static function course_reset($eventdata) { @@ -431,6 +433,8 @@ public static function course_reset($eventdata) { * Test whether we can connect to Turnitin. * * Initially only being used if a student is logged in before checking whether they have accepted the EULA. + * + * @param string $workflowcontext The context of the workflow */ public function test_turnitin_connection($workflowcontext = 'site') { $turnitincomms = new turnitin_comms(); @@ -454,7 +458,7 @@ public function test_turnitin_connection($workflowcontext = 'site') { /** * Print the Turnitin student disclosure inside the submission page for students to see * - * @param $cmid + * @param int $cmid The course module id * @return string */ public function print_disclosure($cmid) { @@ -613,6 +617,10 @@ public function load_page_components() { /** * Get Moodle and Turnitin Course data + * + * @param int $cmid The course module id + * @param int $courseid The course id + * @param string $workflowcontext The context of the workflow */ public function get_course_data($cmid, $courseid, $workflowcontext = 'site') { $coursedata = turnitin_assignment::get_course_data($courseid, $workflowcontext); @@ -643,9 +651,10 @@ public function get_course_data($cmid, $courseid, $workflowcontext = 'site') { } /** + * Get the links to display on the submission page. * - * @param type $linkarray - * @return type + * @param array $linkarray The link array + * @return string */ public function get_links($linkarray) { global $CFG, $DB, $OUTPUT, $USER; @@ -1270,7 +1279,7 @@ public function get_links($linkarray) { /** * Query Turnitin for the papers that need updated locally. * - * @param $cm + * @param object $cm The course module. * @return false */ public function fetch_updated_paper_ids_from_turnitin($cm) { @@ -1303,7 +1312,7 @@ public function fetch_updated_paper_ids_from_turnitin($cm) { /** * Update grades from Turnitin. * - * @param $cm + * @param object $cm The course module. * @return bool|int */ public function update_grades_from_tii($cm) { @@ -1348,8 +1357,8 @@ public function update_grades_from_tii($cm) { /** * Update grade from Turnitin. * - * @param $cm - * @param $submissionid + * @param object $cm The course module. + * @param int $submissionid The submission id. * @return bool */ public function update_grade_from_tii($cm, $submissionid) { @@ -1384,9 +1393,9 @@ public function update_grade_from_tii($cm, $submissionid) { /** * Update submission data. * - * @param $cm - * @param $submissionid - * @param $tiisubmission + * @param object $cm The course module. + * @param int $submissionid The submission id. + * @param TiiSubmission $tiisubmission The Turnitin submission. * @return bool|int * @throws dml_exception * @throws dml_transaction_exception @@ -1515,6 +1524,10 @@ private function update_submission($cm, $submissionid, $tiisubmission) { /** * Update module grade and gradebook. + * + * @param object $cm The course module. + * @param object $submission The submission object. + * @param int $userid The user id. */ private function update_grade($cm, $submission, $userid, $cron = FALSE) { global $DB, $USER, $CFG; @@ -1683,6 +1696,9 @@ private function update_grade($cm, $submission, $userid, $cron = FALSE) { /** * Check if this is a group submission. + * + * @param object $cm The course module. + * @param int $userid The user id. */ public function check_group_submission($cm, $userid) { global $CFG, $DB; @@ -1705,8 +1721,8 @@ public function check_group_submission($cm, $userid) { * Related user ID will be NULL if an instructor submits on behalf of a student who is in a group. * To get around this, we get the group ID, get the group members and set the author as the first student in the group. * - * @param $cmid - * @param $groupid + * @param int $cmid The course module id. + * @param int $groupid The group id. * @return void * @throws coding_exception */ @@ -1726,6 +1742,11 @@ private function get_first_group_author($cmid, $groupid) { /** * Create a course within Turnitin + * + * @param int $cmid The course module id. + * @param string $modname The module name. + * @param object $coursedata The course data. + * @param string $workflowcontext The context of the workflow. */ public function create_tii_course($cmid, $modname, $coursedata, $workflowcontext = "site") { global $CFG; @@ -1763,6 +1784,9 @@ public function create_tii_course($cmid, $modname, $coursedata, $workflowcontext /** * Get Peermark Assignments for this module from Turnitin. + * + * @param object $cm The course module. + * @param string $tiiassignmentid The Turnitin assignment id. */ public function refresh_peermark_assignments($cm, $tiiassignmentid) { global $DB; @@ -1813,9 +1837,61 @@ public function refresh_peermark_assignments($cm, $tiiassignmentid) { } } + /** + * Check for rubric and save to assignment. + * + * @param object $cm The course module. + */ + public function update_rubric_from_tii($cm) { + global $DB; + + $turnitincomms = new turnitin_comms(); + $turnitincall = $turnitincomms->initialise_api(); + $assignment = new TiiAssignment(); + + if ($tiimoduledata = $DB->get_record('plagiarism_turnitin_config', + ['cm' => $cm->id, 'name' => 'turnitin_assignid'], 'value')) { + + $assignment->setAssignmentId($tiimoduledata->value); + + try { + // Retrieve assignment from Turnitin. + $response = $turnitincall->readAssignment($assignment); + $tiiassignment = $response->getAssignment(); + + // Create rubric config field with rubric value from Turnitin. + $rubricfield = new stdClass(); + $rubricfield->cm = $cm->id; + $rubricfield->name = 'plagiarism_rubric'; + $rubricfield->value = $tiiassignment->getRubricId(); + + // Check if rubric already exists for this module. + if ($configfield = $DB->get_field('plagiarism_turnitin_config', 'id', + (['cm' => $cm->id, 'name' => 'plagiarism_rubric']))) { + + // Use current configfield to update rubric value. + $rubricfield->id = $configfield; + + $DB->update_record('plagiarism_turnitin_config', $rubricfield); + } else { + // Otherwise create rubric entry for this module. + $rubricfield->config_hash = $rubricfield->cm."_".$rubricfield->name; + $DB->create_record('plagiarism_turnitin_config', $rubricfield); + } + } catch (Exception $e) { + $turnitincomms->handle_exceptions($e, 'tiiassignmentgeterror', false); + } + } + } + /** * Create the module as an assignment within Turnitin if it does not exist, * if we have a Turnitin id for the module then edit it + * + * @param object $cm The course module. + * @param string $coursetiiid The Turnitin course id. + * @param string $workflowcontext The context of the workflow. + * @param bool $submittoturnitin Whether to submit to Turnitin. */ public function sync_tii_assignment($cm, $coursetiiid, $workflowcontext = "site", $submittoturnitin = false) { global $DB; @@ -1867,7 +1943,7 @@ public function sync_tii_assignment($cm, $coursetiiid, $workflowcontext = "site" // Don't set anonymous marking if there have been submissions. $previoussubmissions = $DB->record_exists('plagiarism_turnitin_files', - ['cm' => $cm->id, 'statuscode' => 'success']); + ['cm' => $cm->id, 'statuscode' => 'success']); // Use Moodle's blind marking setting for anonymous marking. if (isset($config->plagiarism_turnitin_useanon) && $config->plagiarism_turnitin_useanon && !$previoussubmissions) { @@ -1905,13 +1981,13 @@ public function sync_tii_assignment($cm, $coursetiiid, $workflowcontext = "site" $dtpost = 0; if ($cm->modname != "forum") { if ($gradeitem = $DB->get_record( - 'grade_items', - [ - 'iteminstance' => $cm->instance, - 'itemmodule' => $cm->modname, - 'courseid' => $cm->course, - 'itemnumber' => 0, ] - )) { + 'grade_items', + [ + 'iteminstance' => $cm->instance, + 'itemmodule' => $cm->modname, + 'courseid' => $cm->course, + 'itemnumber' => 0, ] + )) { switch ($gradeitem->hidden) { case 1: @@ -1922,8 +1998,8 @@ public function sync_tii_assignment($cm, $coursetiiid, $workflowcontext = "site" // If any grades have been released early via marking workflow, set post date to have passed. if ($cm->modname == 'assign' && !empty($moduledata->markingworkflow)) { $gradesreleased = $DB->record_exists('assign_user_flags', - ['assignment' => $cm->instance, - 'workflowstate' => 'released', ]); + ['assignment' => $cm->instance, + 'workflowstate' => 'released', ]); $dtpost = ($gradesreleased) ? strtotime('-5 minutes') : strtotime('+1 month'); } @@ -1999,7 +2075,7 @@ public function sync_tii_assignment($cm, $coursetiiid, $workflowcontext = "site" // If we have a turnitin id then edit the assignment otherwise create it. if ($tiiassignment = $DB->get_record('plagiarism_turnitin_config', - ['cm' => $cm->id, 'name' => 'turnitin_assignid'], 'value')) { + ['cm' => $cm->id, 'name' => 'turnitin_assignid'], 'value')) { $assignment->setAssignmentId($tiiassignment->value); $turnitinassignment = new turnitin_assignment(0); @@ -2028,51 +2104,6 @@ public function sync_tii_assignment($cm, $coursetiiid, $workflowcontext = "site" } } - /** - * Check for rubric and save to assignment. - */ - public function update_rubric_from_tii($cm) { - global $DB; - - $turnitincomms = new turnitin_comms(); - $turnitincall = $turnitincomms->initialise_api(); - $assignment = new TiiAssignment(); - - if ($tiimoduledata = $DB->get_record('plagiarism_turnitin_config', - ['cm' => $cm->id, 'name' => 'turnitin_assignid'], 'value')) { - - $assignment->setAssignmentId($tiimoduledata->value); - - try { - // Retrieve assignment from Turnitin. - $response = $turnitincall->readAssignment($assignment); - $tiiassignment = $response->getAssignment(); - - // Create rubric config field with rubric value from Turnitin. - $rubricfield = new stdClass(); - $rubricfield->cm = $cm->id; - $rubricfield->name = 'plagiarism_rubric'; - $rubricfield->value = $tiiassignment->getRubricId(); - - // Check if rubric already exists for this module. - if ($configfield = $DB->get_field('plagiarism_turnitin_config', 'id', - (['cm' => $cm->id, 'name' => 'plagiarism_rubric']))) { - - // Use current configfield to update rubric value. - $rubricfield->id = $configfield; - - $DB->update_record('plagiarism_turnitin_config', $rubricfield); - } else { - // Otherwise create rubric entry for this module. - $rubricfield->config_hash = $rubricfield->cm."_".$rubricfield->name; - $DB->create_record('plagiarism_turnitin_config', $rubricfield); - } - } catch (Exception $e) { - $turnitincomms->handle_exceptions($e, 'tiiassignmentgeterror', false); - } - } - } - /** * Updates the database field duedate_report_refresh for any given submission ID. * @param int $id - the ID of the submission to update. @@ -2089,7 +2120,7 @@ public function set_duedate_report_refresh($id, $newvalue) { /** * Update simliarity scores. - * @param array $submissions - the submissions to be processed + * * @return boolean */ public function cron_update_scores() { @@ -2257,8 +2288,8 @@ public function cron_update_scores() { /** * Check the local submission state against Turnitin. * - * @param $assignmentids - * @param $submissionids + * @param array $assignmentids + * @param array $submissionids * @return array */ private function check_local_submission_state($assignmentids, $submissionids) { @@ -2289,7 +2320,7 @@ private function check_local_submission_state($assignmentids, $submissionids) { /** * Invalidate a missing submission. * - * @param $missingsubmission + * @param int $missingsubmission The missing submission id. * @return void * @throws dml_exception */ @@ -2315,6 +2346,8 @@ private function invalidate_missing_submission($missingsubmission) { /** * Get a class Id from Turnitin if you only have an assignment id. + * + * @param int $assignmentid The assignment id. */ private function get_course_id_from_assignment_id($assignmentid) { // Initialise Comms Object. @@ -2337,6 +2370,9 @@ private function get_course_id_from_assignment_id($assignmentid) { /** * Previous incarnations of this plugin did not store the turnitin course id so we have to get this using the assignment id. * If that wasn't linked with turnitin then we have to check all the modules on this course. + * + * @param int $cmid The course module id. + * @param int $courseid The course id. */ public function get_previous_course_id($cmid, $courseid) { global $DB; @@ -2362,6 +2398,10 @@ public function get_previous_course_id($cmid, $courseid) { /** * Migrate course from previous version of plugin to this + * + * @param object $coursedata The course data. + * @param int $turnitincid The Turnitin course id. + * @param string $workflowcontext The context of the workflow. */ public function migrate_previous_course($coursedata, $turnitincid, $workflowcontext = "site") { global $DB; @@ -2398,12 +2438,13 @@ public function migrate_previous_course($coursedata, $turnitincid, $workflowcont /** * Queue submissions to send to Turnitin * - * @param $cm - * @param $author - * @param $submitter - * @param $identifier - * @param $submissiontype - * @param int $itemid + * @param object $cm The course module. + * @param string $author The author of the submission. + * @param int $submitter The submitter. + * @param string $identifier The identifier. + * @param string $submissiontype The submission type. + * @param int $itemid The item id. + * @param string $eventtype The event type. * @return bool */ public function queue_submission_to_turnitin($cm, $author, $submitter, $identifier, $submissiontype, $itemid = 0, @@ -2777,6 +2818,10 @@ public function event_handler($eventdata) { /** * Initialise submission values * + * @param object $cm The course module. + * @param int $userid The user id. + * @param string $identifier The identifier. + * @param string $submissiontype The submission type. **/ private function create_new_tii_submission($cm, $userid, $identifier, $submissiontype) { global $DB; @@ -2802,6 +2847,11 @@ private function create_new_tii_submission($cm, $userid, $identifier, $submissio /** * Reset submission values * + * @param object $cm The course module. + * @param int $userid The user id. + * @param string $identifier The identifier. + * @param object $currentsubmission The current submission. + * @param string $submissiontype The submission type. **/ private function reset_tii_submission($cm, $userid, $identifier, $currentsubmission, $submissiontype) { global $DB; @@ -2828,6 +2878,12 @@ private function reset_tii_submission($cm, $userid, $identifier, $currentsubmiss /** * Clean up previous file submissions. * Moodle will remove any old files or drafts during cron execution and file submission. + * + * @param object $cm The course module. + * @param int $userid The user id. + * @param int $itemid The item id. + * @param string $submissiontype The submission type. + * @param string $identifier The identifier. */ public function clean_old_turnitin_submissions($cm, $userid, $itemid, $submissiontype, $identifier) { global $DB, $CFG; @@ -2895,6 +2951,10 @@ public function clean_old_turnitin_submissions($cm, $userid, $itemid, $submissio /** * Update an errored submission in the files table. + * + * @param int $submissionid The submission id. + * @param int $attempt The attempt number. + * @param int $errorcode The error code. */ public function save_errored_submission($submissionid, $attempt, $errorcode) { global $DB; @@ -2914,6 +2974,19 @@ public function save_errored_submission($submissionid, $attempt, $errorcode) { /** * Save the submission data to the files table. + * + * @param object $cm The course module. + * @param int $userid The user id. + * @param int $submissionid The submission id. + * @param string $identifier The identifier. + * @param string $statuscode The status code. + * @param string $tiisubmissionid The Turnitin submission id. + * @param int $submitter The submitter. + * @param int $itemid The item id. + * @param string $submissiontype The submission type. + * @param int $attempt The attempt number. + * @param int $errorcode The error code. + * @param string $errormsg The error message. */ public function save_submission($cm, $userid, $submissionid, $identifier, $statuscode, $tiisubmissionid, $submitter, $itemid, $submissiontype, $attempt, $errorcode = null, $errormsg = null) { @@ -2955,6 +3028,10 @@ public function save_submission($cm, $userid, $submissionid, $identifier, $statu /** * Delete a submission from Turnitin + * + * @param object $cm The course module. + * @param int $submissionid The submission id. + * @param int $userid The user id. */ public function delete_tii_submission($cm, $submissionid, $userid) { global $DB; @@ -2995,6 +3072,9 @@ public function plagiarism_get_report_gen_speed_params() { /** * Set a config value for the admin settings. + * + * @param object $data The data to set. + * @param string $property The property to set. */ public static function plagiarism_set_config($data, $property) { // Scenario when performing the upgrade script to copy settings from V2 to PP. @@ -3015,7 +3095,7 @@ public static function plagiarism_set_config($data, $property) { * * @param moodleform $formwrapper * @param MoodleQuickForm $mform - * @return type + * @return void */ function plagiarism_turnitin_coursemodule_standard_elements($formwrapper, $mform) { $pluginturnitin = new plagiarism_plugin_turnitin(); @@ -3476,6 +3556,7 @@ function plagiarism_turnitin_tempfile(array $filename, $suffix) { * * @param string $input The error string if module = null otherwise the language string called by get_string() * @param string $module The module string + * @param string $link The link to redirect to * @param string $param The parameter to send to use as the $a optional object in get_string() * @param string $file The file where the error occured * @param string $line The line number where the error occured @@ -3511,6 +3592,9 @@ function plagiarism_turnitin_print_error($input, $module = 'plagiarism_turnitin' /** * Override Moodle's mtrace function for methods shared with tasks. + * + * @param string $string The string to output + * @param string $eol The end of line character */ function plagiarism_turnitin_mtrace($string, $eol) { return true; diff --git a/locallib.php b/locallib.php index a4aaeef7..fab220f7 100644 --- a/locallib.php +++ b/locallib.php @@ -25,7 +25,7 @@ /** * Override the repository option if necessary depending on the configuration setting. - * @param $submitpapersto int - The repository to submit to. + * @param int $submitpapersto - The repository to submit to. * @return $submitpapersto int - The repository to submit to. */ function plagiarism_turnitin_override_repository($submitpapersto) { @@ -50,9 +50,9 @@ function plagiarism_turnitin_override_repository($submitpapersto) { * Retrieve previously made successful submissions that match passed in parameters. This * avoids resubmitting them to Turnitin. * - * @param $author - * @param $cmid - * @param $identifier + * @param string $author The author of the submission. + * @param int $cmid The course module id. + * @param int $identifier The identifier of the submission. * @return $plagiarismfiles - an array of succesfully submitted submissions */ function plagiarism_turnitin_retrieve_successful_submissions($author, $cmid, $identifier) { @@ -73,7 +73,7 @@ function plagiarism_turnitin_retrieve_successful_submissions($author, $cmid, $id /** * Add a config field to show submissions have been made which we use to lock the anonymous marking setting. - * @param $cmid + * @param int $cmid The course module id. */ function plagiarism_turnitin_lock_anonymous_marking($cmid) { global $DB; diff --git a/tests/behat/behat_plagiarism_turnitin.php b/tests/behat/behat_plagiarism_turnitin.php index 59d10ecf..dd1e2c85 100644 --- a/tests/behat/behat_plagiarism_turnitin.php +++ b/tests/behat/behat_plagiarism_turnitin.php @@ -108,7 +108,7 @@ public function i_configure_turnitin_credentials() { * I create a unique user with username * * @Given I create a unique user with username :username - * @param $username + * @param string $username */ public function i_create_a_unique_user($username) { $generator = testing_util::get_data_generator(); @@ -246,6 +246,9 @@ public function i_accept_the_turnitin_eula_from_the_ev_if_necessary() { * @When /^I click save changes button "(?P(?:[^"]|\\")*)" "(?P[^"]*)"$/ * @param string $selector type of element like css or xpath * @param string $locator to identify element + * @param bool $exception + * @param bool $node + * @param bool $timeout */ public function click_save_changes_button($selector, $locator, $exception = false, $node = false, $timeout = false) { try { @@ -290,6 +293,8 @@ public function the_following_users_will_be_created_if_they_do_not_already_exist * phpcs:disable moodle.Files.LineLength.TooLong * @Given /^I unenroll the user account "(?P(?:[^"]|\\")*)" with the role "(?P(?:[^"]|\\")*)" from the class in Turnitin$/ * + * @param string $student + * @param string $role * @throws Exception */ public function i_unenroll_the_user_account_with_the_role_from_the_class_in_turnitin($student, $role) { diff --git a/tests/generator/lib.php b/tests/generator/lib.php index e02ff806..07c785f4 100644 --- a/tests/generator/lib.php +++ b/tests/generator/lib.php @@ -40,7 +40,7 @@ abstract class plagiarism_turnitin_test_lib extends advanced_testcase { * Creates a number of test plagiarism_turnitin users, creates an equivalent moodle user for each, and handles the database * association work. * - * @param int $number_of_users + * @param int $numberofusers - the number of users to create. * @param array $roles - an array of strings, each of which should be 'Learner' or 'Instructor'. * @return object $return - object of two arrays of equal length, one full of plagiarism_turnitin_user types and the other with * ids for dbtable plagiarism_turnitin_users. The indices of these arrays DO align. @@ -63,8 +63,8 @@ public function make_test_users($numberofusers, $roles) { /** * Creates a moodle user and a corresponding entry in the plagiarism_turnitin_users table * for the tii user specified - * @param object $plagiarism_turnitin_user - plagiarism_turnitin user object * + * @param object $plagiarismturnitinuser - plagiarism_turnitin user object * @return int $plagiarism_turnitin_user_id id of plagiarism_turnitin user join (for use in get_record queries on * plagiarism_turnitin_users table) */ diff --git a/tests/privacy/provider_test.php b/tests/privacy/provider_test.php index 8f5690b9..cb2a0371 100644 --- a/tests/privacy/provider_test.php +++ b/tests/privacy/provider_test.php @@ -198,7 +198,7 @@ public function test_delete_plagiarism_for_context(): void { /** * Create a submission for testing. * - * @param $numsubmissions + * @param int $numsubmissions * @return array * @throws \coding_exception * @throws \dml_exception