Skip to main content Skip to navigation

Examples

GB: A Gradebook for Splus

 

Introduction | Examples | Tips


 

Creating a Gradebook

Automagically Creating a Gradebook

Entering a Grade

Changing a Grade

Deleting a Grade

Adding a Student

Changing a Student's name

Deleting a Student

Recovering a Gradebook

Deleting a Gradebook

Printing a Gradebook

Calculating Final Grades

 

Creating a New Gradebook


Before you can use GB you must create a gradebook for your class and section...
 
> GBcreate(202,"A")
Enter new student info (blank name to end)
 Lastname,Firstname  : Smith,Joe
 Soc Sec (no dashes) : 123456789
 Email id            : jsmith
 Lastname,Firstname  : Adams,Sue
 Soc Sec (no dashes) : 978654321
 Email id            : sue
 Lastname,Firstname  : Wu,Jack
 Soc Sec (no dashes) : 010110010
 Email id            : wujack
 Lastname,Firstname  : 
Wrote 'GB.202.A' to '/afs/andrew/usr/tn0o/stats'.
NULL
This would create a gradebook section A of class number 202, adding the 3 students listed.

...to the top

 

Creating a New Gradebook Automagically


A new program in GdBkUtils.S, ezGBcreate , allows you to create a gradebook directly from a comma-separated course datafile. This avoids manually typing in each student's name, social security number and email. This datafile comes from the registrar's electronic grading website. Unfortunately only faculty can downloaded by the comma-separated file; see this tip on how to convert the pretty-formatted roster files (which proxy users can download) into comma-separated files for this function.

It's a good idea to wait a few weeks into the semester before creating the gradebook, that way you don't have to make a lot of changes for adds and drops.

The comma-separated data file should have no extra blank lines nor email headers. Say your datafile is 202.dat , then you just need to specify the course number and the section...

 
> ezGBcreate(202,"B","202.dat")
Creating gradebook for 202 section B with following student information
                 Name        SS       Em 
 1          Smith,Joe 123456789   jsmith
 2          Adams,Sue 978654321      sue
 3            Wu,Jack 010110010   wujack
Wrote 'GB.202.B' to '/afs/andrew/usr/tn0o/stats'.
NULL
This would create a gradebook section B of class number 202. Note that the information grabbed from the datafile is displayed for you to check.

Also note that 202.dat could contain listings for all of the sections; you select which section you want with the second option.

...to the top

 

Entering a grade


To enter a grade use the function GBaddgrade . Here I have entered the lab grades of my students, 1, 0, and NA (added late).
 
GBaddgrade(202,"A")
 
Enter New Grade Type (0 to exit)...
1: Homework
2: Lab
3: Special
4: Exam
5: Final
6: Overall
Selection: 2
 
                                          L1
     Smith,Joe........................... 1
     Adams,Sue........................... 0
     Wu,Jack............................. NA
     
Wrote 'GB.202.A' to '/afs/andrew/usr/tn0o/stats'.
NULL
GB functions only allow numeric values for grades, but note that NA is a valid number.

