[OA] Monthly Enrollment Change Report
Les Richardson
les at celery.richtech.ca
Wed Nov 1 16:16:57 EST 2006
Yes, I have a fix for this today also. I will post.
This is caused by the mising ethnic array in the config file. (which is
now meta based). We now load this directly out of the stduent table using
a 'select distinct' query.
Les
On Wed, 1 Nov 2006, Methodius Dusyk wrote:
> Hi
>
> When a school views the Monthly Enrollment Change report from the Main page, no categories, Enrollments, or Withdrawals are shown. Only the table header is given. Below it the Enrollment Summary table is displayed but does not display proper values.
>
> Fortunately I have a fix. The problem in the rptenrolmon.pl script is that the @ethnic array is empty. Since the ethnic array is empty the following foreach statement never happens.
>
>
> # Now print out what was happening in each category...
> foreach $type (@ethnic){ # Go through each ethnic type
> print "<tr><td>$type</td>\n";
> print "<td align=\"center\">$ethnicount{$type}->[0]</td>\n";
> print "<td align=\"center\">$ethnicount{$type}->[1]</td></tr>\n";
> }
>
> The fix in rptenrolmon.pl :
>
> I moved the following two lines
>
> my $dsn = "DBI:$dbtype:dbname=$dbase";
> my $dbh = DBI->connect($dsn,$user,$password);
>
> to just before the
>
>
> foreach $type (@ethnic){
> $ethnicount{$type} = [0,0];
> }
>
>
> and added the following (which comes from resetethnic0.pl) before the foreach statement above.
>
> # Get the ethnic values...
> my $sth = $dbh->prepare("select distinct ethnic from studentall where ethnic != ''");
> $sth->execute;
> if ($DBI::errstr) { print $DBI::errstr; die $DBI::errstr; }
> while (my $ethnic = $sth->fetchrow) {
> push @ethnic, $ethnic;
> }
>
>
>
> The relevent portion of rptenrolmon.pl is now.
>
> my $dsn = "DBI:$dbtype:dbname=$dbase";
> my $dbh = DBI->connect($dsn,$user,$password);
> # Get the ethnic values...
> my $sth = $dbh->prepare("select distinct ethnic from studentall where ethnic != ''");
> $sth->execute;
> if ($DBI::errstr) { print $DBI::errstr; die $DBI::errstr; }
> while (my $ethnic = $sth->fetchrow) {
> push @ethnic, $ethnic;
> }
> foreach $type (@ethnic){
> $ethnicount{$type} = [0,0];
> }
>
>
> Methodius
>
>
>
> _______________________________________________
> Openadmin mailing list
> Openadmin at pananix.com
> https://www.pananix.com/cgi-bin/mailman/listinfo/openadmin
>
More information about the Openadmin
mailing list