Advanced Conditional Points Example: Reward Early Completion

With advanced conditional points, you can reward students for submitting work early and give higher bonuses based on how far ahead of the due date the answers were submitted.

You can use this example as shown or adjust the values as needed.


my ($i, $b, @bbd) = (0, 0, (
[ 3, 'days', .10],
[ 5, 'days', .15],
[10, 'days', .25],
while ( $bbd[$i][0] <= &beforeDue($bbd[$i][1]) && $i <= $#bbd ) {
  $b = $bbd[$i][2]; $i++;
decform($POINTS * (1 + $b),3)

Explanation for Students

You receive bonus points for submitting correct answers early
according to the following schedule:
<li>more than 3 days before the due date: 10%</li>
<li>more than 5 days before the due date: 15%</li>
<li>more than 10 days before the due date: 25%</li>

To add, update, or remove bonus values and periods, change the @bbd array values in lines 3-5. For example, [10, 'days', .25] awards a 25% bonus for answers submitted more than 10 days before the due date.

List bonus periods in reverse chronological order, starting with the latest period.

Conditional points can't be calculated based on assignment availability dates, but instead are based on the due date.
Important Because granting an extension changes the student's due date, automatic bonus or penalty points based on the due date will be applied based on the student's extended due date. If needed, adjust the student's assignment score after the extension period ends.
  • Formula must include a single <eqn> tag containing one or more Perl statements.
  • The value of the last Perl statement is used as the point value for the question or question part.
  • Formula is limited to 255 characters (including line breaks). Additional characters are not saved.