Annotation of loncom/html/adm/help/tex/Sequence_Advanced_Editor_Links_Conditions.tex, revision 1.1

1.1     ! damieng     1: \label{Sequence_Advanced_Editor_Links_Conditions}
        !             2: 
        !             3: Any resource can potentially be linked to any other, making it possible to provide a non-linear learning experience.
        !             4: 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.
        !             5: 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.
        !             6: 
        !             7: 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:
        !             8: \begin{itemize}
        !             9: \item \textit{Recommendation if true}: displays the link only if the condition is true
        !            10: \item \textit{Blocking this link if false}: hides the link if the condition is false
        !            11: \item \textit{Blocking other links if true}: hides the other links if the condition is true
        !            12: \end{itemize}
        !            13: 
        !            14: The \texttt{\&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 \texttt{\&EXT}. This is done by adding a \texttt{mapalias} parameter to the resource. To do that, click on a resource, click the \textit{Set Parameters} link, change the value for the \texttt{parameter\_part\_mapalias} field, click on the \textit{Set} checkbox, then click on the \textit{Set} button.
        !            15: 
        !            16: Here is an example:\\
        !            17: \texttt{\&EXT('user.resource.resource.0.tries','test') > 2}\\
        !            18: This condition will be true if the user has more than 2 tries for the problem with a \texttt{mapalias} parameter set to ``test'', in part \texttt{0} (which is the part id used when a problem has no part).
        !            19: 
        !            20: Here are some \texttt{\&EXT} parameters that are particularly useful for advanced sequences:
        !            21: \begin{itemize}
        !            22: \item \texttt{awarded}: \texttt{''} or a floating point number between 0 and 1 inclusive, that is the percentage of the weight for this problem
        !            23: \item \texttt{solved}: status of the problem, 1 if the answer was correct, can also be one of the following strings: \texttt{'correct\_by\_student'}, \texttt{'correct\_by\_scantron'}, \texttt{'credit\_attempted'}, \texttt{'incorrect\_attempted'}, \texttt{'ungraded\_attempted'}, and the empty string \texttt{''}
        !            24: \item \texttt{tries}: number of tries used
        !            25: \item \texttt{award}: detailed award determined by how the most recently graded part was graded; possible values:\\
        !            26: \texttt{'EXACT\_ANS'}, \texttt{'APPROX\_ANS'}, \texttt{'NO\_RESPONSE'}, \texttt{'EXTRA\_ANSWER'},\\
        !            27: \texttt{'MISSING\_ANSWER'}, \texttt{'WRONG\_NUMBOXESCHECKED'}, \texttt{'ERROR'},\\
        !            28: \texttt{'TOO\_LONG'}, \texttt{'WANTED\_NUMERIC'}, \texttt{'MISORDERED\_RANK'},\\
        !            29: \texttt{'EXCESS\_FILESIZE'}, \texttt{'FILENAME\_INUSE'}, \texttt{'INVALID\_FILETYPE'},\\
        !            30: \texttt{'SIG\_FAIL'}, \texttt{'UNIT\_INVALID\_INSTRUCTOR'}, \texttt{'UNIT\_INVALID\_STUDENT'},\\
        !            31: \texttt{'UNIT\_FAIL'}, \texttt{'UNIT\_IRRECONCIBLE'}, \texttt{'UNIT\_NOTNEEDED'},\\
        !            32: \texttt{'NO\_UNIT'}, \texttt{'COMMA\_FAIL'}, \texttt{'BAD\_FORMULA'}, \texttt{'NOT\_FUNCTION'},\\
        !            33: \texttt{'WRONG\_FORMAT'}, \texttt{'INTERNAL\_ERROR'}, \texttt{'INCORRECT'}, \texttt{'SUBMITTED'},\\
        !            34: \texttt{'SUBMITTED\_CREDIT'}, \texttt{'ANONYMOUS'}, \texttt{'ANONYMOUS\_CREDIT'}, \texttt{'DRAFT'},\\
        !            35: \texttt{'ASSIGNED\_SCORE'}, \texttt{''}
        !            36: \item \texttt{status} (for bridge task): one of the strings: \texttt{'review'}, \texttt{'ungraded'}, \texttt{'fail'}, \texttt{'pass'}
        !            37: \end{itemize}
        !            38: Note that in Perl an undefined value, the number 0, the empty string \texttt{''}, 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 \texttt{<} or \texttt{==} is used, strings are converted into numbers, or the number 0 if the conversion is not possible. Use the \texttt{eq} operator to check string equality.
        !            39: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>