Browse Source

CONTRIB-4052 Prevent gradebook entry from being added when using nograde

MOODLE_26_STABLE
Dan Marsden 11 years ago
parent
commit
499636fcc0
  1. 4
      preferences.php
  2. 8
      sessions.php

4
preferences.php

@ -93,7 +93,9 @@ switch ($att->pageparams->action) {
foreach ($acronym as $id => $v) {
$att->update_status($id, $acronym[$id], $description[$id], $grade[$id], null);
}
att_update_all_users_grades($att->id, $att->course, $att->context, $cm);
if ($att->grade > 0) {
att_update_all_users_grades($att->id, $att->course, $att->context, $cm);
}
break;
}

8
sessions.php

@ -85,7 +85,9 @@ switch ($att->pageparams->action) {
if (isset($confirm) && confirm_sesskey()) {
$att->delete_sessions(array($sessionid));
att_update_all_users_grades($att->id, $att->course, $att->context, $cm);
if ($att->grade > 0) {
att_update_all_users_grades($att->id, $att->course, $att->context, $cm);
}
redirect($att->url_manage(), get_string('sessiondeleted', 'attendance'));
}
@ -112,7 +114,9 @@ switch ($att->pageparams->action) {
$sessionsids = explode('_', $sessionsids);
$att->delete_sessions($sessionsids);
att_update_all_users_grades($att->id, $att->course, $att->context, $cm);
if ($att->grade > 0) {
att_update_all_users_grades($att->id, $att->course, $att->context, $cm);
}
redirect($att->url_manage(), get_string('sessiondeleted', 'attendance'));
}
$sessid = required_param('sessid', PARAM_SEQUENCE);

Loading…
Cancel
Save