LON-CAPA Help
Any resource can potentially be linked to any other, making it possible to provide a non-linear learning experience.
Once a few resources have been added to a sequence in the advanced editor, links can be added by simply clicking on a resource, using the "Link Resource" link, and clicking on another resource. The map display will update to take into account the new link.
By default, all links out of a resource will be suggested to students switching to the next resource in the sequence, but it is possible to reduce the options with conditions.
A condition for a link can be added by clicking on a link near a resource (in a colored area) and typing the condition in the pop-up. Conditions are using the Perl syntax, and are evaluated as booleans. Three different outcomes are possible for a given condition:
- Recommendation if true: displays the link only if the condition is true
- Blocking this link if false: hides the link if the condition is false
- Blocking other links if true: hides the other links if the condition is true
The &EXT function is used to get user data. It takes 2 parameters: one to specify the problem part and requested data, and one to specify the sequence resource. Resources in the sequence have to be named before being used with &EXT. This is done by adding a mapalias parameter to the resource. To do that, click on a resource, click the Set Parameters link, change the value for the parameter_part_mapalias field, click on the Set checkbox, then click on the Set button.
Here is an example:
&EXT('user.resource.resource.0.tries','test') > 2
This condition will be true if the user has more than 2 tries for the problem with a mapalias parameter set to "test", in part 0 (which is the part id used when a problem has no part).
Here are some &EXT parameters that are particularly useful for advanced sequences:
- awarded: " or a floating point number between 0 and 1 inclusive, that is the percentage of the weight for this problem
- solved: status of the problem, 1 if the answer was correct, can also be one of the following strings: 'correct_by_student', 'correct_by_scantron', 'credit_attempted', 'incorrect_attempted', 'ungraded_attempted', and the empty string "
- tries: number of tries used
- award: detailed award determined by how the most recently graded part was graded; possible values:
'EXACT_ANS', 'APPROX_ANS', 'NO_RESPONSE', 'EXTRA_ANSWER',
'MISSING_ANSWER', 'WRONG_NUMBOXESCHECKED', 'ERROR',
'TOO_LONG', 'WANTED_NUMERIC', 'MISORDERED_RANK',
'EXCESS_FILESIZE', 'FILENAME_INUSE', 'INVALID_FILETYPE',
'SIG_FAIL', 'UNIT_INVALID_INSTRUCTOR', 'UNIT_INVALID_STUDENT',
'UNIT_FAIL', 'UNIT_IRRECONCIBLE', 'UNIT_NOTNEEDED',
'NO_UNIT', 'COMMA_FAIL', 'BAD_FORMULA', 'NOT_FUNCTION',
'WRONG_FORMAT', 'INTERNAL_ERROR', 'INCORRECT', 'SUBMITTED',
'SUBMITTED_CREDIT', 'ANONYMOUS', 'ANONYMOUS_CREDIT', 'DRAFT',
'ASSIGNED_SCORE', "
- status (for bridge task): one of the strings: 'review', 'ungraded', 'fail', 'pass'
Note that in Perl an undefined value, the number 0, the empty string ", the string '0' and an empty list will be evaluated as false, while anything else will be evaluated as true. When a numeric operator like < or == is used, strings are converted into numbers, or the number 0 if the conversion is not possible. Use the eq operator to check string equality.