Changeset - 82a941eaa8ec
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 15 years ago 2011-02-04 22:14:22
ohnobinki@ohnopublishing.net
Give different basic instruction text to user based on whether or not crawler data is available for his school or not.
2 files changed with 20 insertions and 2 deletions:
0 comments (0 inline, 0 general)
inc/school.inc
Show inline comments
 
@@ -287,12 +287,24 @@ function school_default_classes($school)
 

	
 
  return array();
 
}
 

	
 
/**
 
 * \brief
 
 *   Determine if a school has crawler data stored.
 
 *
 
 * \param $school
 
 *   The which should be checked.
 
 */
 
function school_has_auto(array $school)
 
{
 
  return isset($school['crawled']) && $school['crawled'];
 
}
 

	
 
/**
 
 * \brief
 
 *   Used to load the school cache.
 
 *
 
 * \return
 
 *   The cache array or NULL if the cache couldn't be loaded.
 
 */
 
function _school_cache_load()
input.php
Show inline comments
 
@@ -100,14 +100,20 @@ if (!empty($_REQUEST['selectschool'])
 
  }
 

	
 
$inputPage->showSavedScheds($_SESSION);
 
?>
 
<p>
 
  Welcome to SlatePermutate<?php $inputPage->addressStudent(', ', '', FALSE); ?>!
 
  To get started, enter in some of your class IDs, and click the
 
  autosuggestion to add available sections for each class.
 
  <?php if (school_has_auto($inputPage->get_school())): ?>
 
  To get started, enter in some a course identifier and click the
 
  autosuggestion to automatically load available sections for each class.
 
  <?php else: ?>
 
  To get started, enter a course number and add some sections to it.
 
  Then specify each section's letter/number and what times it meets,
 
  add more courses, and click &ldquo;Find a Schedule&rdquo;.
 
  <?php endif; ?>
 
</p>
 

	
 
<form method="post" action="process.php" id="scheduleForm">
 
<p class="nospace"><label>Schedule Name</label><br />
 
  <input id="scheduleName" style="margin-bottom: 1em;" class="defText required" type="text" size="25" title="Spring 2011" name="postData[name]" <?php if ($sch) echo 'value="' . htmlentities($sch->getName(), ENT_QUOTES) . '"'; /*"*/ ?> />
 
</p>
0 comments (0 inline, 0 general)