Changeset - d15fde374416
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 13 years ago 2012-04-24 20:50:19
ohnobinki@ohnopublishing.net
Set calvin's registration URI to its actual registration page.
2 files changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
school.d/calvin.inc
Show inline comments
 
@@ -9,48 +9,49 @@
 
 * the Free Software Foundation, either version 3 of the License, or
 
 * (at your option) any later version.
 
 *
 
 * slate_permutate is distributed in the hope that it will be useful,
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
 * GNU Affero General Public License for more details.
 
 *
 
 * You should have received a copy of the GNU Affero General Public License
 
 * along with slate_permutate.  If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
function calvin_info()
 
{
 
  return array('name' => 'Calvin College',
 
	       'url' => 'http://calvin.edu/',
 
	       /*
 
		* rDNS postfixes which indicate a student is
 
		* connecting from that college campus
 
		*/
 
	       'domains' => array(
 
				  'calvin.edu',
 
				  ),
 
	       'example_course_id' => 'CS-232',
 
	       'registration_url' => 'https://portal.calvin.edu/Pages/WebAdvisor.aspx?title=Express+Registration&PID=ST-WERG',
 
	       'student_address' => 'Knight',
 
	       );
 
}
 

	
 
function calvin_instructions_html()
 
{
 
  return <<<EOF
 
<h2>Instructions</h2>
 
<!--<p>
 
  SlatePermutate can be a useful tool for scheduling your next semester at <a href="http://calvin.edu/">Calvin College</a>.
 
</p>-->
 
<h3>
 
	Using the Auto-Complete function
 
</h3>
 
<p>
 
	Note: For best results, use <strong>Firefox</strong>, <strong>Google Chrome</strong>, or <strong>Safari</strong>.
 
</p>
 
<ol>
 
  <li>Determine the classes you wish to take next semester.</li>
 
	<li>Enter in the class numbers (e.g. MATH 101, CS 104) in the Class ID box.</li>
 
	<li>Select a valid class number from the drop down menu.</li>
 
	<li>Click anywhere outside of the box to automatically fill in the available section data for that class.</li>
 
	<li>Repeat this process for each class.</li>
 
	<li>Click &ldquo;Find a Schedule&rdquo; to view all possible schedules for next semester.</li>
school.d/default.inc
Show inline comments
 
@@ -56,35 +56,35 @@ EOF;
 
}
 

	
 
/**
 
 * \brief
 
 *  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 ' . htmlentities($school['name']) . '\'s online course registration' . PHP_EOL
 
    . '    system (<a href="' . htmlentities($link_url) . '" target="_blank">' . htmlentities($link_text) . '</a>)' . PHP_EOL
 
    . '    system (<a href="' . htmlentities($link_url, ENT_QUOTES) . '" target="_blank">' . 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 $course_slot)
 
      foreach ($course_slot as $section)
 
        $html .= '    <li>' . htmlentities($section->getSynonym()) . '</li>' . PHP_EOL;
 
  $html .= '  </ul>' . PHP_EOL;
 
  return $html;
 
}
0 comments (0 inline, 0 general)