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( )
{
Adding the Inactive Room Presenter Controls View
The view for the inactive room is a simple form with an input reading “Open This Room”.
Create a file called presenter-reopen.inc.php in system/views/ with the following markup:
<form id="close-this-room" method="post"
action=" <?php echo $form_action; ?> ">
<input type="submit" value="Open This Room" />
<input type="hidden" name="room_id"
value=" <?php echo $room_id; ?> " />
<input type="hidden" name="nonce"
value=" <?php echo $nonce; ?> " />
</form><!--/#close-this-room-->
Adding the Active Room Presenter Controls View
For active rooms, a disabled input with the room's URI is displayed, as well as a button reading “Close This Room”.
Add the following markup to a new file called presenter-controls.inc.php in system/views/ :
<form id="close-this-room" method="post"
action=" <?php echo $form_action; ?> ">
<label>
Link to your room.
<input type="text" name="room-uri"
value=" <?php echo $room_uri; ?> "
disabled />
</label>
<input type="submit" value="Close This Room" />
<input type="hidden" name="room_id"
value=" <?php echo $room_id; ?> " />
<input type="hidden" name="nonce"
value=" <?php echo $nonce; ?> " />
</form><!--/#close-this-room-->
Showing the Questions
In order to show the questions for the room, the output_questions() method will leverage the Question controller to
loop through the existing questions and return markup.
Before generating the markup, it sets the $is_presenter property so the proper markup is returned for the user type.
 
Search WWH ::




Custom Search