nicolasconnault [Tue, 8 May 2007 02:20:26 +0000 (02:20 +0000)]
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.
nicolasconnault [Mon, 7 May 2007 02:04:06 +0000 (02:04 +0000)]
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.
martinlanghoff [Sun, 6 May 2007 05:32:40 +0000 (05:32 +0000)]
get_my_courses() callers update - check of the $fields param - pass null instead
The default way to call get_my_courses() is now to pass null in the $fields
param to get the (cached copy) of the useful fields. Cuts down enormously
on DB traffic, memory footprint, and session size.
With 2500 courses the calendar was causing around 15000 queries at login and 5000 on the home page.
- Replaced queries inside loops with single unlooped queries.
- Fixed calendar so that course events will show when the users role is assigned at a category level.
- Moved calendar_session_vars() function call out of calendar/lib.php (including a lib should not have side effects)
Author: Matt Clarkson - with some conflict resolution from MartinL
csantossaenz [Fri, 4 May 2007 11:17:15 +0000 (11:17 +0000)]
Fixed some problems with the variables stored in scorm_scoes_track and the last two functions have been commented and we are going to use scorm_seq_is() instead of them.
tjhunt [Fri, 4 May 2007 10:04:20 +0000 (10:04 +0000)]
Matching qestion type was failing to correctly determine wheterh the student had changed their answer - further improvements. Merged from MOODLE_18_STABLE.
nicolasconnault [Fri, 4 May 2007 07:40:51 +0000 (07:40 +0000)]
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.
jamiesensei [Fri, 4 May 2007 05:47:59 +0000 (05:47 +0000)]
passing cmid to question.php and removed use of session modform var. Question.php now independent of quiz module. Small improvement to displayed breadcrumbs.
jamiesensei [Thu, 3 May 2007 10:38:35 +0000 (10:38 +0000)]
removed use of session for reordertool and show page breaks. Reordertool and show page breaks params are now passed from page request to page request only for page requests for quiz/edit.php
nicolasconnault [Thu, 3 May 2007 07:10:22 +0000 (07:10 +0000)]
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).
jamiesensei [Thu, 3 May 2007 04:34:53 +0000 (04:34 +0000)]
MDL-9644 new class 'moodle_url' in weblib.php to handle constructing a url. It would internally stores params as an array and have methods to manipulate the array. The class can also output the params as hidden fields in a form or as a url with get params appended.
ikawhero [Wed, 2 May 2007 09:35:35 +0000 (09:35 +0000)]
1. Changes to allow different priorities in the theme selection based on
CFG->themeorder setting
2. Changes to allow category themes. Theme can now be set for a category
which will apply to all sub-categories (unless they specifically have a
theme set) and to child courses (course theme and $CFG->themeorder
settings permitting). New config setting $CFG->allowcategorythemes must
be set. Off by default as it means extra database calls.
There is an ugly hack to find out if we are viewing course/category.php -
anyone welcome to tidy this up if they have a better idea.
nicolasconnault [Wed, 2 May 2007 07:20:13 +0000 (07:20 +0000)]
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.
tjhunt [Tue, 1 May 2007 07:03:52 +0000 (07:03 +0000)]
Fix all the PHP syntax errors in this code. I can't think of any valid reason for checking code with that many syntax errors into CVS, especially when there are plenty of editors out there that check the syntax for you and highlight the errors.\r\rAlso, can I point out that Moodle coding guidelines require spaces for indents, not tabs. (http://docs.moodle.org/en/Development:Coding)
nicolasconnault [Tue, 1 May 2007 05:45:54 +0000 (05:45 +0000)]
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.