function _AdvisingScreen::display_screen
Search API
4.x _AdvisingScreen.php | _AdvisingScreen::display_screen() |
5.x _AdvisingScreen.php | _AdvisingScreen::display_screen() |
This function generates the HTML to display the screen. Should be used in conjunction with output_to_browser()
Return value
string
File
- classes/
_AdvisingScreen.php, line 1535
Class
Code
function display_screen()
{
// This will generate the html to display the screen.
$pC = "";
if ($this->bool_hiding_grades && !$this->bool_print && $GLOBALS ["fp_system_settings"]["hiding_grades_message"] != "")
{
// Display the message about us hiding grades.
$pC .= "
<tr><td colspan='2'>
<div class='tenpt hypo' style='margin-top: 4px; margin-bottom: 4px;
padding: 2px; border: 1px solid maroon;'>
<table border='0' cellspacing='0' cellpadding='0'>
<td valign='top'>
<img src='" . fp_theme_location() . "/images/alert_lg.gif' >
</td>
<td valign='middle' class='tenpt' style='padding-left: 8px;'>
{$GLOBALS ["fp_system_settings"]["hiding_grades_message"]}
</td>
</table>
</div>
</td></tr>
";
}
//$pC .= $this->draw_currently_advising_box();
$pC .= $this->draw_progress_boxes();
$pC .= $this->draw_public_note();
for ($t = 0; $t < count($this->box_array); $t++)
{
$align = "right";
if ($this->is_on_left)
{
$pC .= "<tr>";
$align = "left";
}
$pC .= "<td valign='top' align='$align' class='fp-boxes'>";
$pC .= $this->box_array [$t];
$pC .= "</td>";
if (fp_screen_is_mobile()) {
// If we are on a mobile device, force it to use
// only one column.
$this->is_on_left = false;
}
if (!$this->is_on_left) // on right of page
{
$pC .= "</tr>";
}
$this->is_on_left = !$this->is_on_left;
}
if (!$this->is_on_left) // on right of the page.
{ // close up any loose ends.
$pC .= "</tr>";
}
if (user_has_permission("can_advise_students"))
{
if (!$this->bool_print && !$this->bool_blank)
{
$pC .= "<tr>";
if (!fp_screen_is_mobile()) {
$pC .= "<td> </td>";
}
$pC .= "<td align='center'>
<div class='tenpt' style='margin-top:35px; margin-bottom:10px; padding: 10px; width: 200px;'>
" . fp_render_button(t("Submit"), "submitSaveActive();") . "
</div>
</td></tr>
";
//$this->add_to_screen("<input type='button' value='Submit' onClick='submitSaveActive();'>");
}
}
return $pC;
}