Advanced Points Adjustment Using Formulas

If none of the standard points adjustment methods meets your needs, write your own points adjustment formula for the question.

Note This information describes how to use the new Assignment Editor.

If needed, click Try the New Assignment Editor in the original Assignment Editor to enable this improved experience now.

Note Not available for all questions.
  1. In the Assignment Editor, expand the Questions section, then expand the question.
  2. Click Points adjustment.
  3. Click Advanced Mode.
    Two text boxes are shown: Adjustments Formula and Explanation for Students. A link above Adjustments Formula is labeled Back to Standard Mode. A link below Adjustments Formula is labeled Formula Help.
  4. In Adjustments Formula, enter a single <eqn> tag containing one or more Perl statements that define your formula.
    • The value of the last statement is the number of points awarded for a correct answer to the question.
    • Limited to 255 characters, including line breaks.

    See Example Adjustment Formulas for Common Variables and Functions.

  5. In Explanation for Students, enter a message to be displayed when your students view the question details.

    If needed, format your message with basic HTML tags such as <i>, <b>, and <br>.

  6. Optional: To change all questions on the assignment, click Adjust All Questions.
  7. Click Save at the top of the assignment.

Example Adjustment Formulas for Common Variables and Functions

You can use any of the Perl variables and functions available for coding questions, but the following might be especially useful:

Variable or Function Example Adjustments Formula
$POINTS

The point value of the question set in the assignment.

<eqn 0.5 * $POINTS>

Award 50% credit when a correct answer is submitted. Use this to change the default points awarded for manually graded questions.

$INCORRECT

The number of points awarded for an incorrect answer to the question.

<eqn>
my $choices = 5;
$INCORRECT = -$POINTS / ($choices - 1);
$POINTS
</eqn>

Penalize incorrect answers for a multiple-choice question to deter guessing.

Set the value of $choices to the number of choices for your question. If there are 5 choices, an incorrect answer receives −.25 points.

$RESPONSE_NUM

The number of submissions made by the student for the question.

<eqn>
my $penalized_subs = $RESPONSE_NUM - 1;
my $penalty = 0.2;
$POINTS * (1 - $penalty * $penalized_subs)
</eqn>

Deduct 20% from the awarded points for each submission used after the first.

&beforeDue('days')
&beforeDue('hours')
&beforeDue('minutes')

The number of days, hours, or minutes before the due date that the latest response was submitted for the question. If you grant an extension, this value is based on the extended due date.

<eqn>
my ($i, $p, @pbd) = (0, 0, (
[2, 'days',  .05 ],
[1, 'days',  .10 ],
[4, 'hours', .20 ]
));
while (&beforeDue($pbd[$i][1]) <= $pbd[$i][0] && $i <= $#pbd) {
  $p = $pbd[$i][2];
  $i++;
}
decform($POINTS * (1 - $p),3)
</eqn>

Answers are penalized if submitted close to the due date according to the following schedule:

  • 2 days before the due date: 5%
  • 1 day before the due date: 10%
  • 4 hours before the due date: 20%
Point adjustments can be calculated based on the assignment due date, but not on the availability date.
Important Because granting an extension changes the student's due date, automatic point adjustments are based on each student's due date with any granted extensions. If needed, manually adjust the student's assignment score after the extension period ends.