Merge branch 'wip-mdl-32759-warning' of git://github.com/rajeshtaneja/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 22 Aug 2012 00:33:34 +0000 (02:33 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 22 Aug 2012 00:33:34 +0000 (02:33 +0200)
1  2 
mod/assign/lang/en/assign.php
mod/assign/mod_form.php
mod/assign/module.js
mod/assignment/assignment.js

@@@ -65,8 -65,8 +65,9 @@@ $string['batchoperationconfirmreverttod
  $string['batchoperationlock'] = 'lock submissions';
  $string['batchoperationunlock'] = 'unlock submissions';
  $string['batchoperationreverttodraft'] = 'revert submissions to draft';
+ $string['changegradewarning'] = 'This assignment has graded submissions and changing the grade will not automatically re-calculate existing submission grades. You must re-grade all existing submissions, if you wish to change the grade.';
  $string['comment'] = 'Comment';
 +$string['completionsubmit'] = 'Student must submit to this activity to complete it';
  $string['conversionexception'] = 'Could not convert assignment. Exception was: {$a}.';
  $string['configshowrecentsubmissions'] = 'Everyone can see notifications of submissions in recent activity reports.';
  $string['confirmsubmission'] = 'Are you sure you want to submit your work for grading? You will not be able to make any more changes';
Simple merge
Simple merge
@@@ -35,3 -35,15 +35,15 @@@ M.mod_assignment.init_tree = function(Y
          tree.render();
      });
  };
 -};
+ M.mod_assignment.init_grade_change = function(Y) {
+     var gradenode = Y.one('#id_grade');
+     if (gradenode) {
+         var originalvalue = gradenode.get('value');
+         gradenode.on('change', function() {
+             if (gradenode.get('value') != originalvalue) {
+                 alert(M.str.mod_assignment.changegradewarning);
+             }
+         });
+     }
++};