Refactor extended time database model to be more efficient (SAK-35101)

[SAK-35143] Extended Time Service should return default date if no date specified Created: 12-Dec-2016  Updated: 17-Apr-2018  Resolved: 15-Dec-2016

Status: Verified
Project: Sakai
Component/s: Tests & Quizzes (Samigo)
Affects Version/s: 12.0
Fix Version/s: 12.0

Type: Sub-task Priority: Blocker
Reporter: Matthew Jones Assignee: Sristi Shrestha
Resolution: Fixed Votes: 0
Labels: qatestplan
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
is depended on by SAK-35146 Excepted students cannot view the tes... Verified
is related to SAK-35153 Allow time entries to be null, don't ... RESOLVED
is related to SAK-34323 Extended Delivery/Delivery Exceptions... OPEN


The old extended time used a method "determineDate" which would essentially return the date from the published exam if a null date was entered during delivery.

Something like this will need to be replicated in the new extended time (with some additional text that says leaving any field blank will result in it using the default).

Currently it looks like any nulls will default just be returned as nulls. For example leaving a null "start date" for an exception will allow the excepted to student to start before the actual start date.

The ideal I think would be if the methods could return it directly, but it would have to have a way to also return the null value in case of editing it in the UI too. . . Though maybe returning the "default dates" for this UI isn't bad of an idea either. Having them blank (null) or having them return the default values seem about the same solution? Maybe we need different methods like "getEffectiveDueDate" ?

Comment by Neal Caidin [ 03-Jan-2017 ]

Test Plan ? Leave start date on extended time exception null and try to take the exam as student before the default start time should allow?

Comment by Matthew Jones [ 03-Jan-2017 ]

Yeah don't fill in the dates and save. They should be filled in automatically if you go back to edit it.

Comment by Sristi Shrestha [ 04-Jan-2017 ]

Tested on Trunk (master) on MySql. Build Info:
Sakai - d21ee21 - Sakai d21ee212db2b2e315b96f6ff0fffa3aeac8108a8 - Server ip-172-31-6-159
Issue is fixed. When start and due date is given as null for extended time limit, it returns the default start and due date of the test.

Generated at Tue Feb 18 22:38:34 CST 2020 using Jira 8.0.3#800011-sha1:073e8b433c2c0e389c609c14a045ffa7abaca10d.