Browse files

Revert "MDL-47684 mod: better validation of rating options"

This reverts commit c58758d.
  • Loading branch information...
danpoltawski committed Oct 17, 2014
1 parent c91ddd5 commit 5728a1f51c93d8d958e55fcc5257f9cbad9f6787
Showing with 0 additions and 9 deletions.
  1. +0 −8 course/moodleform_mod.php
  2. +0 −1 lang/en/rating.php
@@ -295,14 +295,6 @@ function validation($data, $files) {
// Ratings: Don't let them select an aggregate type without selecting a scale.
// If the user has selected to use ratings but has not chosen a scale or set max points then the form is
// invalid. If ratings have been selected then the user must select either a scale or max points.
// This matches (horrible) logic in data_preprocessing.
if (isset($data['assessed']) && $data['assessed'] > 0 && empty($data['scale'])) {
$errors['assessed'] = get_string('scaleselectionrequired', 'rating');
// Completion: Don't let them choose automatic completion without turning
// on some conditions. Ignore this check when completion settings are
// locked, as the options are then disabled.
@@ -55,4 +55,3 @@
$string['ratings'] = 'Ratings';
$string['rolewarning'] = 'Roles with permission to rate';
$string['rolewarning_help'] = 'To submit ratings users require the moodle/rating:rate capability and any module specific capabilities. Users assigned the following roles should be able to rate items. The list of roles may be amended via the permissions link in the administration block.';
$string['scaleselectionrequired'] = 'When selecting a ratings aggregate type you must also select to use either a scale or set a maximum points.';

0 comments on commit 5728a1f

Please sign in to comment.