commit 5c32a46383e857df526d692eee6f63e84408cb79
Author: nicolasconnault <nicolasconnault>
Date: Wed, 27 Feb 2008 21:45:10 +0900
Tag: v1.9.0
MDL-13674 Course category fullname field is no longer required. If set to empty it will be recorded in the DB as ?, and the course name will be used instead wherever the category name is displayed.

commit 211e9c6d3f95c24e48c2afd4140979d8d127e205
Author: nicolasconnault <nicolasconnault>
Date: Mon, 05 Nov 2007 23:10:29 +0900
Tag: v1.9.0
MDL-8992 Now only appearing once per page, and XHTML compliant. Also removed an ugly browser-sniffing css hack from the quicktime plugin, and applied the same browser detection as for the other plugins

commit 9fa46707f33d8b46a675ae2dac634ce31ccf7f66
Author: nicolasconnault <nicolasconnault>
Date: Fri, 28 Sep 2007 02:00:25 +0800
Tag: v1.9.0
MDL-11456 the .grade-report-grader table {} style was cascading down to the popups (which use tables, alas...), so I created a number of css classes which now control color, font etc for caption and feedback cells of the popup.

commit 41f22daa71d7fc8d5a5111f963e4435382b643bd
Author: nicolasconnault <nicolasconnault>
Date: Wed, 19 Sep 2007 23:37:46 +0800
Tag: v1.9.0
MDL-11353 Completed the implementation. This included a new method in grade_item: get_displaytype(), since that value could be set to default, and we must then look up to course, then site values. And the get_letter() method in grade_grade has been modified to first check the grade_letters table. All works like a dream!

commit a5b8be622ca86216aac93a6980148f4b001e9a34
Author: nicolasconnault <nicolasconnault>
Date: Tue, 18 Sep 2007 01:31:48 +0800
Tag: v1.9.0
MDL-11275 added (submissions). Also fixed : Issue: Teachers can edit grader report preferences (including switches for quickgrading and quickfeedback), but do not have access to the "Turn editing on/off" button, so they can't do quickgrading. Solutions: 1.Decouple the quickgrading and quickfeedback modes from the editing mode, and turn them on/off through the preferences page. New capability: moodle/grade:edit * preferences: don't show quickgrading if no capability grade:edit * If quickgrading is switched off as a preference and user doesn't have manage cap, show edit icons around grades when in editing mode

commit e171963b3eb5de656665a036db651c95818277c4
Author: nicolasconnault <nicolasconnault>
Date: Sat, 15 Sep 2007 01:21:30 +0800
Tag: v1.9.0
MDL-11278 Implementation is complete, but grade_categories records in DB are not affected by global settings. This way, when global settings are switched back to "Do not Force", the original category settings will be in place.

commit 098042baeae0e42b7a2fb6b4b5e8bf0b098df21f
Author: nicolasconnault <nicolasconnault>
Date: Fri, 14 Sep 2007 14:57:30 +0800
Tag: v1.9.0
Issue: The number of submissions in the Group average and Course average calculations should be shown in brackets. (submissions) should be added after the Group average and Course average labels. Solution: new grader report preference (Display number of grades in average cells).

commit 0e2d708efcf6e2f694dda44bb85355c2e6a5915f
Author: nicolasconnault <nicolasconnault>
Date: Fri, 31 Aug 2007 13:55:30 +0800
Tag: v1.9.0
MDL-11034 Implemented the global enablepublishing and refactored the handling of userkey for each export plugin. Also added a dump.php file in each plugin directory, although this could easily be refactored into 1 file in the parent folder, pointing to each plugin's export.php file for output differences.

commit 66ef0471ae96c51b413649c7f9f37baec5e45b7c
Author: nicolasconnault <nicolasconnault>
Date: Wed, 15 Aug 2007 19:15:39 +0800
Tag: v1.9.0
MDL-10838 Applied standard table classes and scopes to tr, th and tds of the grader report. Also fixed a bug with the display of grand averages when a group is selected and the average column is set to aggregate all grades.

