Skip to content

Grading

Since assignments are automatically graded, there is more opportunity for students to make submissions, and subsequently improve over time. You have the ability to control how you'd like to score their improvements by using a grading formula.

Grading Formula

A Grading Formula is used to grade your student's assignments. A Grading Formula consists of a description and an expression. The formula's description will be displayed to your students so that they have are provided with a clear understanding of how their grade was calculated. The expression is an arithmetic formula; Grader Than will use it to calculate your student's scores. To save time, once the formula is created you may reuse the same formula for multiple assignments.

Create a Formula

Before you can create a grading formula you must create a Course and create an Assignment.

1) Open the Assignment's Course Configuration page.

2) Link the course to the assignment.

3) To the right of the field labeled Grading Formula click the Create new Grading Formula Create Icon Create Icon button.

4) In the new window that appears, give the grading formula a name in the Title field. This will be helpful when you want to reuse the formula later.

5) In the field labeled Expression, give your formula an expression. Learn more about expressions.

6) In the field labeled Description, describe your formula so your students know how their grade is calculated. More information about the formula description.

Formula Description

It is important to write a description for your grading formula so that your students get an explanation of how their assignment score is calculated. Additionally, this will save you time for when you are answering the inevitable plethora of grading questions that you will receive from your students.

Expression

A Grading expression is an arithmetic formula that you may use to score your student's submissions. The expression will be given an access to a set of parameters which are outlined below. The resulting value of the expression should be a number between 0 and 1. Any value outside of that range will be restrained to 0 and 1 respectively. Your students scores will be displayed after the resulting value of your expression is multiplied by 100 then rounded to 2 decimals. Below, you will find an explanation of variables and functions you may access when developing your grading expression.

Variables

A variable is a precomputed value that you may use in your function. The values are calculated by using the data related to the given student's submission for a particular assignment, for a particular course. In other words, a variable's scope is limited to a single student's submission for the assignment that the formula is associated with.

Variable Name Description
max_unit The maximum unit test score the student received on all of their submissions, before and after the assignment due date.
max_early_unit The maximum unit test score the student received on their submissions that occurred before the assignment due date.
max_late_unit The maximum unit test score the student received on their submissions that occurred after the assignment due date.
min_unit The minimum unit test score the student received on all of their submissions, before and after the assignment due date.
min_early_unit The minimum unit test score the student received on their submissions that occurred before the assignment due date.
min_late_unit The minimum unit test score the student received on their submissions that occurred after the assignment due date.
avg_unit The arithmetic mean unit test score. Calculated using all of the student's submissions before and after the assignment due date.
avg_early_unit The arithmetic mean unit test score. Calculated using all of the student's submissions before the assignment due date.
avg_late_unit The arithmetic mean unit test score. Calculated using all of the student's submissions after the assignment due date.
med_unit The median unit test score. Calculated using all of the student's submissions before and after the assignment due date.
med_early_unit The median unit test score. Calculated using all of the student's submissions before the assignment due date.
med_late_unit The median unit test score. Calculated using all of the student's submissions after the assignment due date.
tot_sub The total number of submissions the student made for this assignment.
tot_early_sub The total number of submissions the student made for this assignment before the due date.
tot_late_sub The total number of submissions the student made for this assignment after the due date.
on_time A boolean value denoting if the student made at least one submission before the due date.

Operators

The following arithmetic operands are allowed in your expression:

Operand Description
+ Addition
- Subtraction
* Multiplication
/ Division
^ Exponentiation

The following comparison operators are allowed in your expression:

Operator Description
> Grader Than
< Less than
>= Grader Than or equal to
<= Less than or equal to
== Equality

The following logical operators are allowed in your expression:

Operator Description
& And
| Or
! Not

Functions

A function works by accepting one or more arguments and then returns a computed numeric value based on the parameter(s) that it receives. You may use functions in your Grading Formula to implement custom grading logic. Functions may be nested within each other.

if

if (conditional, true_value, false_value)

This function accepts three arguments and returns either the 2nd or 3rd argument depending on the logical evaluation of the first argument. The functions work very similarly to ternary operators in general programing languages because they return values.

argument Description
conditional A logical expression that is used to decide if true_value or false_value is returned by this function.
true_value The value returned if the logical expression evaluates to true.
false_value The value returned if the logical expression evaluates to false.

If Function Example 1

if(on_time, max_unit, max_unit*.8)

In this expression, we use the highest submission grade of the student if they submit on time, otherwise the student's resulting score will be 80% of their maximum submission if they submit their assignment late. Keep in mind that we are inherently allowing students to earn credit for submissions made after the assignment due date because we are using max_unit rather than max_early_unit in the true_value and max_late_unit in the false_value.

If Function Example 2

if(on_time | max_unit == 1, max_unit, 0)

In this example, students will receive the highest score of their submissions made prior to the due date. If the student is late they will receive a 0, unless they passed all tests in the assignment, in which case they will receive a 100%.

If Function Example 1

if(
    on_time,
    if(
        tot_sub >= 50,
        max_unit+.1,
        max_unit
    ),
    max(
        max_late_unit,
        .85
    )
)

In this case, if the student submits their work on time they will earn the maximum score for any submission made before and after the due date, with an option to earn an additional 10% if they make more than 50 unique submissions. This may be a way for you to reward effort. If the student is late in this example, the student's grade is limited to 85%.

min/max

The min() and max() functions accepts two floats as arguments and returns the minimum or maximum value respectively of the two arguments it receives.

If Max Example

max(max_late_unit*.90, max_early_unit)

In this example, the student's grade will be the maximum between the highest score they received on a submission made before the due date, or 90% of their highest score they received on a submission made after the due date.

abs

This function accepts one float as an argument and returns the absolute value of the specified number.

Examples

The following examples will help you get started in formulating your own Grading Formula:

Orientation assignment

if(tot_sub >= 1, 1, 0)

This is a common formula used with an orientation assignment where the goal is to help the student get acclimated to the Grader Than system. The student receives full credit if they make at least one submission or else they will receive 0%. This is typically used with an assignment that is aiming to help the student understand how to submit their work.

Pass fail threshold 60%

if(max_unit >= .6, 1, 0)

This formula allows you to create a pass fail assignment with the passing threshold being 60%. In other words, if the student passes 60% of the unit tests, they will earn full credit for this assignment. If they do not reach the passing point of 60% they will earn no credit(s) for the course.

On time improvement cap 95% 80% late penalty

if(
    on_time,
    max(
        max_early_unit,
        max_late_unit * .95
    ),
    min(
        max_unit,
        .8
    )
)

In this case, if the student submits their work on time, they have a chance to earn the maximum score they received prior to the due date, or 95% of their highest score they received from any submission made after the due date (whichever is higher). If the student does not submit their work on time they may at most receive an 80%.

Improve 15% past highest on time grade

if(
    on_time,
    max(
        max_early_unit,
        max(
        min(
            max_early_unit + .15,
            max_late_unit
        ),
        min(
            max_late_unit,
            .85
        )
        )
    ),
    max_unit * .8
)

This is the most common Grading Formula used on Grader Than. It gives your student's the ability to learn at their own pace, while also rewarding students for their diligence and on time consistency. Feel free to adjust the numbers to fit your teaching style.

With this formula, your students may always resubmit this assignment for a higher grade. The maximum grade your students can receive for resubmitted work (after the due date) is 15% higher than the highest grade they received (before the due date) or receive a 85%, whichever is higher (If their first submission was on time). If the student's initial submission is late, all subsequent resubmissions have a maximum grade of 80%.