nicolasconnault
8f4a626d5c
MDL-9506
...
grade_grades_raw
added grade_item object
added load_grade_item()
added call to grade_item->flag_for_update() when object is inserted, deleted or updated
grade_grades_final
added grade_item object
added load_grade_item()
grade_grades_text
added grade_item object
added load_grade_item()
grade_item
added qualifies_for_update()
added call to grade_category->flag_for_update() when object is inserted, deleted or updated (only when qualifies_for_update() is true)
However since I have made this last set of changes, the unit tests are performing extremely slow, and several of them fail. I suspect that there is a serious performance issue involved in using objects too heavily, instead of performing more SQL queries, especially when updates are concerned. Often a complete object is SELECTed before it is amended in an object form then UPDATEd.
In the next iteration I will look at this seriously, and put together some tests with thousands of users and many grade_items, to see how well the API responds.
2007-05-10 08:08:43 +00:00
nicolasconnault
8c8462437d
MDL-9506
...
grade_category:
new parent_category object
new load_parent_category() method
new flag_for_update() recursive method
grade_item:
new category object
changed get_category() to load_category() and updated testgradeitem
added missing idnumber field
new flag_for_update() recursive method
2007-05-10 02:34:01 +00:00
nicolasconnault
5de0c5cb76
MDL-9506 Replaces grade_grades_text.gradesid by composite key userid and itemid.
2007-05-09 09:01:56 +00:00
nicolasconnault
6c76ea8dfa
MLD-9506 Grade_grades_raw object now infers grademax and grademin from scale, if scaleid is given at the time of insert of update.
2007-05-09 08:56:08 +00:00
nicolasconnault
70f9a148af
MDL-9506 Added grade_grades_text object to grade_grades_final and raw objects.
2007-05-09 08:10:27 +00:00
nicolasconnault
6527197b4e
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 :-)
2007-05-09 07:50:28 +00:00
nicolasconnault
2c72af1f08
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).
2007-05-08 08:01:55 +00:00
nicolasconnault
0aa32279b7
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.
2007-05-08 02:20:26 +00:00
nicolasconnault
f151b07393
MDL-9506 Added category's associated grade_item object, and changed unit tests database data so that it creates its own test tables.
2007-05-07 07:33:11 +00:00
nicolasconnault
712d500777
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.
2007-05-07 02:04:06 +00:00
nicolasconnault
2b4f19a9ce
MDL-9506 Fixed some small issues.
2007-05-04 09:04:40 +00:00
nicolasconnault
46566dd8c6
MDL-9506 Moved unit tests in a simpletest subfolder so they can be automatically grouped. Added grade_history and grade_text object and another heap of small implementations.
2007-05-04 07:40:51 +00:00
nicolasconnault
5501446df5
MDL-9506 Added grade_outcome.php. Also added unit test for creation of log in history table when grade_raw is updated.
2007-05-03 08:51:48 +00:00
nicolasconnault
4d0263c6e2
MDL-9506 See previous revision. This adds same functionality but in relation to the hidden field.
2007-05-03 08:08:38 +00:00
nicolasconnault
fae51e127b
MDL-9506 Added grade_item::toggle_locking and unit tests. Affects all final grades if reqested.
2007-05-03 08:02:51 +00:00
nicolasconnault
27f95e9b47
MDL-9506 Upgraded grade_item::adjust_grade with Darlene's more elegant formula. Completed grade_category::get_children($depth, $arraytype). Added 4 constants to help that method. Added and passed all unit tests (111 now).
2007-05-03 07:10:22 +00:00
nicolasconnault
7c8a963f7b
MDL-9506 Finished all unit test stubs, another batch to write soon. One one test fails because I haven't implemented recursive category hierarchy output yet, and not sure if it's needed. A grade_category already returns its immediate children, and that may be enough.
2007-05-02 07:20:13 +00:00
nicolasconnault
ce385eb4e3
MDL-9506 Implemented category path and depth, and wrote unit tests for them.
2007-05-01 08:56:37 +00:00
nicolasconnault
97b868a31c
MDL-9506 Forgot to add the grade_scale.php file.
2007-05-01 05:47:10 +00:00
nicolasconnault
d5bdb228a5
MDL-9506 Finished grade_item::adjust_grade, which now also adjusts scale grades correctly. Added grade_scale object to wrap around the current non-normalized scale DB table. When/if we upgrade to grade_scales and grade_scale_items DB tables, changing the grade_scale class will be easy.
2007-05-01 05:45:54 +00:00
nicolasconnault
d8676dc32e
MDL-9506 Implemented rescaling and grade adjustment formulas in grade_item::adjust_grade(). Also wrote unit tests.
2007-05-01 03:18:55 +00:00
nicolasconnault
b3f111607f
MDL-9506 Lots more unit tests, and work on grade_item::update method and associated functionality. 3 unit tests currently fail, so more work needed.
2007-04-30 09:09:32 +00:00
nicolasconnault
869807d8e4
MLD-9506 Corrected update_final_grades() in grade_item, which was updating the grade_raw table
...
instead of grade_final. Made a few other adjustments.
2007-04-30 05:25:19 +00:00
nicolasconnault
e7e3f50fc2
MDL-9506 Removed redundant portion of code.
2007-04-30 05:00:17 +00:00
nicolasconnault
a8995b34df
MDL-9506 Added grade_grades_raw as a proper object used by grade_item. Also added a global function in gradelib for updating grade_grades_raw objects.
2007-04-30 04:49:25 +00:00
nicolasconnault
f440c2d1b1
MDL-9506 Implemented get_raw and get_final, plus added method_exists() checks for each unit test.
2007-04-30 02:05:51 +00:00
nicolasconnault
e5c674f1e1
MDL-9506 Added raw and final grade objects, plus more work in unit tests.
2007-04-27 08:12:16 +00:00
nicolasconnault
3058964f85
MDL-9506 Number of important changes, restored unit test stability, on to next changes...
2007-04-27 07:28:41 +00:00
nicolasconnault
a56cb85c63
MDL-9506 Renamed lib/gradebook to lib/grade (bug MDL-9506)
2007-04-27 04:13:00 +00:00