Changeset - 789540b0ee11
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 15 years ago 2010-11-29 23:14:37
ohnobinki@ohnopublishing.net
Make the SectionMeeting type attribute (e.g., 'lecture', 'lab') accessible to the frontend.
2 files changed with 20 insertions and 1 deletions:
0 comments (0 inline, 0 general)
class.schedule.php
Show inline comments
 
@@ -376,25 +376,26 @@ class Schedule
 
				      /* calculate how many rows this section should span */
 
				      for ($my_r = $r; $current_meeting->getEndTime() > $time[$my_r]; $my_r ++)
 
					;
 
				      $rowspan[$dayLoop] = $my_r - $r;
 

	
 
				      $single_multi = 'single';
 
				      if ($rowspan[$dayLoop] > 1)
 
					$single_multi = 'multi';
 

	
 
				      echo '            <td rowspan="' . $rowspan[$dayLoop]
 
					. '" class="' . $single_multi . ' class' . $j
 
					. '" title="prof: ' . htmlentities($section->getProf(), ENT_QUOTES)
 
					. ', room: ' . htmlentities($current_meeting->getLocation(), ENT_QUOTES) . '">'
 
					. ', room: ' . htmlentities($current_meeting->getLocation(), ENT_QUOTES)
 
					. ', type: ' . htmlentities($current_meeting->type_get(), ENT_QUOTES) . '">'
 
					. htmlentities($class->getName(), ENT_QUOTES) . '-'
 
					. htmlentities($section->getLetter(), ENT_QUOTES) . "\n"
 
					. '<span class="prof block">' . htmlentities($section->getProf(), ENT_QUOTES) . "</span>\n"
 
					. '<span class="location block">' . htmlentities($current_meeting->getLocation(), ENT_QUOTES) . "</span>\n"
 
					. '<span class="synonym block">' . htmlentities($section->getSynonym(), ENT_QUOTES) . "</span>\n"
 
					. "</td>\n";
 
				      $filled = TRUE;
 
				    }
 
			}
 
		    }
 

	
 
		  if ($rowspan[$dayLoop] > 0)
inc/class.section_meeting.inc
Show inline comments
 
@@ -135,24 +135,42 @@ class SectionMeeting
 
  public function getStartTime()
 
  {
 
    return $this->time_start;
 
  }
 

	
 
  public function getEndTime()
 
  {
 
    return $this->time_end;
 
  }
 

	
 
  /**
 
   * \brief
 
   *   Get the type of section meeting this is.
 
   *
 
   * Examples of Section meeting types include 'lecture' and
 
   * 'lab'. Currently, any string may be used as a Section meeting
 
   * type; the possibilities for this field are controlled by the
 
   * crawl scripts authors' choices about what they pass to
 
   * SectionMeeting().
 
   *
 
   * \return
 
   *   A string indicating the type of section meeting.
 
   */
 
  public function type_get()
 
  {
 
    return $this->type;
 
  }
 

	
 
  /**
 
   * \brief
 
   *   Check if this section conflicts with the given section.
 
   *
 
   * \param $that
 
   *   The other section for which I should check for conflicts.
 
   * \return
 
   *   TRUE if there is a conflict, FALSE otherwise.
 
   */
 
  public function conflictsWith(SectionMeeting $that)
 
  {
 
    /*
 
     * The two sections meetings can't conflict if the start/end times
 
     * don't overlap. Also, use >= or <= here so that one can say ``I
0 comments (0 inline, 0 general)