function Substitution::to_string

7.x Substitution.php Substitution::to_string()
6.x Substitution.php Substitution::to_string()

File

classes/Substitution.php, line 33

Class

Substitution

Code

function to_string() 
 {
  $rtn = "";
  if ($this->bool_group_addition) 
   {
    $ga = "group addition ";
  }
  $rtn .= "Substitution: $ga " . $this->course_requirement->to_string() . " fulfilled by ";
  $rtn .= $this->course_list_substitutions->to_string() . "\n";
  $tcrgroup = new Group($this->course_requirement->assigned_to_group_id);
  $rtn .= "CR group: " . $tcrgroup->title . " CR semester num: " . $this->course_requirement->assigned_to_semester_num . "\n";
  $tsubgroup = new Group($this->course_list_substitutions->get_first()->assigned_to_group_id);
  $rtn .= "Sub group: " . $tsubgroup->title . " Sub semester num: " . $this->course_list_substitutions->get_first()->assigned_to_semester_num . "\n";


  return $rtn;
}