help logoLON-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:

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:

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.