function admin_display_groups_popup_show_group_use

7.x admin.groups.inc admin_display_groups_popup_show_group_use()
6.x admin.groups.inc admin_display_groups_popup_show_group_use()
4.x admin.groups.inc admin_display_groups_popup_show_group_use()
5.x admin.groups.inc admin_display_groups_popup_show_group_use()

Displays a popup showing where a particular group is being used in FlightPath.

File

modules/admin/admin.groups.inc, line 1715

Code

function admin_display_groups_popup_show_group_use() {
  $rtn = "";

  $group_id = $_REQUEST ["group_id"];
  $group = new Group();
  $group->group_id = $group_id;
  $group->bool_use_draft = true;
  $group->load_descriptive_data();


  $rtn .= "<b>" . t("Degrees using @group_title (%group_name):", array("@group_title" => $group->title, "%group_name" => $group->group_name)) . "</b>
    <br><br>
    <table border='0' cellspacing='5'>
    <tr>
      <th>" . t("Degree") . "</th>
      <th>" . t("Code") . "</th>
      <th>" . t("Semester") . "</th>
      <th>" . t("Year") . "</th>
    </tr>
    ";

  $res = db_query("SELECT * FROM draft_degrees a,
                    draft_degree_requirements b
                  WHERE a.degree_id = b.degree_id
                  AND b.group_id = '?'
                  ORDER BY a.title, a.major_code, b.semester_num ", $group_id);
  while ($cur = db_fetch_array($res)) 
   {
    extract($cur, 3, "db");
    $rtn .= "<tr>
          <td valign='top' class='tenpt' width='200'>
            $db_title
          </td>
          <td valign='top' class='tenpt' width='100'>
            $db_major_code
          </td>
          <td valign='top' class='tenpt' align='center'>
            " . admin_get_semester_name($db_semester_num) . "
          </td>
          <td valign='top' class='tenpt' width='100'>
            $db_catalog_year
          </td>
          
        </tr>
        ";

  }


  $rtn .= "</table>";



  return $rtn;
}