Commit Graph

430 Commits

Author SHA1 Message Date
Eric Merrill ab391cddf0 MDL-48655 gradebook: Don't treat a scale with a gradepass of 0 as passed 2014-12-18 16:18:40 -05:00
Damyon Wiese 1dd7fab104 MDL-47275 Grades: Sum of grades bug in max grade with extra credit
Sum of grades is not calculating max grade with extra credit for students
2014-11-03 16:56:48 +08:00
Frederic Massart 84dd6d42ce MDL-38732 gradereport_grader: Handle simultaneous graders 2014-10-14 13:50:17 +08:00
Frederic Massart 256616c5e0 MDL-46647 core_grades: Adding tests for fetch_all_helper() 2014-10-07 15:26:40 +08:00
Eloy Lafuente (stronk7) 1d09472f1f MDL-46647 grades: Fix fetch_all_helper() towards cross-db
That helper, used to fetch information from DB by all the grade_object
chidren classes was not behaving properly handling TEXT/CLOB columns.

Instead of creating a property within every class listing the
existing columns, it seems to be a better solution to instrospect
the database metadata (cached) to ensure the correct SQL is generated
in every case.
2014-10-07 15:26:40 +08:00
Damyon Wiese 589e140d83 MDL-46997 Grades: fix sum of grades with hidden items with differing maxgrades 2014-09-09 14:02:14 +08:00
Damyon Wiese 78c55e13a2 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 14:02:13 +08:00
Damyon Wiese ec297cc65b MDL-35984 Grades: Fix deprecation of grade_category::aggregate_values 2014-08-11 14:22:27 +08:00
Damyon Wiese 5e33ee65e5 MDL-35984 grade: Recalculate min/max for sum of grades when hidden grades are involved. 2014-08-11 14:22:27 +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
Jonathan Champ 8a592bd551 MDL-29733 grade: Query for Identifying Grade Grades to Precreate is SLOW 2012-12-11 09:15:31 +08:00
Andrew Davis aee968da79 MDL-36761 core_grade:shifted a call to count() out of a loop 2012-11-30 11:05:44 +08:00
Andrew Davis 69bcca5e9c MDL-36061 core_grade: added some unit tests related to refresh_grades() 2012-11-15 11:14:21 +08:00
Matt Switlik 0a757cf033 MDL-36061 gradebook: grade_item->refresh_grades doesn't propagate $userid 2012-11-12 11:19:20 +08:00
Andrew Davis 97512dd36b MDL-35667 core_grade: added a new test for grade_category::apply_limit_rules() 2012-10-01 12:53:26 +08:00
Andrew Davis 5292948648 MDL-31782 core_grade: fixed a potential infinite loop 2012-10-01 11:32:06 +08:00
Rajesh Taneja dea75f643d MDL-32759 Assignment: Grades will not be scaled for new assignment module, and added warning message for user 2012-08-14 11:23:33 +08:00
Adrian Greeve b0c6dc1cac MDL-34465 - lib - Replacing get_context_instance with context_XXXX::instance (group 8) 2012-07-27 10:10:46 +08:00
Andrew Davis fb80cb2aa4 MDL-13629 grade: added some unit tests to clarify the handling of droplow and improved apply_limit_rules() 2012-07-25 09:35:28 +08:00
Frederic Massart 455dc0de61 MDL-18301 Gradebook: Added feature for components to control grade visibility 2012-07-06 09:52:46 +08:00
Petr Skoda 4ca04fb58b MDL-32569 remove remaining references to simpletest and improve events test 2012-04-21 17:08:30 +02:00
Petr Skoda 6b04fdc0b6 MDL-32400 improve module generators
Module generators are using standard *_add_instance() methods which helps with testing, it also updates grades and calendar events if used.
2012-04-15 14:16:59 +02:00
Petr Skoda bd42a2657e MDL-32323 do try to fetch all other grade objects with existing test fields 2012-04-11 22:56:27 +02:00
Petr Skoda 15db9f7d66 MDL-32323 do try to fetch grades with existing test fields 2012-04-11 22:41:37 +02:00
Petr Skoda 948d46da34 MDL-32323 add grade tests 2012-04-10 15:27:10 +02:00
Petr Skoda caee6e6c26 MDL-32251 E_STRICT fixes part 3 2012-03-29 15:24:30 +02:00