function admin_copy_degree_form

7.x admin.degrees.inc admin_copy_degree_form()
6.x admin.degrees.inc admin_copy_degree_form()
4.x admin.degrees.inc admin_copy_degree_form()
5.x admin.degrees.inc admin_copy_degree_form()

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

File

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

Code

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();

  $form ["mark" . $m++] = array(
    "type" => "markup",
    "value" => t("Use this form to duplicate a degree plan in this catalog year.
                  <b>IMPORTANT:</b> If you specify a destination major code which
                  already exists, <b>all of its tracks and concentrations</b> will be
                  deleted for @year!", array("@year" => $de_catalog_year)),
  );


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


  $form ["source_major_code"] = array(
    "type" => "textfield",
    "size" => 15,
    "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 and concentrations?"),
    "options" => array("yes" => "Include tracks and concentrations."),
    "description" => t("Check this box if you wish to also copy any tracks and concentrations 
                        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 and concentrations, leave this unchecked."),
  );

  $form ["destination_major_code"] = array(
    "type" => "textfield",
    "size" => 15,
    "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.  If the destination
                        major already exists, it and <b>all of its tracks and concentrations</b> will be
                        deleted for this catalog year!"),
  );



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



  return $form;
}