Skip to content

Commit

Permalink
Merge branch 'MDL-53392_master' of https://github.com/snake/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Jun 6, 2016
2 parents 53ee327 + 7eafbbf commit e750544
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions mod/assign/mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,32 +209,6 @@ public function definition() {
$this->apply_admin_defaults();

$this->add_action_buttons();

// Add warning popup/noscript tag, if grades are changed by user.
$hasgrade = false;
if (!empty($this->_instance)) {
$hasgrade = $DB->record_exists_select('assign_grades',
'assignment = ? AND grade <> -1',
array($this->_instance));
}

if ($mform->elementExists('grade') && $hasgrade) {
$module = array(
'name' => 'mod_assign',
'fullpath' => '/mod/assign/module.js',
'requires' => array('node', 'event'),
'strings' => array(array('changegradewarning', 'mod_assign'))
);
$PAGE->requires->js_init_call('M.mod_assign.init_grade_change', null, false, $module);

// Add noscript tag in case.
$noscriptwarning = $mform->createElement('static',
'warning',
null,
html_writer::tag('noscript',
get_string('changegradewarning', 'mod_assign')));
$mform->insertElementBefore($noscriptwarning, 'grade');
}
}

/**
Expand Down

0 comments on commit e750544

Please sign in to comment.