-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
4.5.5
-
None
-
MOODLE_405_STABLE
When you first view the main page (view.php) showing submission status for a student, you get an inconsistent display.
To reproduce this example, create an assignment with default settings (I used the sandbox site), enrol a student in the course, log in as that student and click to the assignment:
Then reload the page without changing anything:
The second view shows the 'last modified' and 'submission comments' rows which are missing from the first view. Also, in general that means that on the first view, submission plugins do not have the opportunity to add data to this table (which is what the comments plugin is doing there).
This occurs because in the first view there is no submission for that user id, but while displaying the page, a blank submission is initialised.
Specifically in function get_assign_submission_status_renderable, locallib.php:5349 it gets the submission without creating a blank one ('false' as last argument).
Further down on 5389 it calls get_grading_status which (via several nested functions) ends up calling get_user_submission again with 'true'; this will create the row, but it's still using the old data in the function above.
I think it would be better if it consistently creates a submission and displays it, but I wasn't sure whether it might be incorrect to always create a blank user submission (for example if group submissions are in use) so I don't know if passing 'true' to that function is the right solution.
The key points though are:
- The page should not change just because the user views it a second time.
- Even on first view of the page, submission plugins should have the opportunity to add their UI to table rows.
- duplicates
-
MDL-84390 Assign summary table not rendering all rows on first visit
-
- Waiting for component lead review
-