Changeset - da99c618fb18
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 15 years ago 2011-03-22 16:41:12
ohnobinki@ohnopublishing.net
Genericize the registration codes dialogue's link.
2 files changed with 14 insertions and 2 deletions:
0 comments (0 inline, 0 general)
school.d/cedarville.inc
Show inline comments
 
@@ -23,12 +23,13 @@ function cedarville_info()
 
  return array('name' => 'Cedarville University',
 
	       'url' => 'http://cedarville.edu/',
 
	       'domains' => array(
 
				  'cedarville.edu',
 
				  ),
 
	       'example_course_id' => 'MATH-2510',
 
	       'registration_url' => 'http://cedarville.edu/cgi-bin/secure/register_student.pl',
 
	       'student_address' => 'Cedarville Student',
 
	       );
 
}
 

	
 
function cedarville_instructions_html()
 
{
school.d/default.inc
Show inline comments
 
@@ -60,16 +60,27 @@ EOF;
 
 *  A generic fallback for school_registration_html().
 
 *
 
 * \see school_registration_html()
 
 */
 
function default_registration_html(Page $page, array $school, array $courses)
 
{
 
  if (!empty($school['registration_url']))
 
    {
 
      $link_url = $school['registration_url'];
 
      $link_text = $school['name'] . '\'s registration system';
 
    }
 
  else
 
    {
 
      $link_url = $school['url'];
 
      $link_text = $school['name'] . '\'s website';
 
    }
 

	
 
  $html = ''
 
    . '  <p>' . PHP_EOL
 
    . '    Enter these codes into your school\'s online course registration' . PHP_EOL
 
    . '    system (<a href="' . htmlentities($school['url']) . '">' . htmlentities($school['name']) . '\'s website</a>)' . PHP_EOL
 
    . '    Enter these codes into ' . htmlentities($school['name']) . '\'s online course registration' . PHP_EOL
 
    . '    system (<a href="' . htmlentities($link_url) . '">' . htmlentities($link_text) . '</a>)' . PHP_EOL
 
    . '    to register for classes:' . PHP_EOL
 
    . '  </p>' . PHP_EOL
 
    . '  <ul class="synonym-list">' . PHP_EOL;
 
  foreach ($courses as $course)
 
    foreach ($course as $section)
 
      $html .= '    <li>' . htmlentities($section->getSynonym()) . '</li>' . PHP_EOL;
0 comments (0 inline, 0 general)