GBaddgrade has 4 modes, selected by the Type option:

  • Type="new" : Default, create a new grade
  • Type="del" : Remove an existing grade
  • Type="fix" : Fix a grade for one or all students
  • Type="inc" : Increment a grade for one or all students
  • In the "incrementing" mode, the entered grade is added to an existing grade. This is is useful if more than one grader has to grade a homework.

    The next two sections deal with the "fix" and "del" modes.

    Extra for Experts!

    If you have your grades in a numeric vector you can avoid typing in each grade by specifying the Gds option; for example...
     
    GradeVec <- c(100,78,34)    
    GBaddgrade(202,"A",Gds=GradeVec)
     
              >>> Getting grades from Gds option <<<
     
    Enter New Grade Type (0 to exit)...
    1: Homework
    2: Lab
    3: Special
    4: Exam
    5: Final
    6: Overall
    Selection: 2
     
                                              L1
         Smith,Joe........................... 100
         Adams,Sue........................... 78
         Wu,Jack............................. 34
         
    Wrote 'GB.202.A' to '/afs/andrew/usr/tn0o/stats'.
    NULL
    
    The key thing is that the grades for Lab 1 are taken directly from the numeric vector, not typed in; they are displayed in the same format as when typing them in so you can check that they are correct. Warning! Use of this option assumes you have the correct number and order of grades!!! You can create massive errors in your grade book if you're not careful!!!

    ...to the top

     

    Fixing a grade


    To fix a grade that you've already entered use the function GBaddgrade with the Type="fix" option. You will be prompted to select the grade to fix and the student (or all students). Here I will fix the NA lab grade of my last student.
     
    > GBaddgrade(202,"A",Type="fix")
     
    Enter Grade to Fix (0 to exit)...
    1: L1
    Selection: 1
     
    Enter Student Number to Fix (0 for all students)...
    1: Smith,Joe
    2: Adams,Sue
    3: Wu,Jack
    Selection: 3
                                             (old) L1
          Wu,Jack............................. NA  1
     
    Wrote 'GB.202.A' to '/afs/andrew/usr/tn0o/stats'.
    NULL
    
    There is a short cut: GBfixgrade(...) is equivalent to GBaddgrade(...,Type="fix") .

    ...to the top

     

    Deleting a grade


    To delete a whole grade you also use GBaddgrade , but with the Type="del" option. You will be prompted to select the grade to delete. Here I will delete the first lab.
     
    > GBaddgrade(202,"A",Type="del")
     
    Enter Grade to Delete (0 to exit)...
    1: L1
    2: H1
    Selection: 1
         
    If you sure you want to delete Lab 1 (L1) enter 'YES': YES
    Wrote 'GB.202.A' to '/afs/andrew/usr/tn0o/stats'.
    NULL
    
    There is a short cut: GBdelgrade(...) is equivalent to GBaddgrade(...,Type="del") .

    ...to the top

     

    Adding a Student


    If you have to add a student after you have already created the gradebook, you use the function GBaddstud ...
     
    > GBaddstud(202,"A")
    Enter new student info (blank name to end)
     Lastname,Firstname  : Neyman,Marcus
     Soc Sec (no dashes) : 123456789
     Email id            : cookie
     Lastname,Firstname  : 
    Wrote 'GB.202.A' to '/afs/andrew/usr/tn0o/stats'.
    NULL
    
    This new student will have NA s for all of his grades.

    Just like GBaddgrade , GBaddstud has different modes selected by the Type option:

  • Type="new" : Default, create a new student
  • Type="del" : Remove an existing student
  • Type="fix" : Change a student's name
  • The next two sections deal with the "fix" and "del" modes.

    ...to the top

     

    Changing a Student's name


    To change the name of a student you use also the function GBaddstud but with the Type="fix" option...
     
    > GBaddstud(202,"A",Type="fix")
     
    Enter Student to Fix (0 to exit)...
    1: Smith,Joe
    2: Adams,Sue
    3: Wu,Jack
    4: Neyman,Marcus
    Selection: 2
    Enter student name: Lastname,Firstname
    (Adams,Sue): Adams,Samuel
    Wrote 'GB.202.A' to '/afs/andrew/usr/tn0o/stats'.
    NULL
    
    This will change Sue Adams to Samuel Adams, not effecting any grades.

    There is a short cut: GBfixstud(...) is equivalent to GBaddstud(...,Type="fix") .

    ...to the top

     

    Deleting a Student


    When a student needs to be dropped from your gradebook you also use GBaddstud , but by setting the Type option...
     
    > GBaddstud(202,"A",Type="del")
     
    Enter Student to Delete (0 to exit)...
    1: Smith,Joe
    2: Adams,Sue
    3: Wu,Jack
    4: Neyman,Marcus
    Selection: 4
    Student "Neyman,Marcus" deleted.
    Wrote 'GB.202.A' to '/afs/andrew/usr/tn0o/stats'.
    NULL
    
    The Type option actually takes three options, "new", "delete", and "fix". "new" is default so you never have to specify it, and "del" uniquely specifies "delete" (infact "d" would uniquely specify it).

    There is a short cut: GBdelstud(...) is equivalent to GBaddstud(...,Type="del") .

    ...to the top

     

    Recovering a Grade Book


    Everytime a change is made to a gradebook a copy of the previous version is kept in a .bak object. If you accidently add, change or delete grades or students, you can get your last version of your grade book with GBrecover .
     
    > GBrecover(202,"A")
        
    Current grade book for 202 section A has 4 students and 2 grades in it
    Backup grade book for 202 section A has 4 students and 1 grades in it
     
        Are you sure you want recover backup?  y
     
    Backup recovered (previous grade book now backup)
    
    As is alluded to in the output, the current version is not removed, it is just swapped with the backup version. That way you can examine the backup with GBget and see if it's what you want; if it isn't you can do GBrecover again and you'll get the other version back.

    ...to the top

     

    Deleting a Grade Book


    If you accidently create a bogus grade book, or if you have a problem when you create it with ezGBcreate , you will want to destroy the grade book. Do this with the GBdelete command; it tell you the size of the grade book and ask for confirmation...
     
    > GBdelete(202,"A")
     
    Grade book for 202 section A has 4 students and 2 grades in it
     
        Are you sure you want to delete it?  y
        
    Deleted 'GB.665.A' from '.Data.hp'.
    
    DANGER Be sure you have the right grade book; check it with GBget first. If you accidently delete a grade book you can get it back right away with GBrecover; but if a new grade book of the same name is created you might not be able to!

    ...to the top

     

    Printing


    To print your sections grades just use the Print flag with GBget...
    GBget(202,"AF",Print=T)
    A temporary file, /tmp/202AF.txt , will be created and printed to smear or the default printer that you have set with the PRINTER environmental variable.

    "AF" tells GBget to get sections A and F. If no section is specified then all sections are retrieved.

    ...to the top

     

    Creating Final Grades


    There are three functions in GdBkUtil.S to support creation of final grades, DropGd will drop grades, MkGrd will create a final numerical grade, and LetrGd will assign letter grade.

    Unfortunately I don't have time to give them a decent write up, so here is some help:

  • Annotated script of final grade creation
  • DropGd usage
  • MkGrd usage
  • LetrGd usage
  • Note that in the script above, the final grades are never returned to the grade book. The final record of class grades basically becomes a local Splus object (and a text file version of the same).

    ...to the top

     


     

    Neuroimaging
    Statistics

    Contact Info

    Room D0.03
    Deptment of Statistics
    University of Warwick
    Coventry
    CV4 7AL
    United Kingdom

    Tel: +44(0)24 761 51086
    Email: t.e.nichols 'at' warwick.ac.uk
    Web: http://nisox.org
    Blog: NISOx blog

    [Book Cover]

    Handbook of fMRI Data Analysis by Russ Poldrack, Thomas Nichols and Jeanette Mumford