Example #1
0
                    // Notify the user of the cancellation if the session hasn't started yet
                    $timenow = time();
                    if (!$suppressemail and !webinar_has_session_started($session, $timenow)) {
                        webinar_send_cancellation_notice($webinar, $session, $removeuser);
                    }
                } else {
                    $errors[] = $cancelerr;
                    $erruser = $DB->get_record('user', array('id' => $removeuser), 'id, firstname, lastname');
                    $errors[] = get_string('error:removeattendee', 'webinar', fullname($erruser));
                }
            }
            // Update attendees
            webinar_update_attendees($session);
            $user = $DB->get_record('user', array('id' => $removeuser));
            //Unregister this user from this webinar through Adobe Connect API call
            cancelsignup_meeting($webinar, $session, $user);
            //Send cancel registration email to user
            send_email_cancelsignup($webinar, $session, $cm, $user);
        } elseif ($showall) {
            $searchtext = '';
            $previoussearch = 0;
        }
    }
}
/// Main page
$pagetitle = format_string($webinar->name);
$navlinks[] = array('name' => $strwebinars, 'link' => "index.php?id={$course->id}", 'type' => 'title');
$navlinks[] = array('name' => $pagetitle, 'link' => "view.php?f={$webinar->id}", 'type' => 'activityinstance');
$navlinks[] = array('name' => get_string('attendees', 'webinar'), 'link' => "attendees.php?s={$session->id}", 'type' => 'activityinstance');
$navlinks[] = array('name' => get_string('addremoveattendees', 'webinar'), 'link' => '', 'type' => 'title');
$navigation = build_navigation($navlinks);
Example #2
0
}
$mform = new mod_webinar_cancelsignup_form(null, compact('s', 'backtoallsessions'));
if ($mform->is_cancelled()) {
    redirect($returnurl);
}
if ($fromform = $mform->get_data()) {
    // Form submitted
    if (empty($fromform->submitbutton)) {
        print_error('error:unknownbuttonclicked', 'webinar', $returnurl);
    }
    $timemessage = 4;
    $errorstr = '';
    if (webinar_user_cancel($session, false, false, $errorstr, $fromform->cancelreason)) {
        add_to_log($course->id, 'webinar', 'cancel booking', "cancelsignup.php?s={$session->id}", $webinar->id, $cm->id);
        //Unregister this user from this webinar through Adobe Connect API call
        cancelsignup_meeting($webinar, $session, $USER);
        //Send cancel registration email to user
        send_email_cancelsignup($webinar, $session, $cm, $USER);
        /* JoeB - dev change for Moodle 2.3, comment this out
        		$PAGE->set_pagetype('webinar');
        		$PAGE->set_title($webinar->name);
        		$PAGE->set_heading($webinar->name);
        		echo $OUTPUT->header();
        		
        		$heading = get_string('confirmcancelbooking', 'webinar');
        		echo $OUTPUT->heading($heading);
        		*/
        $message = get_string('bookingcancelled', 'webinar', $webinar->name);
        $message = '<div style="height: 10px;">&nbsp;</div>' . $message;
        redirect($returnurl, $message, $timemessage);
    } else {