546 Commits

Author SHA1 Message Date
Damyon Wiese
057063b1e6 MDL-47059 Grades: Make natural weights work with exclude empty grades
Part of: MDL-46576
2014-10-03 13:53:01 +08:00
Damyon Wiese
5a59aeb14e MDL-47078 Grades: Allow users to have different max grades due to exclusions etc.
This is about making this work with natural weightings.

Part of: MDL-46576
2014-10-03 13:53:01 +08:00
Damyon Wiese
a2c13f686a MDL-47009 Grades: Improve natural weighting algorithm
It's still not perfect, but this is getting closer.

This is based on Johns work on MDL-47009 (just the algorithm). There are some additional
changes to scale the weights if they do not add up to 1.

Part of: MDL-46576
2014-10-03 13:53:01 +08:00
Frederic Massart
825fba1c5b MDL-47274 core_grades: Correct totals when excluding hidden items
Part of: MDL-46576
2014-10-03 13:53:01 +08:00
Frederic Massart
fcf6e01517 MDL-47056 core_grades: Prevent items being displayed as 'Error'
Before this patch we would be marking some items as 'needsupdate'
during an update. Leaving them aside and not effectively updating
them.

Part of: MDL-46576
2014-10-03 13:51:30 +08:00
Andrew Davis
b14c5870fb MDL-47055 core_grade: implemented support for extra credit within natural weighting 2014-10-03 13:51:29 +08:00
John Okely
d57ea5996d MDL-46576 core_grade: Simplify code, remove obsolete calculations 2014-10-03 13:51:29 +08:00
John Okely
11eca362e2 MDL-46576: Fix natural weight maximums aggregation (MDL-47009) 2014-10-03 13:51:29 +08:00
John Okely
aa7055290e MDL-46576: Update reports so that they display natural weights properly (MDL-47009) 2014-10-03 13:51:29 +08:00
Andrew Davis
64b03e5bd7 MDL-47011 core_grade: added ability to un-override grade_item weight 2014-10-03 13:49:41 +08:00
Andrew Davis
45da536113 MDL-47011 core_grade: added the ability to override grade_item weight 2014-10-03 13:49:41 +08:00
Andrew Davis
a2f1f65db4 MDL-47011 core_grade: added naive natural weight calculation to gradebook 2014-10-03 13:49:22 +08:00
John Okely
677bc07377 MDL-46576 core_grades: Add weights to natural (MDL-47006) 2014-10-03 13:49:22 +08:00
John Okely
b5e00814b3 MDL-46576 code_grade: Rename "Sum of grades" aggregation to "Natural" 2014-10-03 13:48:55 +08:00
Damyon Wiese
a1740d7b48 MDL-46139 Grades: Change usedinaggregation column to 2 columns for status and weight. 2014-10-03 13:48:55 +08:00
Damyon Wiese
dadc9d991d MDL-46139 Grades: Add contibution to course total column to user report 2014-10-03 13:47:42 +08:00
Damyon Wiese
65c2ac9334 MDL-46139 Grades: Show the aggregation details in the user report. 2014-10-03 13:47:42 +08:00
Damyon Wiese
bfe969e8b3 MDL-46139 Grades: Add a column to grade_grades to record how a grade is aggregated 2014-10-03 13:47:42 +08:00
Daniel Neis Araujo
bad2c9b14f MDL-46978 gradebook: Edit grade item changes visibility of category 2014-09-29 16:46:22 -03:00
Andrew Davis
0e99979638 MDL-20250 core_grade: added some settings to disable or hide gradebook functionality 2014-09-26 10:19:00 +08:00
Damyon Wiese
b50b12b3f9 MDL-46997 Grades: fix sum of grades with hidden items with differing maxgrades 2014-09-09 17:11:59 +08:00
Damyon Wiese
0db54b5ba2 MDL-46997 Grades: Fix aggregation when hiding is excluded and items have nested dependencies
Includes a unit test for the dependency flattening function.
2014-09-09 17:11:59 +08:00
Damyon Wiese
d6caf63789 MDL-35984 Grades: Fix deprecation of grade_category::aggregate_values 2014-08-11 15:53:47 +08:00
Damyon Wiese
5232d3f2c9 MDL-35984 grade: Recalculate min/max for sum of grades when hidden grades are involved. 2014-08-11 15:53:47 +08:00
Frederic Massart
3774d40f8c MDL-16474 scale: Allow scales with 1 item 2014-06-30 14:24:24 +08:00
Dan Poltawski
020af1058d Merge branch 'MDL-39740_grade_item_idnumber_fix' of git://github.com/ashleyholman/moodle 2014-04-09 11:12:55 +08:00
sam marshall
e01efa2cfd MDL-44070 Conditional availability enhancements (3): conditions
Includes all the conditions that were in previous Moodle versions:

* Date
* Grade
* Completion (of another activity)
* User profile field

Also includes conditions that are used to reimplement
groupmembersonly:

* Grouping
* Group

For each condition, the component plus unit tests are included.

PLEASE NOTE: The code to actually check each condition is reused
from previous Moodle versions and has not been modified except to
pass codechecker. This is intentional, to reduce the risk of the
change and maximise the chance that behaviour is preserved. Some
of this code might not be very good and might need updating but
that can happen separately.