commit b31a9f3dbbd1eb40fb0fdbf663b1838176779f2b
Author: nicolasconnault <nicolasconnault>
Date: Tue, 14 Aug 2007 14:05:07 +0800
Tag: v1.9.0
MDL-10829 Added get_grade_item() to the grade_item class, for cases when we don't whether an object is a category or a grade_item. The new interface for viewing and adding idnumbers (no editing) is 99% finished. Help strings still to do.

commit d4795a07926a124b6b8838a1dba15c9b6da70f9e
Author: nicolasconnault <nicolasconnault>
Date: Wed, 08 Aug 2007 23:48:20 +0800
Tag: v1.9.0
MDL-9628 When a timestamp is selected for locktime or hiddenuntil, the grader report now shows a new icon (lock or eye in front of a calendar), with a tooltip showing the selected date. Very useful

commit 8f6e4392d25f680c3b28e26a4e57bd1db0e9dc56
Author: nicolasconnault <nicolasconnault>
Date: Wed, 08 Aug 2007 17:42:11 +0800
Tag: v1.9.0
Adding latest version of overlib with all plugins, into its own directory. Updated lib/javascript.php to point to this instead of the old one, which is still in lib/overlib.js

commit 61defed9f26787c7ee9d6d87079cebb4c8b7bc10
Author: nicolasconnault <nicolasconnault>
Date: Thu, 02 Aug 2007 22:22:20 +0800
Tag: v1.9.0
MDL-10109 New category gets created without problem, and the outcomes are created and added as children of that category. The normal grade_item, if present, is also added before the outcomes.

commit 41b477217da0f256a1573c14827309ba4a5d74a7
Author: nicolasconnault <nicolasconnault>
Date: Thu, 26 Jul 2007 15:58:00 +0800
Tag: v1.9.0
MDL-10210 Removed the loading of the $CFG versions of the preferences when the user versions are set to default. This means that a value set to default always stays at default unless it is changed manually.

commit 8c5a416edd721729802469fc863772b70b9e278d
Author: nicolasconnault <nicolasconnault>
Date: Wed, 18 Jul 2007 22:54:35 +0800
Tag: v1.9.0
MDL-10478 Added category preference aggregationview. This one is linked with the more global preferences and $CFG. However, a category-specific preference needs implementing: grade_report_categorystate{$catid}, which equals GRADE_CATEGORY_EXPANDED or GRADE_CATEGORY_CONTRACTED. I've written a stub in grade/report/grader/lib.php around line 492 for pruning out the grade_tree according to these prefs.

commit 4ba9941c4bf33d16dd8dba699dac8ccddc477e28
Author: nicolasconnault <nicolasconnault>
Date: Fri, 13 Jul 2007 00:36:38 +0800
Tag: v1.9.0
MDL-10386 Refactored the grader report file (index.php), and extracted the grade_report_grader class out of it. The index file now only calls upon the class' main methods. Certain elements and code blocks in the class can be abstracted for other reports (such as the paging, sorting arrows and several general purpose variables).

commit 6e30bd442d28b0f849c24d4823f6d522858d1db5
Author: nicolasconnault <nicolasconnault>
Date: Wed, 11 Jul 2007 15:30:04 +0800
Tag: v1.9.0
MDL-10392 updated links to edit_grade form, corrected the loop for table rows, which only initialised the $element object at the end of the loop MDL-10211 Removed showfeedback preference MDL-10286 Changed tooltip so that it surrounds the grade in a span when edit mode is off, and surrounds the edit icon otherwise MDL-10287 Deleted edit_feedback and edit_feedback files and links to this form MDL-10368 Removed show/hide feedback toggle

commit ce0c946a1fe5b6e2a7edcd175b79874a548b7aed
Author: nicolasconnault <nicolasconnault>
Date: Tue, 10 Jul 2007 03:59:45 +0800
Tag: v1.9.0
MDL-10386 - Renamed grade_report_shownotes preference to grade_report_showfeedback - Added grade_report_quickgrading and grade_report_quickfeedback preferences - Re-organised the grade_get_icons() function: The icons are all prepared first, then the preferences and conditions are applied to the selection of icons. This allows for a third $icons parameter, an array of icon names, which explicitly sets which icons should be returned by the function, regardless of preferences and options. - Identified and fixed MDL-10391 bug with updating boolean user preferences (advcheckbox used)

