30 Commits

Author SHA1 Message Date
Andrew Nicols
3c150de283 MDL-67218 form: Do not clear grade when rescaling not enabled 2019-11-12 11:29:34 +08:00
Mathew May
072ee7f750 MDL-66074 core_form: Foce point value to always be 100 2019-10-30 13:03:59 +08:00
Davo Smith
87c7fb6e9a MDL-64557 modform: switch disabledIf to hideIf, where appropriate 2019-02-12 10:18:04 +00:00
Bas Brands
c3f2290d11 MDL-62227 lib_form: add .alert-warning to unstyled alert 2018-04-26 18:06:02 +02:00
Adrian Greeve
749af21bd4 MDL-60485 modgrade: Update to mod settings form.
The message for changing the max grade in the module form
was inaccurate for modules that can not rescale.
2017-10-19 10:42:02 +08:00
Dan Poltawski
62398cd807 Merge branch 'wip-MDL-55519-master' of git://github.com/abgreeve/moodle 2016-09-26 15:23:32 +01:00
Damyon Wiese
91bda4cd45 MDL-55417 forms: Render form elements with a template
This change allows form elements to be overridden with a mustache template.
The template can even listen for form validation errors and supply the JS to
change the look of the form element when there is/isn't a validation error.

Initial support is for all core form elements including:

text, select, selectyesno and checkboxes, groups, dateselector, datetimeselector,
autocomplete, modvisible, advcheckbox, button, duration, filemanager, filepicker, editor, static, grading,
warning, textarea, password, url, submit, questioncategory, recaptcha.

Part of MDL-55071
2016-09-23 10:53:30 +01:00
Adrian Greeve
6965ffe041 MDL-55519 activities: mform element shows correct maxgrade.
In certain circumstances the max grade value would revert
back to the default max grade value.
2016-09-20 08:56:24 +08:00
Marina Glancy
721e2def56 MDL-55123 forms: do not call non-static methods statically
this breaks in PHP7.1
2016-09-12 12:06:18 +08:00
Damyon Wiese
bb0b39b839 MDL-55520 forms: Properly format the grademax for the database 2016-08-16 11:19:51 +08:00
Damyon Wiese
c3d4d3f7c1 MDL-55520 forms: Mod grade is changing values back to default
When a field is disabled in the page - no value is sent and modgrade is reverting
to the default. This change prevents the max grade from changing accidentally.
2016-08-11 14:43:05 +08:00
Marina Glancy
4ca17b63a1 MDL-54666 modedit: use default values when modgrade element is frozen 2016-05-21 12:37:46 +08:00
Rajesh Taneja
bdd4bed8b5 MDL-53300 core_grade: use currentgradetype if modgrade_type is not set
If mod has grades, then while upgrading
modgrade_type is disabled. This will not post
it with form and hence validation fails.
To avoid above problem, use ->currentgradetype
if modgrade_type is not set
2016-03-01 16:38:59 +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
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
David Mudrák
d84c64b7d6 MDL-52873 forms: Generate unique id attributes for modgrade elements
The previous method of generating the id attribute of the elements
within the modgrade group did not take the name of the modgrade field
into account. So if there were multiple fields of the modgrade type
added into a form (not a common case yet still valid), elements created
within the group were assigned same id attributes.

The patch introduces a new method for generating the id attribute of
modgrade elements. The new method takes the name of the modgrade group
into account and returns the id in the format similar to the default one
returned by HTML_QuickForm_element::_generateId().

The patch changes the generated id attribute. Apart from the
block_activity_results' behat feature files, not other places seem to
rely on the exact value.
2016-01-22 14:24:53 +01:00
Marina Glancy
32fada5cb2 MDL-52081 forms: indicate usage of grandparent constructor 2015-12-10 13:38:04 +08:00
Marina Glancy
1a0df5535e MDL-52081 forms: Use __construct() for constructors 2015-12-10 13:38:01 +08:00
Sam Hemelryk
ed7605f481 MDL-47752 grading: fixed bugs with the modgrade element 2014-10-20 10:32:13 +13:00
James McQuillan
597662335d MDL-22999 core_grades: Added ability to configure maximum grade value both globally and for each graded-activity. 2014-04-07 16:02:37 -04:00
Rajesh Taneja
6c1fd30484 MDL-30974 form: Checked and updated docblock for form library 2012-02-15 12:55:06 +08:00
Petr Skoda
5e26145d22 removing unused function with syntax error 2010-09-16 16:42:56 +00:00
Petr Skoda
4bcc51185c MDL-21217, MDL-21198 simplified/improved outputlib help icon related apis + several fixed regresions 2009-12-30 15:19:55 +00:00
David Mudrak
0ea95ddcb7 MDL-21178 formslib element modgrade does not use deprecated link_to_popup_window() for help icon 2009-12-23 16:54:39 +00:00
Petr Skoda
b5d0cafc6f MDL-20787 final switch to new $OUTPUT->pix_url() - yay! 2009-12-16 21:50:45 +00:00
Petr Skoda
4a0e2e632f MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 11:42:23 +00:00
tjhunt
e63f88c9a6 MDL-19690 - lots more $CFG->pixpath to $OUTPUT->old_icon_url
and $CFG->modpixpath to $OUTPUT->mod_icon_url
2009-07-02 12:07:58 +00:00
sam_marshall
a4bfd8e1de MDL-19428: mform - Fixed the 'includenograde' option in modgrade type 2009-06-08 12:42:24 +00:00
jamiesensei
c65795d341 checking in files for some new custom elements. And added a default help button to the format drop down box. 2006-11-14 02:57:19 +00:00