_Substitution.php

Classes

NameDescription
_Substitution

File

classes/_Substitution.php
View source
  1. <?php
  2. class _Substitution
  3. {
  4. public $course_requirement; // The original degree requirement.
  5. public $course_list_substitutions; // The course(s) which are
  6. //filling in for that requirement.
  7. public $bool_has_been_applied;
  8. public $bool_group_addition;
  9. public $faculty_id; // The faculty member that made the substitution.
  10. public $bool_outdated; // set to true if this is an outdated sub (for an old major or the like)
  11. public $remarks; // like a comment for the substitution.
  12. public $outdated_note; // will contain information about WHY this was outdated.
  13. function __construct()
  14. {
  15. $this->course_requirement = new Course();
  16. $this->course_list_substitutions = new CourseList();
  17. $this->bool_group_addition = false;
  18. $this->bool_outdated = false;
  19. }
  20. function to_string()
  21. {
  22. $rtn = "";
  23. if ($this->bool_group_addition)
  24. {
  25. $ga = "group addition ";
  26. }
  27. $rtn .= "Substitution: $ga " . $this->course_requirement->to_string() . " fulfilled by ";
  28. $rtn .= $this->course_list_substitutions->to_string() . "\n";
  29. $tcrgroup = new Group($this->course_requirement->assigned_to_group_id);
  30. $rtn .= "CR group: " . $tcrgroup->title . " CR semester num: " . $this->course_requirement->assigned_to_semester_num . "\n";
  31. $tsubgroup = new Group($this->course_list_substitutions->get_first()->assigned_to_group_id);
  32. $rtn .= "Sub group: " . $tsubgroup->title . " Sub semester num: " . $this->course_list_substitutions->get_first()->assigned_to_semester_num . "\n";
  33. return $rtn;
  34. }
  35. } // end class Substitution