commit 97d608ba0532066dfb60cbeb213ad4d1f13a81f4
Author: nicolasconnault <nicolasconnault>
Date: Tue, 26 Jun 2007 16:50:22 +0800
Tag: v1.9.0
Changed grade_item so that its grademax is count(scale_items) and grademin is 1, to be consistent with use of scales throughout Moodle.

commit 5ff96295e63232254349f1a65f7660b151ed5f0e
Author: nicolasconnault <nicolasconnault>
Date: Sat, 23 Jun 2007 01:34:14 +0800
Tag: v1.9.0
MDL-10207 Tabs added to category admin page and grader report page. I also changed the id URL variable to courseid. This may cause some issues as long as the current grade/lib.php library is used, but I thought we should use courseid instead of id.

commit 4a490db004716dc66c0174fddf09e61a08371219
Author: nicolasconnault <nicolasconnault>
Date: Sun, 17 Jun 2007 05:20:57 +0800
Tag: v1.9.0
MDL-9506MDL-9629 Added code to grade_category::delete so that its children have their categoryid/parent field updated. However, the query used sets the fields to an empty string instead of a null value. The unit test for grade_categories fails.

commit 210611f6eed4a956f00143f67d5aaf6d55fd8468
Author: nicolasconnault <nicolasconnault>
Date: Tue, 05 Jun 2007 16:50:24 +0800
Tag: v1.9.0
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)

commit 0fc7f62445a2a3408a8b5493b5f3a3e5d0372634
Author: nicolasconnault <nicolasconnault>
Date: Thu, 31 May 2007 11:15:43 +0800
Tag: v1.9.0
MDL-9506MDL-9137MDL-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!

commit 5bfa0d793a0fb1bec948c0c7cde992d7f088cb7f
Author: nicolasconnault <nicolasconnault>
Date: Wed, 30 May 2007 16:48:11 +0800
Tag: v1.9.0
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.

commit a3d5594248334502a6b204da8f9b51bc4bf5fa22
Author: nicolasconnault <nicolasconnault>
Date: Wed, 30 May 2007 11:09:38 +0800
Tag: v1.9.0
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.

commit c91ed4be0d55d62d4f026420a67c939a9057cd0b
Author: nicolasconnault <nicolasconnault>
Date: Mon, 28 May 2007 16:00:19 +0800
Tag: v1.9.0
MDL-9506 Category and Item now set their own courseid if not set explicitly, and if they have enough information from other sources. category::set_as_parent has a new constraint: cannot set over children from different courses. Applied recursion to grade_tree::renumber(), but still some fine-tuning to do, since only grade_items are getting updated in DB.

commit 2186f72cb1af458ae6f8e40fb1e27b98592a4ba8
Author: nicolasconnault <nicolasconnault>
Date: Thu, 24 May 2007 16:50:01 +0800
Tag: v1.9.0
MDL-9629 Beginning the edit category page. Also added dmllib::sql_max($field) and fixed a few bugs. Grade_item should now extrapolate its sortorder upon insertion if not set, by looking up the last sortorder in the table, and incrementing by 1.

commit ab53054fd14e2c052c366a7e63db726f49375aec
Author: nicolasconnault <nicolasconnault>
Date: Mon, 21 May 2007 13:54:12 +0800
Tag: v1.9.0
MDL-9506 Removed the debugging message for the fetch() methods. Added droplow and keephigh rules to grade_category::aggregate_grades(). The only question now is what to do when the droplow or keephigh field is larger than the number of grades for a given user/item combination. At the moment it just gives that value 0.

commit 03f01eddedfacbef4a28a6e72463d42341e5f8f3
Author: nicolasconnault <nicolasconnault>
Date: Fri, 18 May 2007 16:05:53 +0800
Tag: v1.9.0
MDL-9506 New grade_category::set_as_parent($children) method (non-static). Crucial method for adding categories over children. 4 constraints have been set up, and successfully tested in unit tests. However, the method fails when it comes to updating the children's parent fields. The test data may be missing some required fields.

