193 Commits

Author SHA1 Message Date
Stefan Hanauska
6378a41995 MDL-75594 course: Add beforemod parameter 2022-12-12 14:39:53 +01:00
Stefan Hanauska
c4523503d2 MDL-74887 course: Hide stealth mode without view page 2022-10-08 08:09:40 +02:00
Jonathan Champ
cc9863576e MDL-75836 activities: preserve moodleform validation errors 2022-09-26 19:26:38 -04:00
Tim Hunt
8babdbd396 MDL-74608 activities: a new option to force the activity language
For a long time, Moodle has had the feature to force the language
for a whole course. This change adds the same feature at activity
level.

The course-level feature was controlled by a capability
moodle/course:setforcedlanguage, and I decided to use the same
capability to control this feature. I think a new capability would be
overkill.
2022-08-15 22:15:52 +01:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Eloy Lafuente (stronk7)
b3b1006201 MDL-74516 activities: Better handling of floats for gradepass fields
Current code was relying on grade_floatval() that is not a validation
function. Instead, the gradepass field must be defined as proper float
and then perform the needed validations using unformat_float().

Note that the float element form has some particularities, see
MDL-73994 for more information and that makes us to have to check
for some values (null, zero) manually. Once that form element type
gets its behaviour fixed, the code will need to be revisited, hence
we have annotated it as comments for easier finding it in the future
(the same changes already were applied to other gradebook forms).

Also, remove an unreachable line of code (comparing with empty string)
within the grade_floatval() function because it's not possible anymore
to pass any string to it, as far as it's "?float" typed.

Covered as many cases with quiz completion as have been able to imagine.
2022-07-01 13:55:51 +02:00
Tim Hunt
b6b0d8b848 MDL-74611 course settigns: re-order Common module settings
All the group-related settings should be next to each other.
2022-04-29 13:23:41 +01:00
Simey Lameze
89e59a60ef MDL-69561 mod: handle content download on course modules 2021-11-11 18:38:53 +08:00
Juan Leyva
6f0f979ae3 MDL-70083 message: Updated content notification task 2021-11-04 12:23:21 +01:00
Peter
90acd8d381 MDL-52206 core: Add completion criteria to course_modules 2021-10-04 19:44:02 +08:00
Peter
663137748e MDL-52206 core: Add completion based on pass grade
Add new completion based on pass grade to the completion criteria.
2021-10-04 19:42:34 +08:00
Paul Holden
2877501ad8 MDL-71402 availability: fix group restriction button in mod form.
* The button to "Add group/grouping access restriction" under
   common module settings should only be present if corresponding
   availability plugins are enabled; and
 * Prevent the same button behaving as a submit button, which
   intercepted the user hitting return in the form and added a
   restriction without deliberate action taken by the user.
2021-05-06 14:20:37 +01:00
Luca Bösch
aee27d0a9b MDL-71118 core: Add grade (verb) string.
AMOS BEGIN
 CPY [grade,core],[gradenoun,core]
 CPY [grade,core],[gradeverb,core]
AMOS END
2021-04-17 11:46:09 +02:00
Dmitrii Metelkin
e99e0bb557 MDL-70855 course: add extra callback for extending course module form 2021-03-01 13:33:52 +11:00
Tuan.Dinh
8ae7019cf8 MDL-70124 course: Activity names are now trimmed. 2021-02-11 11:12:59 +08:00
Ferran Recio
1e7e255d72 MDL-67707 course: add support for PARAM_ALPHANUM module names 2020-03-16 17:52:08 +01:00
Andrew Madden
948a951a4e MDL-67351 admin: Create new 'required' admin flag setting.
Extend the admin flag options, that currently allow the 'advanced' and 'locked' states
of a form setting to be controlled by a plugins admin settings, to also include
the 'required' state. These options appear as a list of checkboxes next to the admin
setting.
2020-01-30 10:49:14 +11:00
Andrew Nicols
fe795b59e4 MDL-67116 form: Require grade in multi-grade-item activities
AMOS BEGIN
  CPY [rating,rating],[grade_rating_name,rating]
