function Semester::assign_title

7.x Semester.php Semester::assign_title()
6.x Semester.php Semester::assign_title()
1 call to Semester::assign_title()

File

classes/Semester.php, line 51

Class

Semester
The name "Semester" might be a little misleading, as it usually refers to years and the like. But, it might also refer to Summer semesters. Basically, its a collection of courses and groups that are required of a student. For example, the…

Code

function assign_title() 
 {
  if ($this->semester_num == 0) 
   {
    $this->title = t("Freshman Year");
  }
  if ($this->semester_num == 1) 
   {
    $this->title = t("Sophomore Year");
  }
  if ($this->semester_num == 2) 
   {
    $this->title = t("Junior Year");
  }
  if ($this->semester_num == 3) 
   {
    $this->title = t("Senior Year");
  }
  if ($this->semester_num == 4) 
   {
    $this->title = t("Year 5");
  }

  // Still didn't find anything?
  if ($this->title == "") {
    $this->title = t("Year") . " " . ($this->semester_num + 1);
  }

  $this->bool_using_default_title = TRUE;

}