Changeset - 7ce1a5a69798
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 14 years ago 2011-04-18 23:54:52
ohnobinki@ohnopublishing.net
Sync the `Registration Codes' dialogue with a saved_schedule's specified school/semester. Previously it relied on the session variable for this information.
2 files changed with 15 insertions and 8 deletions:
0 comments (0 inline, 0 general)
ajax.php
Show inline comments
 
@@ -67,14 +67,15 @@ function slate_permutate_json_success(ar
 

	
 
if (isset($_REQUEST['school_registration_html']))
 
  {
 
    if (!empty($_REQUEST['school']))
 
      $school = school_load($_REQUEST['school']);
 
    /*
 
     * Since we're just an AJAX callback, ask school_load_guess() not
 
     * to update $_SESSION with the school the user is using... And
 
     * make sure that the frontend actually tells us what school the
 
     * user is using ;-).
 
     */
 
    $school = school_load_guess(FALSE);
 
    if (empty($school))
 
      {
 
	$school = school_load_guess();
 
	if (empty($school))
 
	  slate_permutate_json_error('Unable to load any school.');
 
      }
 
      slate_permutate_json_error('Unable to load any school.');
 

	
 
    $page = page::page_create('');
 

	
scripts/displayTables.js
Show inline comments
 
@@ -49,7 +49,8 @@ function show_box_change()
 
 *   The jQuery object which should be populated with an error message
 
 *   or the result of loading.
 
 * \param data
 
 *   The data to send as a request.
 
 *   The data to send as a request. The school and semester keys shall
 
 *   automatically be set.
 
 * \param handler
 
 *   A function with the signature handler(target, data) which is called upon
 
 *   a successful response. There is a default handler which uses
 
@@ -70,6 +71,11 @@ function slate_permutate_load(target, da
 
		target.html(data.html);
 
	    }
 

	
 
    if (!data.school)
 
	data.school = slate_permutate_school;
 
    if (!data.semester)
 
	data.semester = slate_permutate_semester;
 

	
 
    if (jQuery.type(error_handler) == 'undefined')
 
	error_handler = function(target, status_text, data)
 
	    {
0 comments (0 inline, 0 general)