HTML and CSS Reference
In-Depth Information
/**
* Determines whether or not the current user is the presenter
*
* @return boolean TRUE if it's the presenter, otherwise FALSE
*/
protected function is_presenter( )
{
Showing the Presenter Controls
For the presenter of a room, we need to provide the room's direct link and an option to close the room (or to reopen
the room if it's already closed). To do this, add a new method to the Room controller that checks whether the user is the
presenter; then checks whether the room is active.
For inactive rooms, the reopening controls are loaded and returned for use in the main room view.
Active rooms load the standard controls and return them.
Add the following bold code to class.room.inc.php :
return $controller->output_ask_form(
$this->is_active,
$this->room->email
);
}
/**
* Shows the presenter his controls (or nothing, if not the presenter)
*
* @return mixed Markup for the controls (or NULL)
*/
protected function output_presenter_controls( )
{
if ($this->is_presenter) {
if (!$this->is_active) {
$view_class = 'presenter-reopen';
$form_action = APP_URI . 'room/open';
} else {
$view_class = 'presenter-controls';
$form_action = APP_URI . 'room/close';
}
$view = new View($view_class);
$view->room_id = $this->room->room_id;
$view->room_uri = APP_URI . 'room/' . $this->room_id;
$view->form_action = $form_action;
$view->nonce = $this->generate_nonce();
return $view->render(FALSE);
}
return NULL;
}
 
Search WWH ::




Custom Search