function admin_display_degrees_popup_add_group2

7.x admin.degrees.inc admin_display_degrees_popup_add_group2()
6.x admin.degrees.inc admin_display_degrees_popup_add_group2()
5.x admin.degrees.inc admin_display_degrees_popup_add_group2()

File

modules/admin/admin.degrees.inc, line 75

Code

function admin_display_degrees_popup_add_group2() {
  $semester_num = trim($_GET ["semester_num"]);
  $de_catalog_year = admin_get_de_catalog_year();

  fp_add_js(fp_get_module_path("admin") . "/js/admin.js");

  $rtn = "";

  $rtn .= "<b>" . t("VERSION 2 - Add an elective group to semester: @semester_num in @de_catalog_year", array("@semester_num" => $semester_num, "@de_catalog_year" => $de_catalog_year)) . "</b><br>
        <span class='tenpt'>" . t("Use keyboard shortcut CTRL-F to find groups quickly.") . "</span>
        <br><br>
        First, select a group (from $de_catalog_year):
        <div class='tenpt' 
          style='height:200px; overflow-y: scroll; border: 1px solid black;
          margin:5px;'>
        <table border='0' cellspacing='5'>";

  $res = db_query("SELECT * FROM draft_groups
              WHERE catalog_year = '?'
              AND delete_flag = '0'
              ORDER BY title ", $de_catalog_year);
  while ($cur = db_fetch_array($res)) {
    extract($cur, 3, "db");
    $rtn .= "<tr><td valign='middle'>
                <input type='radio' name='rgroups' value='$db_group_id'></td>
          <td valign='top' class='tenpt'>
          $db_title<br><i>$db_group_name</i>
          </td>
        </tr>
          
        ";
  }

  $min_grades = csv_to_array(variable_get("group_min_grades", "A,B,C,D"));


  $rtn .= "</table></div>
      " . t("Next, select properties for this group:") . "
      <a href='javascript: adminPopupAlertHelp(\"group_properties\");'>?</a>
      <div class='tenpt' style='padding-top: 5px;'>
      Hrs: <input type='text' name='hours' id='hours' size='2'>
      Min Grade: <select name='min_grade' id='min_grade'>
              <option value=''>--</option>
              ";
  foreach ($min_grades as $g) {
    $rtn .= "<option value='$g'>$g</option>";
  }

  $rtn .= "              
            </select>
      Type: <select name='type' id='type'>";
  // Get our list of requirement types from our settings.
  $types = fp_get_requirement_types();
  foreach ($types as $code => $desc) {
    $rtn .= "<option value='$code'>$code - $desc</option>";
  }
  $rtn .= "
          </select> 
        &nbsp; &nbsp;
        " . fp_render_button("Add group &raquo;", "adminPopupAddGroup2(\"$semester_num\");") . "
      </div>";


  return $rtn;
}