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 2072
Class
Code
function display_screen()
{
// This will generate the html to display the screen.
$pC = "";
if (!$this->db) {
$this->db = get_global_database_handler();
}
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();
$t = 0;
foreach ($this->box_array as $index => $box_array_contents) {
$align = "right";
if ($this->is_on_left)
{
$pC .= "<tr>";
$align = "left";
}
$css_index = fp_get_machine_readable($index);
$pC .= "<td valign='top' align='$align' class='fp-boxes fp-boxes-$css_index'>";
$pC .= $box_array_contents;
$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>";
}
$render = array();
$render ['html'] = fp_render_button(t("Submit"), "submitSaveActive();");
invoke_hook("content_alter", array(&$render, 'advise_submit_button'));
$pC .= "<td align='center'>
<div class='tenpt advise_submit_button_wrapper' style='margin-top:35px; margin-bottom:10px; padding: 10px;'>
" . $render ['html'] . "
</div>
</td></tr>
";
//$this->add_to_screen("<input type='button' value='Submit' onClick='submitSaveActive();'>");
}
}
return $pC;
}