[LON-CAPA-users] sequence conditionals
damieng at msu.edu
Tue Feb 14 13:10:53 EST 2017
> Where do I read how to create conditionals in a .sequence resource? I'm
> not finding this in author manual.
It looks like there is no documentation about how to write conditions.
It has however been mentioned on the mailing list, which you can check
To sum it up:
- this requires using the advanced sequence editor, as explained in
section 14 "Authoring Maps: Sequences and Pages"
- you start by adding some resources, then click on a link to add a
condition to it
- conditions are written in Perl, using the &EXT function
- it requires setting a mapalias parameter on resources you want to
check, with the "Set Parameters" link in the editor
- some useful parameters to check with &EXT are awarded, solved, tries,
- here is an example: &EXT('user.resource.resource.0.tries','test') > 2
(this will be true if the user has more than 2 tries for the problem
with a mapalias parameter set to "test", in part 0 (used when a problem
has no part)).
You can use an example by browsing to
/res/msu/albertel/b_and_c/controlled_flow.sequence as an author, and
copying that in your construction space. You can do that after checking
the "source available" check box and clicking on the Source Code link
next to the resource.
I will add that to the author manual.
Note that, as far as I can tell, the "Blocking other links if true"
option only works if there are conditions for all the other links (I
just filed a bug report about that).
More information about the LON-CAPA-users