|
Hi,
Thanks for the feedback Yu and Eloy. This patch (# 4) takes account of it by using the SQL join above and testing the course enrolperiod. (Note, I've left line-breaks in for clarity and because we wish to comment out "enrolperiod > 0" in ou-moodle - we don't use it.) If there are no objections I'll commit later today. Nick Yay! Saw this in CVS, we need more patches like these. Thanks Nick!
Hi
Thanks for the vote Martin L!
Note, there are other places in cron.php where get_recordset_select could replace get_records_select - good for memory, but with a small time penalty I think. Ideas? Hi Nick,
I've seen your commit to 18_STABLE and it seems to mimic previous behaviour perfectly. Anyway, some quick thoughts: 1) Why, under 18_STABLE, aren't we't restricting to courses with enrolperiod? HEAD has that check. What have changed? Shouldn't both be similar? 2) About to use name parameters, uhm, IMHO, I don't like them (puke). :-D (-1) 3) About changing more places to use recordsets within cron, it sounds ok, but only if there are REAL memory problems, IMO. Ciao I don't know why we weren't restricting courses with enrolperiod on 1.8 branch - I've committed a further fix to 18_STABLE so it matches HEAD. (Regarding 2, the $sort='' has gone! Can we agree to disagree? And 3, I'll leave well alone!)
Ciao >> Can we agree to disagree?
Of course! I love to agree disagreeing! Thanks! Nick - there's no time penalty in get_recordset() nstead of get_records(). In fact, get_records() calls get_recordset() internally. So whenever the dataset can be large, cut the middleman!
get_records() still makes sense of course where you know that the number of records will be small - ie: get_records('role'); >>> Can we agree to disagree?
> Of course! I love to agree disagreeing! I don't think you do. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
from a syntax perspective, looks nice (but by the "$sort=''" thing in the middle) ?
anyway, I don't know if it's exactly the same behaviour that the original one (that used to search by courses having enrolperiod).
The question is: only courses with enrolperiod have the role_assignment set ?
Because you are deleting all them, no matter of the course->enrolperiod status.