commit d7f1cc4c3b8c9825cbfea882701caea524b3cedc
Author: nicolasconnault <nicolasconnault>
Date: Fri, 18 May 2007 13:34:30 +0800
Tag: v1.9.0
MDL-9506 Fixed up the grade_tree and its unit tests. The main change to notice is in grade_category, where the array returned by get_children() is indexed by sortorder. The associated unit tests have been updated to reflect this important change.

commit a39cac258db82194386eb3d54cf2dff1435033ea
Author: nicolasconnault <nicolasconnault>
Date: Thu, 17 May 2007 17:04:52 +0800
Tag: v1.9.0
MDL-9506 Elements of the array returned by grade_category::get_children are now indexed by sortorder, to work more easily with grade_tree methods. New get_sortorder method for grade_category and grade_item. This is used when the type of an object is unknown, and could be either one. Because categories have a "virtual" sortorder (through their grade_item), they can transparently return one as well. Unit tests fail for grade_tree at present because of faulty implementation which is being fixed. The $depth attribute has been completely removed, as well as a number of switch statements, in favour of an $index variable which is exploded and used to build strings of array keys for eval statements (unset and array_splice). Can't wait to get all this working

commit 607a0bbbc9cd3e75b0c5c414a907ae61ece260d1
Author: nicolasconnault <nicolasconnault>
Date: Thu, 17 May 2007 12:13:42 +0800
Tag: v1.9.0
MDL-9506 Successfully implemented the grade_tree methods for moving an element somewhere else in the tree. Tests pass successfully. However the test data doesn't yet include more than 1 top-category, so I can't test moving it. Direct insertion and deletion have not yet been tested, although insertion is used by the move_element method.

commit 0dfe77317ad5d03907de2dac6517a90b17b1b8e9
Author: nicolasconnault <nicolasconnault>
Date: Wed, 16 May 2007 10:47:56 +0800
Tag: v1.9.0
MDL-9506 grade_category::display_grades() and grade_category::get_tree() correctly built the headers for a HTML table of grades, with two layers of categories and one layer of grade_items. Empty filler cells are used when a 1st or 2nd level category doesn't exist for a grade_item.

commit dda0c7e6663a990b57d526cbf39e03eec708e173
Author: nicolasconnault <nicolasconnault>
Date: Mon, 14 May 2007 16:18:03 +0800
Tag: v1.9.0
MDL-9506 Added some unit tests, found some errors, and realised they came from incorrect setup unit test data, which I corrected (grade finals for item 3 were set to 2-digit ints although item 3 was a scale of 1-7.

commit 2df712352d59ce268ddff869be4ef0ef19462c17
Author: nicolasconnault <nicolasconnault>
Date: Fri, 11 May 2007 16:46:34 +0800
Tag: v1.9.0
MDL-9506 Almost completed category aggregation, including generation of raw and final grades held by these categories. Only a few small glitches remain, that cause these grades not to be generated properly. This is the last critical element of the gradebook API, so I'm looking forward to finishing it

commit 77d2540eea3c57c61395a9dbea55f3bb200e5487
Author: nicolasconnault <nicolasconnault>
Date: Fri, 11 May 2007 11:29:00 +0800
Tag: v1.9.0
MDL-9506 Finished implementing the propagation of needsupdate flag up the hierarchy when a lower element justifies it. All unit tests pass. The next task is to implement the generation of raw grades and final grades based on this needsupdate setting.

commit 1d4b666828e73092c46e6ec7183d4cc1f02c875f
Author: nicolasconnault <nicolasconnault>
Date: Fri, 11 May 2007 10:43:46 +0800
Tag: v1.9.0
MDL-9506 Fixed a bug with the fetch method. This method should not be called statically when setting an internal object. For example, when the grade_category is calling its load_parent_category, it should not call grade_category::fetch, but new grade_category. Otherwise, the method assigns the new variables to the calling object.

commit 6527197b4ece75221a1365e5f6dde5d386881f8d
Author: nicolasconnault <nicolasconnault>
Date: Wed, 09 May 2007 15:50:28 +0800
Tag: v1.9.0
MDL-9506 Unit test tables are now created and emptied using XMLDB. raw.gradescale and final.gradescale have been removed in favour of a single gradevalue. Scale value is no longer rounded until moment of display. A number of other changes which you can look at by browsing the diff

commit 2c72af1f08c17836aa2ae6c6d7f6aa61a789dcbe
Author: nicolasconnault <nicolasconnault>
Date: Tue, 08 May 2007 16:01:55 +0800
Tag: v1.9.0
MDL-9506 Stuck on grade_category->generate_grades. I cannot figure out how to recursively generate raw grades for each category's associated grade_item based on that category's children categories and items. Heaps of other changes with this commit, including a new grade_object::update_from_db() method, which uses the state of the record in DB to update the current object with a matching id (useful when you insert an incomplete object in the DB and want to get the default values as set up in the DB).

commit 0aa32279b723adb6121ab17333db9e94094376f0
Author: nicolasconnault <nicolasconnault>
Date: Tue, 08 May 2007 10:20:26 +0800
Tag: v1.9.0
MDL-9506 Issue 1: adjusting a gradeitem's value would result in a grade_final object with gradevalue assigned, even when a gradescale should have been assigned. Issue 2: double grade_final entries when calling grade_item->load_final() after grade_item->generate_final(). Issue 3: Calling grade_item->update_final_grade() without first calling grade_item->generate_final() would result in fatal error. generate_final() is now called if the raw and final arrays' sizes don't match.

commit 712d5007771f76a29afafcd74266aa897831706a
Author: nicolasconnault <nicolasconnault>
Date: Mon, 07 May 2007 10:04:06 +0800
Tag: v1.9.0
MDL-9506 Removed implicit loading of associated objects from constructors (grade_item and grade_grades_raw) to avoid very large numbers of sql queries when only little data is required. The load_scale() method, for example, needs to be called explicitly.

commit 20355e5ac22092c55286e9c0bf056d673d3196f2
Author: nicolasconnault <nicolasconnault>
Date: Wed, 04 Apr 2007 11:35:23 +0800
Tag: v1.9.0
MDL-9138; Edited lib/xmlize.php to return false when the passed file doesn't return any entries (when it's not valid XML or is empty). Also made it much clearer that glossary/import requires an XML file, not just any old file.

