#!/usr/bin/perl
# Copyright 2001-2008 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 = ('You cannot set both promote and demote!' => 'You cannot set both promote and demote!',
'Main' => 'Main',
'Eoy' => 'Eoy',
'Reset Grade Assignment' => 'Reset Grade Assignment',
'Student' => 'Student',
'New Grade' => 'New Grade',
'Hr/Gr' => 'Hr/Gr',
'Update Grades' => 'Update Grades',
'Hrm' => 'Hrm',
'Gr' => 'Gr',
'Your update to student grades is now stored.' =>
'Your update to student grades is now stored.',
'There was an error storing your data.' => 'There was an error storing your data.',
'Contact' => 'Contact',
'Record the following error' => 'Record the following error',
);
my $self = 'resetgrade.pl';
use DBI;
use CGI;
$q = new CGI;
print $q->header;
my %arr = $q->Vars;
my $promote = $arr{promote};
my $demote = $arr{demote};
if ($demote and $promote){
print $lex{'You cannot set both promote and demote!'}. "\n";
die;
}
eval require "../../etc/admin.conf";
if ( $@ ) {
print $lex{Error}. " $@
\n";
die $lex{Error}. " $@\n";
}
my $dsn = "DBI:$dbtype:dbname=$dbase";
my $dbh = DBI->connect($dsn,$user,$password);
# Print Page Header
print "$doctype\n