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
tjhunt committed 1 file to 'Moodle CVS' - 26/Nov/08 11:49 PM
roles / profile: MDL-14937 remove reference to ra.active column until MDL-13240 is done.
MODIFY admin/roles/usersroles.php   Rev. 1.4    (+2 -2 lines)