diff --git a/mod/assign/classes/output/assign_submission_status.php b/mod/assign/classes/output/assign_submission_status.php index ed8359dee32..1ab6c02da35 100644 --- a/mod/assign/classes/output/assign_submission_status.php +++ b/mod/assign/classes/output/assign_submission_status.php @@ -98,6 +98,8 @@ class assign_submission_status implements \renderable { public $usergroups = array(); /** @var int The time limit for the assignment */ public $timelimit = 0; + /** @var bool */ + public $caneditowner; /** * Constructor diff --git a/mod/assign/classes/output/grading_app.php b/mod/assign/classes/output/grading_app.php index 471ef2f5fee..f2107c5d034 100644 --- a/mod/assign/classes/output/grading_app.php +++ b/mod/assign/classes/output/grading_app.php @@ -56,6 +56,11 @@ class grading_app implements templatable, renderable { */ public $assignment = null; + /** + * @var array - List of user records with extra fields. + */ + public $participants = []; + /** * Constructor for this renderable. * diff --git a/mod/assign/classes/output/renderer.php b/mod/assign/classes/output/renderer.php index d87209ec807..38a580be60c 100644 --- a/mod/assign/classes/output/renderer.php +++ b/mod/assign/classes/output/renderer.php @@ -39,6 +39,9 @@ use \mod_assign\output\grading_app; */ class renderer extends \plugin_renderer_base { + /** @var string a unique ID. */ + public $htmlid; + /** * Rendering assignment files * diff --git a/mod/assign/feedback/editpdf/classes/annotation.php b/mod/assign/feedback/editpdf/classes/annotation.php index f6bd313d268..11ea11e671c 100644 --- a/mod/assign/feedback/editpdf/classes/annotation.php +++ b/mod/assign/feedback/editpdf/classes/annotation.php @@ -63,6 +63,9 @@ class annotation { /** @var string type - One of line, oval, rect, etc */ public $type = 'line'; + /** @var int draft status, default 1 = true */ + public $draft = 1; + /** * Convert a compatible stdClass into an instance of this class. * @param stdClass $record diff --git a/mod/assign/feedback/editpdf/classes/comment.php b/mod/assign/feedback/editpdf/classes/comment.php index d0cfdedf5c7..1495286e6ea 100644 --- a/mod/assign/feedback/editpdf/classes/comment.php +++ b/mod/assign/feedback/editpdf/classes/comment.php @@ -55,6 +55,9 @@ class comment { /** @var string colour - One of red, yellow, green, blue, white */ public $colour = 'yellow'; + /** @var int draft status, default 1 = true */ + public $draft = 1; + /** * Convert a compatible stdClass into an instance of a comment. * @param \stdClass $record diff --git a/mod/assign/feedback/editpdf/locallib.php b/mod/assign/feedback/editpdf/locallib.php index c7ffc1acf1e..943af7688f2 100644 --- a/mod/assign/feedback/editpdf/locallib.php +++ b/mod/assign/feedback/editpdf/locallib.php @@ -283,7 +283,10 @@ class assign_feedback_editpdf extends assign_feedback_plugin { foreach ($nondraftannotations as $ndannotation) { foreach ($draftannotations as $dannotation) { foreach ($ndannotation as $key => $value) { - if ($key != 'id' && $value != $dannotation->{$key}) { + // As the $draft was included in the class annotation, + // it is necessary to omit it in the condition below as well, + // otherwise, an error would be raised. + if ($key != 'id' && $key != 'draft' && $value != $dannotation->{$key}) { continue 2; } } @@ -305,7 +308,10 @@ class assign_feedback_editpdf extends assign_feedback_plugin { foreach ($nondraftcomments as $ndcomment) { foreach ($draftcomments as $dcomment) { foreach ($ndcomment as $key => $value) { - if ($key != 'id' && $value != $dcomment->{$key}) { + // As the $draft was included in the class comment, + // it is necessary to omit it in the condition below as well, + // otherwise, an error would be raised. + if ($key != 'id' && $key != 'draft' && $value != $dcomment->{$key}) { continue 2; } } diff --git a/mod/assign/gradingtable.php b/mod/assign/gradingtable.php index 0ac3e7573a4..4e7f2d73933 100644 --- a/mod/assign/gradingtable.php +++ b/mod/assign/gradingtable.php @@ -64,6 +64,8 @@ class assign_grading_table extends table_sql implements renderable { private $plugincache = array(); /** @var array $scale - A list of the keys and descriptions for the custom scale */ private $scale = null; + /** @var bool true if the user has this capability. Otherwise false. */ + private $hasviewblind; /** * overridden constructor keeps a reference to the assignment class that is displaying this table diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index 8496e16e8b6..326f0154fe7 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -195,6 +195,9 @@ class assign { /** @var mixed This var can vary between false for no overrides to a stdClass of the overrides for a group */ private $overridedata; + /** @var float grade value. */ + public $grade; + /** * Constructor for the base assign class. * diff --git a/mod/assign/renderable.php b/mod/assign/renderable.php index 738e8659cd2..a6d2ec51993 100644 --- a/mod/assign/renderable.php +++ b/mod/assign/renderable.php @@ -69,6 +69,8 @@ class assign_gradingmessage implements renderable { public $coursemoduleid = 0; /** @var int $gradingerror should be set true if there was a problem grading */ public $gradingerror = null; + /** @var int the grading page. */ + public $page; /** * Constructor @@ -293,6 +295,8 @@ class assign_feedback_status implements renderable { public $canviewfullnames = false; /** @var string gradingcontrollergrade The grade information rendered by a grade controller */ public $gradingcontrollergrade; + /** @var array information for the given plugins. */ + public $plugins = []; /** * Constructor @@ -424,6 +428,8 @@ class assign_attempt_history_chooser implements renderable, templatable { public $coursemoduleid = 0; /** @var int userid - The current userid */ public $userid = 0; + /** @var int submission count */ + public $submissioncount; /** * Constructor diff --git a/mod/assign/tests/locallib_test.php b/mod/assign/tests/locallib_test.php index b91f2f444ea..3ff9751f8a6 100644 --- a/mod/assign/tests/locallib_test.php +++ b/mod/assign/tests/locallib_test.php @@ -46,6 +46,12 @@ class locallib_test extends \advanced_testcase { // Use the generator helper. use mod_assign_test_generator; + /** @var array */ + public $extrastudents; + + /** @var array */ + public $extrasuspendedstudents; + public function test_return_links() { global $PAGE; diff --git a/mod/assign/tests/markerallocation_test.php b/mod/assign/tests/markerallocation_test.php index 41660dc2546..8f044ff3ad7 100644 --- a/mod/assign/tests/markerallocation_test.php +++ b/mod/assign/tests/markerallocation_test.php @@ -32,6 +32,9 @@ require_once($CFG->dirroot . '/course/lib.php'); */ class markerallocation_test extends \advanced_testcase { + /** @var \stdClass course record. */ + private $course; + /** * Create all the needed elements to test the difference between both functions. */