function admin_copy_degree_form

6.x admin_copy_degree_form()
4.x admin_copy_degree_form()
5.x admin_copy_degree_form()

This form lets the user copy a degree and all of it's tracks & concentrations.


modules/admin/, line 147


function admin_copy_degree_form() {
  $de_catalog_year = admin_get_de_catalog_year();

  fp_set_title(t("Copy Degree for") . " $de_catalog_year");

  $form = array();

  $m = 0;

  $form ["mark" . $m++] = array(
    "type" => "markup",
    "value" => t("Use this form to duplicate a degree plan in this catalog year."),

  $form ["de_catalog_year"] = array(
    "type" => "hidden",
    "value" => $de_catalog_year,

  $form ["source_major_code"] = array(
    "type" => "textfield",
    "size" => 35,
    "label" => t("Enter the SOURCE major code you wish to copy:"),
    "required" => TRUE,
    "description" => t("Ex: ART or GBUS. Do not enter any track or concentration codes here."),

  $form ["include_tracks"] = array(
    "type" => "checkboxes",
    "label" => t("Include tracks?"),
    "options" => array("yes" => "Include tracks."),
    "description" => t("Check this box if you wish to also copy any tracks 
                        this major code may have associated with it. If you do not check this box, 
                        only the base degree will be copied. If the major does not have 
                        tracks, leave this unchecked."),

  $form ["destination_major_code"] = array(
    "type" => "textfield",
    "size" => 35,
    "label" => t("Enter the DESTINATION major code you wish to create/overwrite:"),
    "required" => TRUE,
    "description" => t("Ex: CHEM or XYZ. Do not enter any track or concentration codes here."),

  $form ["allow_overwrite"] = array(
    "type" => "radios",
    "label" => t("Overwrite if major code already exists?"),
    "options" => array(
      "no" => t("No, DO NOT delete and overwrite any existing major codes & associated tracks.  Instead, return here with a warning message."),
      "yes" => t("Yes, if my destination major already exists, overwrite <b>and delete all associated tracks</b> for this year.  (Use caution with this option!)"),
    "value" => "no",

  // Our submit button.
  $form ["submit"] = array(
    "type" => "submit",
    "value" => "Submit",
    "prefix" => "<hr>",

  return $form;