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
 
@@ -281,24 +281,36 @@ function school_default_classes($school)
 
  $school_default_classes = $school['id'] . '_default_classes';
 
  if (function_exists($school_default_classes))
 
    {
 
      require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'class.course.inc');
 
      return $school_default_classes();
 
    }
 

	
 
  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()
 
{
 
  static $cache = NULL;
 

	
 
  if ($cache != NULL)
 
    return $cache;
 

	
input.php
Show inline comments
 
@@ -94,26 +94,32 @@ if (!empty($_REQUEST['selectschool'])
 
  settings</a>.
 
</p>
 
<?php
 
    $inputPage->showSchools($next_page);
 
    $inputPage->foot();
 
    exit;
 
  }
 

	
 
$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>
 

	
 
<table id="container">
 
  <tr>
 
    <td>
 
      <table id="jsrows">
 
        <!-- Header -->
0 comments (0 inline, 0 general)