AMOS END
2019-11-13 10:14:37 +08:00
Ryan Wyllie
a492f69caf MDL-67116 course: allow grading completion for non ratings grade item 2019-11-13 10:11:44 +08:00
Mathew May
dc0145b19e MDL-66074 core_course: Correct documentation 2019-10-30 10:23:41 +08:00
Andrew Nicols
fcc88fddba MDL-66079 core_grades: Add support for multiple grade items in an activity
Part of MDL-66074
2019-10-30 10:23:40 +08:00
Davo Smith
87c7fb6e9a MDL-64557 modform: switch disabledIf to hideIf, where appropriate 2019-02-12 10:18:04 +00:00
Shamim Rezaie
ea191cf1b4 MDL-41507 core_group: Consistent default value for FEATURE_GROUPS 2018-12-12 14:03:45 +11:00
Jake Dallimore
de60737dd7 MDL-60145 course: fix bug with group restictions button during mod edit
If a mod doesn't support groups, then we remove the grouping element,
and now also the 'add group/group restriction' helper button too.
2018-10-10 08:40:07 +08:00
Troy Williams
f9a7a98a4a MDL-61012 course: Allow extending class to set 2018-04-24 16:13:29 +12:00
Chernyavskiy Leonid
0e9cda01f1 MDL-60658 course, gradebook: fix missing unformat_float for gradepass
Fix incorrect comparison of gradepass variable (with comma as decimal separator)
with grade variable when trying to save assignment settings.
Adds missing unformat_float($data['gradepass']).
2018-03-01 09:26:51 +07:00
Stephen Bourget
dccd9540d0 MDL-61205 completion: allow expected completion to support time 2018-01-11 21:30:13 -05:00
Jake Dallimore
273d310601 MDL-58138 completion: Fixes for a number of small issues. 2017-04-19 11:41:57 +08:00
Marina Glancy
7f53e8aa22 MDL-58267 completion: allow to set default activity completion
Part of MDL-58138 epic
2017-04-19 08:54:35 +08:00
Marina Glancy
06cdda468a MDL-58139 completion: bulk update completion
Part of MDL-58138 epic
2017-04-19 08:52:57 +08:00
Dan Poltawski
1e4e5c52d7 Merge branch 'MDL-55611-master' of git://github.com/danpoltawski/moodle 2017-04-04 17:07:41 +01:00
Marina Glancy
125c4c4cb8 MDL-57961 course: change wording of module availability
renamed Visible to Availability and added help strings

AMOS BEGIN
 CPY [availability,core_moodle],[modvisible,core_moodle]
 CPY [availability,core_moodle],[modvisiblewithstealth,core_moodle]
 CPY [availability,core_moodle],[modvisiblehiddensection,core_moodle]
 CPY [show,core_moodle],[modshow,core_moodle]
 CPY [hide,core_moodle],[modhide,core_moodle]
AMOS END
2017-04-04 17:05:57 +08:00
Damyon Wiese
7737c79792 MDL-58102 completion: Don't expand completion
The form looks wierd with one expanded section.

Part of MDL-55611 epic.
2017-04-03 11:37:08 +08:00
Jun Pataleta
a0a6762ec3 MDL-58102 course: Set sensible defaults for completion form fields
Part of MDL-55611 epic.
2017-04-03 11:37:08 +08:00
Marina Glancy
8341055eb4 MDL-4782 course: Allow activities in the "stealth" mode
Add field 'visibleoncoursepage' to the course_modules table
Add site-wide setting for turning on stealth mode availability
Add callback for "stealth" mode support in the course formats
Change display of modules/sections availability on the course page
2017-02-14 16:38:05 +08:00
Philipp Hager
29df1cade1 MDL-57198 course: add css-classes to restrictbygroup-button 2016-12-08 13:24:18 +01:00
Simey Lameze
bc577c541f MDL-51267 mod: move the changes from the API to the form file 2016-04-19 16:36:26 +08:00
David Monllao
c3b661403c Merge branch 'cbe' of git://github.com/FMCorz/moodle 2016-04-19 12:37:11 +08:00
Simey Lameze
819e1ff0ad MDL-51267 mod_url: make the url and resource forms friendlier 2016-04-19 11:13:18 +08:00
Frederic Massart
91e5464282 MDL-53700 competency: Making CiBoT happier 2016-04-18 11:06:00 +08:00
Frederic Massart
07fc0ec380 MDL-53700 competency: Implementing a URL resolver 2016-04-18 11:06:00 +08: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
Mark Nelson
9621d5a7ae MDL-52252 core_course: removed unused variables
The call to 'context_coursecat::instance($COURSE->category);'
was causing Moodle to throw an exception due to non-existent
category.
2016-03-10 13:17:11 +01:00
Marina Glancy
1ea2f7d650 MDL-52252 tags: course module tags small correction 2016-03-09 15:33:25 +08:00
Nadav Kavalerchik
dffcf46f43 MDL-52252 Tags: Add tags to modules (Resources and Activities) 2016-03-09 14:19:47 +08:00
Mark Nelson
664d8be7ea MDL-48634 core: prevent change of grade values when necessary
Three additional checks have been added.

Once grades have been recorded for the activity/grade item -

1) Do not allow the grade type to be changed.
2) Do not allow the scale to be changed.
3) If we are using ratings do not allow the 'Maximum points'
value to be changed.

Also reordered form elements, removed form elements that
were not necessary, added and changed existing language
strings to improve the overall UI.
2016-02-09 17:46:42 +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
Marina Glancy
1a0df5535e MDL-52081 forms: Use __construct() for constructors 2015-12-10 13:38:01 +08:00
Mark Nelson
7080b38f2e MDL-50535 core_course: disabled 'gradepass' field when no ratings set 2015-07-24 13:31:18 -07:00
Marina Glancy
fc55273e0f MDL-50612 grades: remove gradepass if there is no grading 2015-07-14 13:16:34 +08:00