$att->remove_status($status);
         redirect($att->url_preferences(), get_string('statusdeleted', 'attendance'));
     }
     $message = get_string('deletecheckfull', '', get_string('variable', 'attendance'));
     $message .= str_repeat(html_writer::empty_tag('br'), 2);
     $message .= $status->acronym . ': ' . ($status->description ? $status->description : get_string('nodescription', 'attendance'));
     $params = array_merge($att->pageparams->get_significant_params(), array('confirm' => 1));
     echo $OUTPUT->header();
     echo $OUTPUT->heading(get_string('attendanceforthecourse', 'attendance') . ' :: ' . format_string($course->fullname));
     echo $OUTPUT->confirm($message, $att->url_preferences($params), $att->url_preferences());
     echo $OUTPUT->footer();
     exit;
 case att_preferences_page_params::ACTION_HIDE:
     $statuses = $att->get_statuses(false);
     $status = $statuses[$att->pageparams->statusid];
     $att->update_status($status, null, null, null, 0);
     break;
 case att_preferences_page_params::ACTION_SHOW:
     $statuses = $att->get_statuses(false);
     $status = $statuses[$att->pageparams->statusid];
     $att->update_status($status, null, null, null, 1);
     break;
 case att_preferences_page_params::ACTION_SAVE:
     $acronym = required_param_array('acronym', PARAM_TEXT);
     $description = required_param_array('description', PARAM_TEXT);
     $grade = required_param_array('grade', PARAM_RAW);
     foreach ($grade as &$val) {
         $val = unformat_float($val);
     }
     $statuses = $att->get_statuses(false);
     foreach ($acronym as $id => $v) {
         $att->remove_status($att->pageparams->statusid);
         redirect($att->url_preferences(), get_string('statusdeleted', 'attendance'));
     }
     $statuses = $att->get_statuses();
     $status = $statuses[$att->pageparams->statusid];
     $message = get_string('deletecheckfull', '', get_string('variable', 'attendance'));
     $message .= str_repeat(html_writer::empty_tag('br'), 2);
     $message .= $status->acronym . ': ' . ($status->description ? $status->description : get_string('nodescription', 'attendance'));
     $params = array_merge($att->pageparams->get_significant_params(), array('confirm' => 1));
     echo $OUTPUT->header();
     echo $OUTPUT->heading(get_string('attendanceforthecourse', 'attendance') . ' :: ' . $course->fullname);
     echo $OUTPUT->confirm($message, $att->url_preferences($params), $att->url_preferences());
     echo $OUTPUT->footer();
     exit;
 case att_preferences_page_params::ACTION_HIDE:
     $att->update_status($att->pageparams->statusid, null, null, null, 0);
     break;
 case att_preferences_page_params::ACTION_SHOW:
     $att->update_status($att->pageparams->statusid, null, null, null, 1);
     break;
 case att_preferences_page_params::ACTION_SAVE:
     $acronym = required_param_array('acronym', PARAM_MULTILANG);
     $description = required_param_array('description', PARAM_MULTILANG);
     $grade = required_param_array('grade', PARAM_INT);
     foreach ($acronym as $id => $v) {
         $att->update_status($id, $acronym[$id], $description[$id], $grade[$id], null);
     }
     if ($att->grade > 0) {
         att_update_all_users_grades($att->id, $att->course, $att->context, $cm);
     }
     break;