Aligned logic between quick grading changes and set marking workflow state changes to accurately
finalise or remove final grade from the gradebook, depending on the marking workflow state if
being used.
What we really want to test in this behat test is the 2 extremes:
the user who started a long time ago and doesn't have access any more
and the user who started recently, who does have access. To fix all
problems with datetime clashes, it's probably better to just use
'yesterday' for the current student's enrolment start time.
Tests that each student has a fixed amount of time, relative to their
course start date, in which to submit the assignment, and that teachers
are shown the dates relative to each student when grading.
Changes include:
- Added a private method calculate_properties(), which calculates
per-user instance properties and stores them in an instance var.
- get_instance() now takes a userid param, and calls the
calculate_properties() method, allowing per-user instances to be
returned.
- Added a public method get_default_instance(), which returns the
non-augmented instance data (no per-user properties), so we can
still get back the raw instance data when needed.
- The get_course method has been changed to make sure we always have an
object property, not a string - which happened in some cases (when
commenting on the assign submission page, for example).
When some activities are manually completed by students, some are still showing in students' timeline.
This commit fix that for module assign,chat,choice,feedback,lesson,quiz,scorm and workshop.
Apart from deprecating assign_print_overview , the following methods
have been also deprecated because they are not used anymore:
- assign_get_mysubmission_details_for_print_overview
- assign_get_grade_details_for_print_overview
Namely:
- 3rd param of assertEquals() cannot be null.
- Some incorrect uses of assertNotEmpty().
- Comparing 2 strings now uses strict (===) evaluation.
Link: https://github.com/sebastianbergmann/phpunit/issues/3185
Solution here is one of:
a) Return to the previous situation, making the comparison
softer. That can achieved by forcing different types, so
float == string works.
b) Changing APIs (both forms and database return strings) to
perform some conversion to floats. That would make float
comparison (with floats or strings) to work too.
The patch here follows the a) approach. Changing all the internals
for proper float handling sounds excesive when it has been working
perfectly since ever. So we went the easier route, just getting
rid of the new === comparisons when needed by changing expectation
types to float.
The behat assumed that after editing a submission, the next page would be the assignment
front page even though we were previously on the "view all submissions" page. The extra
step to go back to the "view all submissions" page is no longer needed so has been removed.
Use the context function get_context_name() to set the page title. This will
change it from "Assignment" to "C1: Important foods to eat".
The get_context_name() for activity modules is updated to include the course short name (not the
name of the activity type).
Use the current filters and sorting on the user grading table in the single
page grading app when it is possible.
This replaces the popover used to configure the filters to one that closely matches the
one from the grading table. It supports standard filters, workflow filters and allocated marker filters.
It will also support group filtering and suspended user filtering but we don't show the controls for those in
the single grading page.