Issue Details (XML | Word | Printable)

Key: MDL-13240
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Petr Skoda
Reporter: Sam Marshall
Votes: 1
Watchers: 5
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Add timestart/timeend support back to permissions code

Created: 30/Jan/08 03:30 AM   Updated: 25/Mar/09 01:46 PM
Return to search
Component/s: Roles
Affects Version/s: 1.9
Fix Version/s: 2.0

File Attachments: 1. Text File roletimes.patch (4 kB)
2. Text File timestart.revised.patch (11 kB)
3. Text File timestart1.9.3+.patch.txt (11 kB)
4. Text File timestartHEAD.patch.txt (11 kB)
5. Text File timestartHEADcomplete.patch.txt (40 kB)

Issue Links:
Dependency
 
Relates
 

Participants: Martin Dougiamas, Petr Skoda, Sam Marshall and Tim Hunt
Security Level: None
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
Support for timestart in the capabilities code was removed by MDL-8785 mostly for performance reasons, although there was also a complicated justification of the decision.

IMO this behaviour is bad - it's very confusing. You set a user's enrolment to the future but they are allowed to access the site now? why? (Removing on cron is ok for the end date...) Adding and removing things in enrolment plugins may be technically possible but could be pretty difficult.

In my opinion, if timestart is not implemented properly then it should be removed from the database.

However, with the new queries it should probably not be a performance issue as far as I can see (they don't look that scary). I have done a patch (against 1.9 actually though probably a suitable change for that) which adds this feature back, attached. The patch applies only to functions which are normally used to check permissions, not to all the 'informational' ones (so e.g. if you get a list of the students on a course, it will still include those who 'haven't started yet', etc - they just won't be able to get in yet).

I have not yet tested performance. Would it be worth doing so?

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Martin Dougiamas made changes - 30/Jan/08 04:19 PM
Field Original Value New Value
Affects Version/s 2.0 [ 10122 ]
Fix Version/s 2.0 [ 10122 ]
Affects Version/s 1.9 [ 10190 ]
Martin Dougiamas made changes - 30/Jan/08 04:20 PM
Link This issue has a non-specific relationship to MDL-8785 [ MDL-8785 ]
Martin Dougiamas made changes - 30/Jan/08 04:21 PM
Link This issue will be resolved by MDL-8789 [ MDL-8789 ]
Sam Marshall made changes - 29/Oct/08 07:58 PM
Attachment timestart.revised.patch [ 15518 ]
Martin Dougiamas made changes - 31/Oct/08 11:26 AM
Assignee Martin Dougiamas [ dougiamas ] Tim Hunt [ timhunt ]
Martin Dougiamas made changes - 31/Oct/08 11:26 AM
Priority Minor [ 4 ] Major [ 3 ]
Tim Hunt made changes - 05/Nov/08 07:42 PM
Attachment timestart1.9.3+.patch.txt [ 15566 ]
Tim Hunt made changes - 05/Nov/08 08:15 PM
Attachment timestartHEAD.patch.txt [ 15567 ]
Tim Hunt made changes - 06/Nov/08 02:15 PM
Attachment timestartHEADcomplete.patch.txt [ 15577 ]
Tim Hunt made changes - 06/Nov/08 02:56 PM
Attachment timestartHEADcomplete.patch.txt [ 15577 ]
Tim Hunt made changes - 06/Nov/08 02:57 PM
Attachment timestartHEADcomplete.patch.txt [ 15578 ]
Tim Hunt made changes - 25/Mar/09 01:46 PM
Assignee Tim Hunt [ timhunt ] Petr ?koda [ skodak ]