#!/usr/bin/perl # Copyright 2001-2007 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. # Description: Grade based subject enrollment. List all the students # for all the subjects in that grade. Deselect those that you don't # have in those subjects. my $self = 'enroladdgr.pl'; my %lex = ('Add Subject Enrollments' => 'Add Subject Enrollments', 'Main' => 'Main', 'Report Card' => 'Report Card', 'Please enter a Grade' => 'Please enter a Grade', 'Missing starting/ending reporting periods' => 'Missing starting/ending reporting periods', 'for the following subjects' => 'for the following subjects', 'Subjects' => 'Subjects', 'Subject Enrollment' => 'Subject Enrollment', 'Students' => 'Students', 'Continue' => 'Continue', 'Terms' => 'Terms', 'Your records are now stored' => 'Your records are now stored', 'Grade' => 'Grade', 'Record exists for Term' => 'Record exists for Term', 'for' => 'for', 'Your records are now stored' => 'Your records are now stored', 'There was an error storing your data' => 'There was an error storing your data', 'Please contact' => 'Please contact', 'Please record the following error' => 'Please record the following error', ); use DBI; use CGI; require "../../etc/admin.conf" or die "Cannot open admin.conf!"; my $q = new CGI; print $q->header; my %arr = $q->Vars; my $grade = $arr{grade}; my $checked = $arr{checked}; my $dsn = "DBI:$dbtype:dbname=$dbase"; my $dbh = DBI->connect($dsn,$user,$password); # Print Page Header print "$doctype\n
| '. $lex{'Subjects'}. " |
|---|
| $badsubject |