AMOS BEGIN
 CPY [contains,core_condition],[op_contains,availability_profile]
 CPY [doesnotcontain,core_condition],[op_doesnotcontain,availability_profile]
 CPY [endswith,core_condition],[op_endswith,availability_profile]
 CPY [isempty,core_condition],[op_isempty,availability_profile]
 CPY [isequalto,core_condition],[op_isequalto,availability_profile]
 CPY [isnotempty,core_condition],[op_isnotempty,availability_profile]
 CPY [startswith,core_condition],[op_startswith,availability_profile]
 CPY [completion_fail,core_condition],[option_fail,availability_completion]
 CPY [completion_pass,core_condition],[option_pass,availability_completion]
 CPY [completion_complete,core_condition],[option_complete,availability_completion]
 CPY [completion_incomplete,core_condition],[option_incomplete,availability_completion]
AMOS END
2014-04-07 20:11:37 +01:00
sam marshall
ddf368a213 MDL-44141 Completion: System updates data during restore
The completion system has code which is supposed to prevent it
updating completion status while grades are being restored. This
code was a nasty hack and had not worked for some time. As a result
completion dates were restored incorrectly.

This commit implements a 'proper' way to find out if a restore is
currently running, replacing the previous hack.
2014-03-18 13:31:34 +00:00
Eric Merrill
2f31de4515 MDL-44046 gradebook Reduce duplicates returned during sortorder fixing. 2014-02-07 09:29:12 -05:00
Dan Poltawski
e6fbca9f65 Merge branch 'wip-mdl-43306-m' of git://github.com/rajeshtaneja/moodle 2014-01-20 09:45:43 +08:00
Rajesh Taneja
8acec2a693 MDL-43306 restore: Fix grade_item sortorder after restoring course
While restoring course/activity, restore will blindly insert grade_item
sortorder. Which cause dulicate sortorder and lead to unpredicatble sorting
results.

Now we will call grade_item::fix_duplicate_sortorder() after restore is finished
to fix duplicate sortorder and order grade items to the closest order possible
2014-01-15 10:28:00 +08:00
Damyon Wiese
40cb48792a MDL-33952 Assignment - bon voyage!
mod_assignment has been replaced with a stub that only exists to support restoring and
auto upgrading to mod_assign. If you require mod_assignment for some old plugin, then
overwrite with the 2.6 version manually.
2014-01-08 14:51:06 +08:00
Rajesh Taneja
134c514be0 MDL-21180 Gradebook: Consistent handling of change in aggregation
Change from/to GRADE_AGGREGATE_WEIGHTED_MEAN and GRADE_AGGREGATE_EXTRACREDIT_MEAN was only
handled prior to this patch. GRADE_AGGREGATE_SUM and GRADE_AGGREGATE_WEIGHTED_MEAN2 also
behave similar and should be handled same way
2013-12-16 09:57:42 +08:00
Marina Glancy
9b5e2461d5 MDL-28463 grades: use get_course() method 2013-10-29 11:33:55 +11:00
Marina Glancy
b85b9b7c29 MDL-28463 grades: inform conditionlib that grades changed 2013-10-29 11:33:21 +11:00
Sam Chaffee
87a26cc402 MDL-42065 core_grade: Modified some grade_item queries for improved performance
* Modified 2 queries in grade_item::depends_on to improve performance
* Added additional unit tests to cover those queries better
2013-10-09 12:16:54 -06:00
Petr Škoda
686d4ec921 MDL-41022 cleanup core_grade_scale_testcase 2013-08-24 16:21:09 +02:00
Petr Škoda
c952e0911d MDL-41022 cleanup core_grade_item_testcase 2013-08-24 16:21:01 +02:00
Petr Škoda
78953f03fd MDL-41022 cleanup core_grade_grade_testcase 2013-08-24 16:20:53 +02:00
Petr Škoda
59c50aff20 MDL-41022 cleanup core_grade_category_testcase 2013-08-24 16:19:25 +02:00
Tim Hunt
3987312883 MDL-31487 fix FEATURE_CONTROLS_GRADE_VISIBILITY for quiz.
This is a followup to MDL-18301. That fix missed the following points:

1. On the edit categories and items screens, all items had an eye-con to
control the visibility, even if the visibility was controlled by the
module.

2. Changing the visibility of a grade category change the visibility of
all items within it, even if the visibility was controlled by the
module.

3. The quiz ingored $cm->visible when controlling whether its grade item
was visible.
2013-08-08 10:03:47 +01:00
Petr Škoda
8252b7c291 MDL-40901 standardise core test case class and file names
This finally allows us to type only the class name when executing individual core test cases.
2013-08-04 22:10:31 +02:00
Petr Škoda
1c74b26090 MDL-40220 use new core_component::get_plugin_directory() 2013-07-16 22:38:38 +02:00
Ashley Holman
3903fa21f7 MDL-39740 grade: Fix grade_item::add_idnumber strict type checking 2013-05-20 12:15:29 +09:30
Andrew Davis
ea11496d0b MDL-31713 core_grade: added updating of grade min and max to update_final_grade() 2013-05-07 12:21:07 +08:00
Andrew Davis
59772c066a MDL-31713 core_grade:added a unit test to replicate a raw grade max bug 2013-05-07 11:14:08 +08:00
Andrew Davis
63354ab50d MDL-29877 core_grade:add some upgrade code to fix broken grade items introduced by bad restores 2013-04-10 08:05:50 +08:00
Eloy Lafuente (stronk7)
82b61ff8a5 MDL-37952 make helper descendants abstract 2013-02-09 16:22:06 +01:00
Sam Hemelryk
740f635b79 Merge branch 'MDL-29733_master' of git://github.com/andyjdavis/moodle 2012-12-18 09:42:26 +13:00
Andrew Davis
415b15ccd6 MDL-29733 grade: SQL and comment cleanup 2012-12-11 09:15:31 +08:00