Changeset - bc24a9e141ff
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 14 years ago 2012-02-15 13:07:20
ohnobinki@ohnopublishing.net
Add ability to distinguish, in most cases, between labs and lectures at Hope.

Hope's scheduling paradigm requires the use of course slots, so
distinguishing between labs and normal sections is vital.
1 file changed with 5 insertions and 4 deletions:
0 comments (0 inline, 0 general)
school.d/hope.crawl.inc
Show inline comments
 
@@ -301,11 +301,12 @@ function hope_crawl_semester(array $scho
 
	}
 

	
 
      /*
 
       * Guessing the type of section_meeting: `attribute' of NSL seems to
 
       * be associated with labs.
 
       * Guessing the type of section_meeting: `attribute' of NSL
 
       * seems to be associated with labs. Matches `lab', `lab.', `
 
       * lab', ` labo'..., etc.
 
       */
 
      $type = 'lecture';
 
      if ($section_csv[$fields['Attr']] == 'NSL')
 
      if (preg_match('/(^|[^a-z])lab($|o|[^a-z])/i', $title))
 
	$type = 'lab';
 

	
 
      $section_meeting = new SectionMeeting($days, $time_start, $time_end,
 
@@ -318,7 +319,7 @@ function hope_crawl_semester(array $scho
 
				     $section_id,
 
				     $synonym,
 
				     $section_meeting,
 
				     'default',
 
				     $type,
 
				     $section_csv[$fields['Cred']]);
 
    }
 
  return 0;
0 comments (0 inline, 0 general)