General plugins

UniSA's Assignment Extensions Module 1.9 -> 2.x

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Michael Hughes
Re: UniSA's Assignment Extensions Module 1.9 -> 2.x
Group Core developers

I'd maybe make one observation about a call like 

extensions::update_duedate($cm->id, $user->id, $asmnt, 'timedue');

specifying the field by string (whilst providing an work around to the fact that different modules call this different things) probably isn't terribly great and opens some holes where typos in the field name by a developer could break other data!

If the due date field is bumped in to the course_modules table then it would then at least implement the data storage for EVERY module (whether they start observing it or not), which in my head makes more sense if this is aimed at address it at a core-level...

 I'm also slightly concerned that the a function named "update_duedate" that doesn't update the database is mis-named...given it's loading the due date into the assignment, I'd *prefer* something like "fetch_duedate" or even just "get_duedate". Reading it this way (if I wasn't paying attention) I'd be wondering why I'm trying to save the due date to the DB when I'm reading it...

(The DB code is similarly named "get_record*" to fetch *from* the DB and "update_record*" to write back to the DB)\



Oh and No I couldn't think of a

Average of ratings: -