nicolasconnault
d7f1cc4c3b
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.
2007-05-18 05:34:30 +00:00
skodak
d77717d786
MDL-9843 get_cached_events does not handle components properly;
...
whitespace cleanup;
minor coding style changes - such as always returning arrays from get cached and file events;
marked some functions as eventslib internal only
2007-05-17 15:44:07 +00:00
skodak
4230372f19
removed unused $varprefix
2007-05-17 14:05:36 +00:00
nicolasconnault
a39cac258d
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 :-)
2007-05-17 09:04:52 +00:00
nicolasconnault
607a0bbbc9
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.
2007-05-17 04:13:42 +00:00
nicolasconnault
8ff4550af2
MDL-9506 Refactored some of the category methods into grade_tree, same for unit tests.
2007-05-17 02:22:32 +00:00
martinlanghoff
6c146b7d7f
get_my_courses() if the parameters passed are identical to the defaults... MDL-7416
...
We are using the defaults then ;-)
Credits for spotting it go to Yu!
Blames for the thinko to MartinL
2007-05-16 23:19:15 +00:00
skodak
ec74e82d5c
MDL-9618 Form remove option logic is incorrect - patch by Mark Nielsen; merged from MOODLE_18_STABLE
2007-05-16 20:32:01 +00:00
skodak
9eb64c947a
MDL-9825, MDL-9798, MDL-9799 - new workaround for the object trouble in IE caused by UFO; reverting previous patches; merged from MOODLE_18_STABLE
2007-05-16 18:17:14 +00:00
nicolasconnault
e835361626
MDL-9506 Created new grade_tree object for working with a tree of grade_categories and items.
2007-05-16 15:04:35 +00:00
moodler
b6b354e36e
Merged MDL-9826 from stable
2007-05-16 08:03:37 +00:00
nicolasconnault
e81235897c
MDL-9506 Fixed a couple of failing unit tests, due to new test data
2007-05-16 07:47:04 +00:00
nicolasconnault
c78b0cc59a
MDL-9506 Reorganised unit tests a bit, added some stubs and tests for grade_category, and corrected missing grade_finals for orphan grade_items and categories.
2007-05-16 03:17:46 +00:00
nicolasconnault
0dfe77317a
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.
2007-05-16 02:47:56 +00:00
nicolasconnault
5e16f809f8
MDL-9506 Experimental development of numbering and displaying of category and items tree/table. Messy work :-)
2007-05-15 09:59:53 +00:00
moodler
ae3e06dd24
Merged brackets fixes from stable
2007-05-15 07:50:19 +00:00
toyomoyo
85ac09edc6
taking out a debugging line
2007-05-15 03:39:20 +00:00
toyomoyo
9492291c82
some changes to events to make grade_added work
2007-05-15 03:19:01 +00:00
nfreear
a84dea2c30
Follow-up fix bug MDL-9753, "THEME->larrow, rarrow don't work in stock IE6".
2007-05-14 13:28:21 +00:00
sam_marshall
3bb92bbe04
MDL-9382: Added fields and orderby parameters to get_user_capability_course, which allows for greatly improved performance in the case where you want more information about the courses. (However, the function does still basically suck.)
2007-05-14 12:11:47 +00:00
moodler
bfe7297e47
First rough cut at a grade_handler for Yu to continue with
2007-05-14 09:38:41 +00:00
moodler
ca4bcf58ec
Event handler for new grades
2007-05-14 09:30:56 +00:00
nicolasconnault
dda0c7e666
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.
2007-05-14 08:18:03 +00:00
nicolasconnault
096858ffcf
MDL-9506 Finally cracked the category aggregation. However, more thorough unit tests need to be written, with exact expectations instead of ranges, as currently used. All unit tests pass.
2007-05-14 04:14:22 +00:00
jamiesensei
850e85b7b2
some changes to make it easier to override editing icons in child classes and to make several lists work well with each other on the same page.
2007-05-11 22:22:14 +00:00
ikawhero
9aaa214e0c
Addng two new options to the custom profile fields:
...
1. Force unique - force the field data to be unique
2. Signup - display the field on the signup page
MDL-9702
2007-05-11 12:16:44 +00:00
nicolasconnault
2df712352d
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 :-)
2007-05-11 08:46:34 +00:00
nicolasconnault
77d2540eea
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.
2007-05-11 03:29:00 +00:00
nicolasconnault
1d4b666828
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.
2007-05-11 02:43:46 +00:00
moodler
b55997c112
Removed set_timecreated and just tidied up some time-related things
2007-05-11 02:11:30 +00:00
moodler
f744267a28
A few small fixes and clean ups
2007-05-10 09:07:37 +00:00
skodak
63c9ee991f
MDL-9764 Require_course_login() should check cm visibility in frontpage course too; merged from MOODLE_18_STABLE
2007-05-10 09:02:41 +00:00
nicolasconnault
cb64c6b257
MDL-9506 small fix
2007-05-10 08:58:00 +00:00
toyomoyo
76127f3797
adding new global variable to deter which export should write the exported timestamp in grade_grades_final table
2007-05-10 08:23:44 +00:00
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
toyomoyo
8df8bbfbd0
removing extra code
2007-05-10 03:51:55 +00:00
toyomoyo
e8565225c9
removed extra code
2007-05-10 03:50:07 +00:00
toyomoyo
ecca85812f
prefix is no longer needed for the array containing event dataI(e.g. $mod_assignment_events", $events is sufficient.
2007-05-10 03:46:10 +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
urs_hunkler
f145c2482d
added/changed custom corners lib and calls to add the necessary divs
2007-05-09 15:03:01 +00:00
urs_hunkler
d94f580294
library to add the surrounding divs for custom corners and borders.
2007-05-09 14:33:42 +00:00
nfreear
ce3735d453
Fixes bug MDL-9753, "THEME->larrow, rarrow don't work in stock IE6"
2007-05-09 14:15:33 +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
toyomoyo
ec19392b06
changing grade book db so that grade_grades_text can be referenced from grade_grades_final
2007-05-09 07:52:00 +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
moodler
b0b4ffe1ec
Added CSS class for current language to every page MDL-9750
2007-05-09 06:49:23 +00:00
toyomoyo
48b8bba944
dropping gradescale for grade_raw and grade_final table
2007-05-09 05:56:34 +00:00
nicolasconnault
251aa315d1
Removed breaking unit test, originally set up to test xhtml validity throughout the site.
2007-05-09 05:42:06 +00:00