function _AdvisingScreen::draw_group_select_row

4.x _AdvisingScreen.php _AdvisingScreen::draw_group_select_row(Group $group, $remaining_hours)
5.x _AdvisingScreen.php _AdvisingScreen::draw_group_select_row(Group $group, $remaining_hours)

This draws the "blank row" for a group on the degree plan, which instructs the user to click on it to select a course from the popup.

Parameters

Group $group:

int $remaining_hours:

Return value

string

1 call to _AdvisingScreen::draw_group_select_row()
_AdvisingScreen::display_group in classes/_AdvisingScreen.php
This function displays a Group object on the degree plan. This is not the selection popup display. It will either show the group as multi rows, filled in with courses, or as a "blank row" for the user to click on.

File

classes/_AdvisingScreen.php, line 2634

Class

_AdvisingScreen

Code

function draw_group_select_row(Group $group, $remaining_hours) 
 {
  $pC = "";
  $img_path = fp_theme_location() . "/images";
  $on_mouse_over = " onmouseover=\"style.backgroundColor='#FFFF99'\"
      				onmouseout=\"style.backgroundColor='white'\" ";

  if ($this->page_is_mobile) {
    $on_mouse_over = ""; // Causes problems for some mobile devices.
  }

  $w1_1 = $this->width_array [0];
  $w1_2 = $this->width_array [1];
  $w1_3 = $this->width_array [2];
  $w2 = $this->width_array [3];
  $w3 = $this->width_array [4];
  $w4 = $this->width_array [5];
  $w5 = $this->width_array [6];
  $w6 = $this->width_array [7];

  $s = "s";
  if ($remaining_hours < 2) 
   {
    $s = "";
  }
  $select_icon = "<img src='$img_path/select.gif' border='0'>";
  $icon_link = "<img src='$img_path/icons/$group->icon_filename' width='19' height='19' border='0' alt='$title_text' title='$title_text'>";

  $blank_degree_id = "";
  if ($this->bool_blank) 
   {
    $blank_degree_id = $this->degree_plan->degree_id;
  }

  $js_code = "selectCourseFromGroup(\"$group->group_id\", \"$group->assigned_to_semester_num\", \"$remaining_hours\", \"$blank_degree_id\");";

  $row_msg = "<i>Click <font color='red'>&gt;&gt;</font> to select $remaining_hours hour$s.</i>";
  $hand_class = "hand";

  if ($this->bool_print) 
   {
    // In print view, disable all popups and mouseovers.
    $on_mouse_over = "";
    $js_code = "";
    $hand_class = "";
    $row_msg = "<i>Select $remaining_hours hour$s from $group->title.</i>";
  }


  if ($group->group_id == -88) 
   { // This is the Add a Course group.
    $row_msg = "<i>Click to add an additional course.</i>";
    $select_icon = "<span style='font-size: 16pt; color:blue;'>+</span>";
    $icon_link = "";
  }


  $pC .= "
   		<table border='0' cellpadding='0' width='100%' cellspacing='0' align='left'>
     	<tr height='20' class='$hand_class'
      		$on_mouse_over title='$group->title'>
      		<td width='$w1_1' align='left'>&nbsp;</td>
      		<td width='$w1_2' align='left' onClick='$js_code'>$icon_link</td>
      		<td width='$w1_3' align='left' onClick='$js_code'>$select_icon</td>
      		<td align='left' colspan='5' class='tenpt underline' onClick='$js_code'>
      		$row_msg
       				
     	</tr>
     	</table>";





  return $pC;
}