commit 27c69abeeaa47cd8aedc403342509a25f2616ec5
Author: nicolasconnault <nicolasconnault>
Date: Fri, 30 Mar 2007 16:31:20 +0800
Tag: v1.9.0
MDL-9115 Added new strings to lang/en_utf8/group.php (where in roles.php before!). Also cleaned up page a little more so the backend code is at the top, with the HTML output at the bottom. We may be able to use mform with this page eventually. AJAX would also help.

commit 53b16b2b6879f15e80fc558ce5e8eb67beac5027
Author: nicolasconnault <nicolasconnault>
Date: Fri, 30 Mar 2007 15:52:56 +0800
Tag: v1.9.0
MDL-9118: The group/edit page now fetches the groupingid for the selected group if it isn't already provided. Note that this will need changing when/if multiple grouping membership is implemented, since only the first grouping is returned at present.

commit 77e90955b519b74f58a028b055c172e3fe3751a4
Author: nicolasconnault <nicolasconnault>
Date: Wed, 28 Mar 2007 16:40:32 +0800
Tag: v1.9.0
MDL-9062 Created two new files so the unfinished conversion doesn't affect any current code. Also added a convenience groups_update_group($data) method. Patience, this is taking a while but I'm learning to use these mforms for the first time

commit 109694fbf959e5ccb50e8b30619770c6a7a76019
Author: nicolasconnault <nicolasconnault>
Date: Thu, 01 Mar 2007 13:09:39 +0900
Tag: v1.9.0
Issue MDL-8697 Someone must have fixed this earlier, because there are no more tables. However I found the use of the align attribute which I replaced with inline CSS style=\"text-align:right\"

commit d499142e5a57060d76c59c834894e5e37c6a46a6
Author: nicolasconnault <nicolasconnault>
Date: Thu, 01 Mar 2007 10:31:37 +0900
Tag: v1.9.0
Safari 2.0 and Opera 9.0 are now detected and supported for YUI. However, preliminary tests show that drag&drop behaviour is very slow on Opera and user-unfriendly on both browsers. A YUI debug window also pops up on Safari.