Changeset - 0b6f69a3ae0e
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 15 years ago 2010-10-16 13:00:32
ohnobinki@ohnopublishing.net
For autocompleting course departments, omit the trailing '-' so that the user has to type a space or other delimiter himself. This make the interface more intuitive.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
auto.php
Show inline comments
 
@@ -74,13 +74,13 @@ if (!$getsections && count($term_parts) 
 
    if (!file_exists($dept_file))
 
      clean_empty_exit();
 
    $deptartments = unserialize(file_get_contents($dept_file));
 
    foreach ($deptartments as $key => $department)
 
      {
 
	if (!strncmp($department, $dept, $term_strlen))
 
	  $departments[$key] = $department . '-';
 
	  $departments[$key] = $department;
 
	else
 
	  unset($departments[$key]);
 
      }
 
    echo json_encode($departments);
 
    exit(0);
 
  }
0 comments (0 inline, 0 general)