Mercurial > hg > lukkari
changeset 153:9c6290ad087d
Improve class code handling.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 09 Dec 2014 21:32:25 +0200 |
parents | 4085ea7aa7a6 |
children | 4106691d3b25 |
files | index.php |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/index.php Thu Oct 02 09:11:34 2014 +0300 +++ b/index.php Tue Dec 09 21:32:25 2014 +0200 @@ -17,7 +17,7 @@ $pageCSSData = array("cookie" => "lukcss", "prefix" => "luk"); $classDefaultID = "DEFAULT"; -$classIDFile = "classes.txt"; +$classIDFile = array(FALSE => "classes.txt", TRUE => "classes_next.txt"); $courseCacheFile = "coursecache.txt"; if (file_exists("config.inc.php")) @@ -75,11 +75,13 @@ "classDataNotFound" => array( "fi" => "Luokan %1 tietoja ei löytynyt! Jos luokkakoodi on uusi, ". "ilmestyy se järjestelmään seuraavan päivityksen aikana. Luokkatiedot ". - "päivitetään noin kerran viikossa.", + "päivitetään noin kerran viikossa. <b>On myös mahdollista, että luokkakoodi ". + "on olemassa vain seuraavan periodin tiedoissa.</b>", "en" => "Data for class %1 was not found. If the class code is new, it ". "should appear in this system during the next update. The data is updated ". - "approximately once per week.", + "approximately once per week. <b>It is also possible that the code only ". + "exists for next period's data.</b>", ), "classListNotFound" => array( @@ -487,7 +489,7 @@ // Read classfile -if (($classIDs = lukReadClassFile($classIDFile, &$timestamp)) === false) +if (($classIDs = lukReadClassFile($classIDFile[$nextPeriod], &$timestamp)) === false) stError(cmQM("classListNotFound"));