_Substitution.php

  1. 4.x classes/_Substitution.php
  2. 5.x classes/_Substitution.php

File

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

Classes

Namesort descending Description
_Substitution