#!/usr/bin/perl
# Copyright 2001-2021 Leslie Richardson
# This file is part of Open Admin for Schools.
# Open Admin for Schools is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
my %lex = ('Main' => 'Main',
'Error' => 'Error',
'Add Reading Tests' => 'Add Reading Tests',
'Student' => 'Student',
'Reading Level' => 'Reading Level',
'Continue' => 'Continue',
'Category' => 'Category',
'Name' => 'Name',
'Save' => 'Save',
'Score' => 'Score',
'Test Date' => 'Test Date',
'Values must be from 1-4' => 'Values must be from 1-4',
'No User Id' => 'No User Id',
'No Password' => 'No Password',
'Please Log In' => 'Please Log In',
'Grade' => 'Grade',
'Homeroom' => 'Homeroom',
'Select' => 'Select',
'Blank=All' => 'Blank=All',
'Check' => 'Check',
'Record Exists' => 'Record Exists',
'Edit Record' => 'Edit Record',
'Required' => 'Required',
'Date and Reading Level' => 'Date and Reading Level',
'Only' => 'Only',
'No Blanks Allowed' => 'No Blanks Allowed',
'Skipping' => 'Skipping',
'Next Page' => 'Next Page',
'Absences' => 'Absences',
);
use DBI;
use CGI;
# use CGI::Session;
use Cwd;
my %exceptions = ( 'moved' => 'Moved', 'attendance' => 'Persistent Absences', 'altprog' => 'Alternate Program', 'other' => 'Other' );
my @exceptions = ( 'moved', 'attendance', 'altprog', 'other');
my $self = 'readTestAdd.pl';
my $q = new CGI;
my %arr = $q->Vars;
my @time = localtime(time);
my $year = $time[5] + 1900;
my $month = $time[4] + 1;
my $currdate = "$year-$month-$time[3]";
eval require "../../etc/admin.conf";
if ( $@ ) {
print $lex{Error}. " $self: $@
\n";
die $lex{Error}. "$self: $@\n";
}
my $dsn = "DBI:$dbtype:dbname=$dbase";
my $dbh = DBI->connect($dsn,$user,$password);
print $q->header( -charset, $charset );
my $mycss = $css;
if ( getcwd() =~ /tcgi/ ){ # we are in cgi
$mycss = $tchcss;
}
# Page Header
my $title = qq{$lex{'Add Reading Tests'} - DRA 2};
print qq{$doctype\n