37 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
bd31523a30 Merge branch 'MDL-55720' of https://github.com/ak4t0sh/moodle 2016-12-13 11:41:35 +01:00
Donald Barrett
4fc74fe587 MDL-56301 course: Use value for intro field if set in a mods function
Respects a module that has set a value for the db field intro in it's lib function modulename_add_instance.
2016-12-06 10:34:38 +08:00
ak4t0sh
70a557db24 MDL-55720 course: fix potential undefined variable and cleaning
This commit replace $e usage by $returnfromfunc.
Indeed $returnfromfunc always exists in the scope and take $e value in case of moodle_exception.

This commit also remove useless $modcontext affectation.
2016-11-02 23:15:45 +01:00
Rajesh Taneja
16e62ecc56
MDL-55739 core_course: Check if gradepass is set and not empty
Default value of gradepass is 0.00000 and empty check
passes. But on oracle gradepass value is 0, so just
check if the field is set and that should be enough
2016-10-06 09:50:21 +08:00
Juan Leyva
796876b0ab MDL-55739 course: Update get_course_module to return new data 2016-10-04 13:00:35 +01:00
Damyon Wiese
8995c2702f MDL-52534 course: Course module form can be extended by plugins via callbacks.
3 new plugin callbacks are available to extend any course module form.

xx_coursemodule_standard_elements()
xx_coursemodule_validation()
xx_coursemodule_edit_post_actions()

This allows you to add elements to the form, extend the validation
and process the extra information once the module has been created/updated.
2016-04-18 10:58:52 +08:00
Nadav Kavalerchik
dffcf46f43 MDL-52252 Tags: Add tags to modules (Resources and Activities) 2016-03-09 14:19:47 +08:00
Damyon Wiese
e7c71c189b MDL-48634 grades: Make the rescaling option required if maxgrade changes 2016-02-05 18:20:17 +08:00
Damyon Wiese
d629c601c5 MDL-48634 grades: Add an option to rescale when changing the maxgrade 2016-02-05 18:20:17 +08:00
Frederic Massart
5419cbc9eb MDL-50062 grades: Carry agg. settings between categories when possible 2015-08-06 10:24:25 +08:00
Dave Cooper
135efd5116 MDL-50062 gradebook: Fixed behaviour when changing aggregation mathods. 2015-08-06 10:24:25 +08:00
Mark Nelson
595b911a98 MDL-48187 core_course: use updated '$grade_item' 2015-04-19 20:30:21 -07:00
Gregory Faller
8164fad49d MDL-13831 course: add gradepass field to mod_form 2015-03-23 10:56:56 +08:00
sam marshall
af729c3f5e MDL-48452 Completion: Expected date doesn't save when form is locked
The completion fields are locked when a user has already completed the
task, to prevent you accidentally causing it to recalculate the data.

This lock doesn't apply to the expected date field, as this doesn't
affect user completion. However, changes to the field in this
situation were incorrectly not saved.
2014-12-16 17:31:00 +00:00
sam marshall
06c0603825 MDL-47322 Availability: empty availability should be saved as null
As part of the unit test modifications for this change, I added the get_json
function to the availability conditions that didn't have it. (This is a function
for use in unit tests.)
2014-09-26 15:42:37 +01:00
sam marshall
4717a5fca6 MDL-44725 Availability: Replace groupmembersonly - forms (4)
Remove groupmembersonly option from module editing forms.
2014-09-02 13:03:13 +01:00
Simey Lameze
78618bc677 MDL-45029 core_course: set aggregationcoef while creating a new course module 2014-08-20 11:56:11 +08:00
Ankit Agarwal
e20d306969 MDL-39883 events: Create a new api create_from_cm for module create event 2014-06-18 15:39:02 +08:00
Marina Glancy
3e6adca945 MDL-45688 added missing library requirement 2014-05-24 18:33:00 +08:00
Simey Lameze
9e533215bd MDL-44627 events: Triggering event course module updated actions. 2014-04-28 12:11:24 +08:00
Marina Glancy
158379e173 MDL-40907 events: additional legacy logging for module update/add events" 2014-04-08 13:45:13 +08:00
sam marshall
400c0fd229 MDL-44070 Conditional availability enhancements (7): forms
Changes to the module and section editing forms to use the new
fields and JavaScript.
2014-04-07 20:11:52 +01:00
Rajesh Taneja
2cd29dd6f1 MDL-44017 Events: Added unit test for report_viewed events 2014-03-07 15:16:10 +08:00
Dan Poltawski
ac8d049b47 Merge branch 'wip-MDL-44287-master' of git://github.com/marinaglancy/moodle 2014-03-05 14:18:21 +08:00
Marina Glancy
6f9354beb0 MDL-44287 glossary: use course mod api to create new module when importing as new 2014-02-28 16:38:33 +08:00
sam marshall
5c3a54c478 MDL-44065 Course: _add_instance exception leads to inconsistent db
If an exception occurs during a module's _add_instance function, this
results in a course_modules entry with instance=0. The system already
handled returning false to this function, but did not handle
exceptions.
2014-02-17 10:51:09 +00:00
Marina Glancy
449d1fa3a4 MDL-42400 modlib: speed up add_moduleinfo, remove unnecessary queries
removed code that was causing unnecessary DB queries, this significantly speeds up data generators
2013-10-26 14:00:24 +11:00
Marina Glancy
7fbe33fcf1 MDL-42400 generator: module generators call add_moduleinfo instead of direct inserts 2013-10-26 14:00:23 +11:00
Marina Glancy
b4b7587294 MDL-42400 modlib: include module file when it's used
- changed the place where module file is included to make sure that add_moduleinfo() can be called independently from create_module()
- removed permission check from add_moduleinfo() because this function is not supposed to check permissions. Besides it's only half-check. See can_add_moduleinfo()
- added phpdocs to some functions to indicate that they can throw an exception
2013-10-26 14:00:23 +11:00
Ankit Agarwal
63deb5c379 MDL-39959 events: Replace add_to_log() calls with events for course module actions (create, delete and update) 2013-09-16 15:29:56 +08:00
Rajesh Taneja
c592eea2d3 MDL-40428 Libraries: Deprecated delete_context 2013-07-11 12:18:55 +08:00
sam marshall
a9f5fc158c MDL-38315 Completion: Bugs with 'locked' status in activity form 2013-05-01 11:57:29 +01:00
Dan Poltawski
7c69ab5dc7 MDL-38713 course: correctly set visibleold on mod creation
Remove uncessary set of visibleold in the form
2013-03-26 16:27:38 +08:00
Damyon Wiese
3b2a6bf555 MDL-37079 Course create/update module. Remove use of "continue 2". 2013-03-19 13:03:11 +08:00
Damyon Wiese
8f2913b936 MDL-37079 Course create/update module. Fix indenting, some comment formatting and whitespace. 2013-03-19 11:20:39 +08:00
Jerome Mouneyrac
37550a52e7 MDL-37079 missed one modedit.php change since started to work on the issue 2013-03-18 16:08:52 +08:00
Jerome Mouneyrac
80fe0c1983 MDL-37079 switch the modedit.php functions into course/modedit.php 2013-03-18 14:41:38 +08:00