Automatically Adjust Points Based on Other Conditions

If none of the standard conditions meets your needs, you can write your own conditional points formulas. The same variables and functions that are available for coding question behaviors can be used to specify new ways to adjust points conditionally.

  1. Open the Conditional Points window. 
    From hereDo this

    From assignment settings (Assignment Editor)

    Under Automatic Point Adjustments > Bonus or Penalty, click add or edit.

    From a single question (Assignment Editor)

    In the Bonus or Penalty column, click add or edit.

    Note Advanced Mode settings can't be changed in the Assignment Template Editor.
  2. Click Advanced Mode.
  3. In Formula, enter the formula to set the conditional points.
    • 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.

    The following WebAssign variables and functions are especially useful for specifying conditional points:

    Variable or Function



    Contains the number of submissions made by the student for the question part.


    Contains the point value as set in the assignment.


    Contains true if the student's response is correct.


    Sets the number of points to award for an incorrect response.


    Returns the number of days, hours, or minutes before the due date that the last response was submitted for the question part. If you grant an extension, this value changes to reflect the extended due date.

  4. In Explanation for Students, enter a message to be displayed when your students view the question details.
    • Explanation for Students is available only when setting conditional points for specific questions or question parts.

      Describe conditional points set for the entire assignment in the assignment Instructions.

    • You can use basic HTML tags such as <i>, <b>, and <br>.
    • You can't include Perl statements or the <eqn> tag.
  5. When the conditional points settings are correct, update the assignment.
    To update thisDo this

    A single question

    Click Update Question.

    All questions currently on the assignment

    Click Update All Questions.

    Assignment settings

    In the Assignment Editor, click Update.

The Conditional Points window closes and your assignment is updated.

The automatic bonus or penalty is applied immediately when your students submit answers that meet the specified conditions.

Remember to save your changes in the Assignment Editor.