Substitution.php

  1. 6.x classes/Substitution.php
  2. 4.x custom/classes/Substitution.php
  3. 5.x custom/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. public $school_id = 0;
  18. function __construct()
  19. {
  20. $this->course_requirement = new Course();
  21. $this->course_list_substitutions = new CourseList();
  22. $this->bool_group_addition = false;
  23. $this->bool_outdated = false;
  24. }
  25. function to_string()
  26. {
  27. $rtn = "";
  28. if ($this->bool_group_addition)
  29. {
  30. $ga = "group addition ";
  31. }
  32. $rtn .= "Substitution: $ga " . $this->course_requirement->to_string() . " fulfilled by ";
  33. $rtn .= $this->course_list_substitutions->to_string() . "\n";
  34. $tcrgroup = new Group($this->course_requirement->assigned_to_group_id);
  35. $rtn .= "CR group: " . $tcrgroup->title . " CR semester num: " . $this->course_requirement->assigned_to_semester_num . "\n";
  36. $tsubgroup = new Group($this->course_list_substitutions->get_first()->assigned_to_group_id);
  37. $rtn .= "Sub group: " . $tsubgroup->title . " Sub semester num: " . $this->course_list_substitutions->get_first()->assigned_to_semester_num . "\n";
  38. return $rtn;
  39. }
  40. } // end class Substitution

Classes

Namesort descending Description
Substitution