nicolasconnault [Tue, 5 Jun 2007 08:50:24 +0000 (08:50 +0000)]
MDL-9629 Changed grade_item.gradetype default to 1, added GRADE_TYPE_NONE constant = 0, incrementing existing constants by 1. Set up auto-generation of idnumber for grade_item if itemmodule and iteminstance are set, only a temporary stub if they are not set (must be replaced by correct generation code). New category form now has server-side validation (not using formslib)
nicolasconnault [Fri, 1 Jun 2007 08:01:47 +0000 (08:01 +0000)]
MDL-9137 Almost finished the edit category page. The only remaining issue is some sort of endless loop starting in grade_category::set_as_parent. Big issue...
nicolasconnault [Fri, 1 Jun 2007 04:02:37 +0000 (04:02 +0000)]
MDL-9629 Category edit page now implements delete, show/hide, lock/unlock, moveup/movedown and move actions. The edit icon is also shown but not yet implemented.
nicolasconnault [Thu, 31 May 2007 03:15:43 +0000 (03:15 +0000)]
MDL-9506 MDL-9137 MDL-9629
Added a number of small getters and setters to grade_item and grade_category, to hide the structural differences between the two, and provide a common interface for cases when we are not sure whether an $object is of one type or another.
The grade_tree::renumber() method now adds complete objects to the need_update array, because both grade_category and grade_item need to update their parent field when moved to a different parent. Amazingly, these important changes worked straight away (after 1 hour of coding without testing anything), and all the unit tests passed!
nicolasconnault [Wed, 30 May 2007 08:48:11 +0000 (08:48 +0000)]
Implemented a test version of the gradebook category edit page, and developed the get_edit_tree method in grade_tree. Items can be successfully moved up and down, and a "move" button lets the user select a source element, then a destination box. All actions use POST.
nicolasconnault [Wed, 30 May 2007 05:47:26 +0000 (05:47 +0000)]
MDL-9506 Added ksort() of each level of categories and items for the gradebook. Unsorted arrays caused erratic behaviour when moving elements of the tree around.
nicolasconnault [Wed, 30 May 2007 03:09:38 +0000 (03:09 +0000)]
MDL-9506 Refactored grade_tree::get_tree by doing the following:
- Extracted the $fillers array into a class variable
- Extracted the addition of elements to grade_tree::fillers into a new add_fillers($array) method
- Extracted the inclusion of fillers into the tree_array to a new include_fillers($tree, $object=NULL) method
- Removed the building of the tree_filled, which was already performed by build_tree_filled()
- Removed the generation of next_sortorder and previous_sortorder attributes, which was already performed by renumber()
Result is a much leaner and scalable set of methods, and a tighter definition of responsibilities for the varying classes. I think I have also noticed a significant inprovement in speed.
dwoolhead [Tue, 29 May 2007 09:56:44 +0000 (09:56 +0000)]
MDL-9729 Ensure start of week day calculation observes user timezone setting in the same way as month start and end dates. Prevents incorrect display of dates (1 out) on main Moodle calendar display although mini calendar display is correct. (Merged from 1.8 stable branch)
jamiesensei [Tue, 29 May 2007 06:27:38 +0000 (06:27 +0000)]
reverting commit 1.889 "added another parameter to moodle_url out, out_action and get_query_string so that developer can output url with query string joined by '&' and not '&'. & breaks redirect on IE." It turned out to be unnecessary.
jamiesensei [Tue, 29 May 2007 06:14:09 +0000 (06:14 +0000)]
reverting last commit "added another parameter to moodle_url out, out_action and get_query_string so that developer can output url with query string joined by '&' and not '&'. & breaks redirect on IE." It turned out to be unnecessary.
jamiesensei [Mon, 28 May 2007 14:25:40 +0000 (14:25 +0000)]
added another parameter to moodle_url out, out_action and get_query_string so that developer can output url with query string joined by '&' and not '&'. & breaks redirect on IE.
jamiesensei [Mon, 28 May 2007 14:21:09 +0000 (14:21 +0000)]
MDL-9745 "Checkboxes badly lined up in forms lib, e.g. "students may review" settings on quiz settings screen." Reverted previous fix for similar problem MDL-7779 as the fix for MDL-7779 causes worse problem MDL-9745 with form elements in groups. Second part of commit in HEAD, missed a bit in HEAD.