NAME
Grades - A collocation of homework, classwork and exams
SYNOPSIS
use Grades;
my $script = Grades::Script->new_with_options( league => getcwd );
my $league = League->new( id => $script->league );
my $grades = Grades->new( league => $league );
my $homeworkgrades = $grades->homework;
my $classworkgrades = $grades->classwork;
my $examgrades = $grades->examGrade;
DESCRIPTION
An alternative to a spreadsheet for grading students, using YAML files and scripts. The students are the players in a league ( class.) See the README and example emile league in t/emile in the distribution for the layout of the league directory in which homework, classwork and exam scores are recorded.
Keywords: gold stars, token economies, bean counter
ATTRIBUTES & METHODS
LEAGUE CLASS
id
Unless called from the script or web app, it's a path to the league directory.
yaml
The content of the league configuration file.
name
The name of the league (class).
members
Hash refs of the players (students) in the league. The module assumes each of the members in the arrayref returned by this attribute is a hash ref containing an id and name of the member.
absentees
Students who have stopped coming to class and so won't be included in classwork scoring.
is_member
Whether the passed id is that of a member in the league (class).
inspect
Loads a YAML file.
save
Dumps a YAML file
GRADES CLASS
Grades' Homework Methods
hwdir
The directory where the homework is.
rounds
An arrayref of the rounds for which there are homework grades for players in the league, in round order, of the form, [1, 3 .. 7, 9 ..].
hwbyround
A hashref of the homework grades for players in the league for each round.
roundMax
The highest possible score in the homework
totalMax
The total maximum points that a Player could have gotten to this point in the whole season. There may be more (or fewer) rounds played than expected, so the actual top possible score returned by totalMax may be more (or less) than the figure planned.
hwforid
Given a player's id, returns an array ref of the player's hw scores.
homework
Running total homework scores of the league as percentages of the totalMax, with a maximum of 100.
Grades' Classwork Methods
series
The sessions over the series (semester) in which there was a different grouping (beancans) of players. Everyone in the same beancan for one session gets the same number of beans (classwork score.)
beancanseries
The different beancans for each of the sessions in the series. In the directory for each session of the series, there is a file called beancans.yaml, containing mappings of a beancan name to a sequence of PlayerNames, the members of the beancan.
allfiles
The files containing classwork points (beans) awarded to beancans.
allweeks
The weeks (an array ref of integers) in which beans were awarded.
lastweek
The last week in which beans were awarded.
data
The beans awarded to the beancans in the individual cards over the weeks of the series (semester.)
card
Classwork beans for each beancan for the given week
beancans
A hashref of all the beancans in a session with the names of the members of each beancan. The number, composition and names of the beancans in each session of the series may change.
Players in one beancan all get the same classwork grade for that session. The beancan members may be the same as the members of the class group, who work together in class, or may be individuals. Usually in a big class, the beancans will be the same as the groups, and in a small class they will be individuals.
Rather than refactor the class to work with individuals rather than groups, and expand some methods (?) to fall back to league members if it finds them in the weekly files instead of groups, I decided to introduce another file, beancans.yaml, and change all variable and method names mentioning group to beancan.
files
Given a session, returns the files containing beans for the session.
weeks
Given a session, returns the weeks (an array ref of integers) in which beans were awarded in the session.
week2session
$classwork->week2session(15) # fourth
Given the name of a week, return the name of the session it is in.
names2beancans
A hashref of names of members of beancans (players) and the beancans they were members of.
names2beancans
Given the name of a player, the name of the beancan they were a member of in the given week.
beancansNotInCard
$classwork->beancansNotInCard( $beancans, $card, 3)
Test all beancans exist in the beancans listed on the card for the week.
beancanDataOnCard
$classwork->beancansNotInCard( $beancans, $card, 3)
Test all of the beancans have all the points due them for the week. Duplicates the check done by the Card type.
merits
The points the beancan gained for the given week.
absences
The number of players absent from the beancan in the given week. These are demerits.
tardies
The number of players not on time in the beancan in the given week. These are demerits.
payout
How much should be given out for each beancan for each week in this session, so that the total score of each player over the series averages 80?
demerits
The demerits that week. calculated as twice the number of absences, plus the number of tardies. In a four-member beancan, this ranges from 0 to 8.
favor
A score of 1 given to beancans with no more than 6 demerits, to prevent beancans who were all there but didn't do anything (ie had no merits and no demerits) from getting a log score of 0, and so getting a grade of 0 for that week.
maxDemerit
The max demerit that week. achieved by the beancan with the most absences and tardies.
meritDemerit
Let beancans with no merits, and no demerits get a score greater than 1, so the log score is greater than 0. Let beancans with 3 or more absences and 1 tardies not be eligible for this favor, but get at least 0. Let other beancans get the number of merits - number of demerits, but also be eligible for the favor, and get a score of above 1.
logwork
The points given by the teacher are log-scaled to prevent active students from taking all the payout, and the other students getting very low grades. There may be better ways of grading to the curve than using log scaling. The log of one point is 0, which results in a grade of 0 for that week for that beancan.
work2grades
The work (ie merits - demerits) of the individual beancans for the week, as a percentage of the total work of all the beancans, determines the payout of grades, which should average 80 over the sessions of play.
grades4session
Totals for a given beancan over the session.
classwork
Running totals for individual ids out of 100, over the whole series.
Grades' Exams Methods
examdirs
The directories in which exam results exist.
examMax
The maximum score possible in each individual exam. That is, what the exam is out of.
examResults
A hash ref of the ids of the players and arrays of their results over the exam series, ie examdirs, in files named 'g.yaml'. TODO: Croak if any result is larger than examMax.
examPercent
A hashref of the ids of the players and arrays of their results over the exams expressed as percentages of the maximum possible score for the exams.
examGrade
A hash ref of the ids of the players and their total exam score, expressed as a percentage of the possible exam score. This is the average of their exam scores.
Grades' Core Methods
league
The league (object) whose grades these are.
weights
An hash ref of the weights (expressed as a percentage) accorded to the three components, classwork, homework, and exams in the final grade.
sprintround
sprintf( '%.0f', $number). sprintf warns if $number is undef.
grades
A hashref of student ids and final grades.
AUTHOR
Dr Bean, <drbean, followed by the at mark (@), cpan, then a dot, and finally, org>
BUGS
Please report any bugs or feature requests to bug-grades at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Grades. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Grades
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
Search CPAN
COPYRIGHT & LICENSE
Copyright 2006 Dr Bean, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.