Beispiel #1
0
    redirect($redirectto);
}

// Check if we are deleting
if ($delete && $confirm) {
    if (!confirm_sesskey()) {
        print_error('confirmsesskeybad', 'error');
    }

    $notification = new facetoface_notification(array('id' => $delete), true);
    if (!$notification->id) {
        print_error('error:notificationdoesnotexist', 'facetoface');
    }

    $notification->delete();

    set_notification(get_string('notificationdeleted', 'facetoface'), $redirectto, array('class' => 'notifysuccess'));
}

// Check for form submission
if (($data = data_submitted()) && !empty($data->bulk_update)) {
    // Check sesskey
    if (!confirm_sesskey()) {
        print_error('confirmsesskeybad', 'error');
    }

    if (in_array($data->bulk_update, array('set_active', 'set_inactive'))) {
        // Perform bulk action
        // Get all notifications
        $notifications = $DB->get_records_sql(