[LON-CAPA-cvs] cvs: doc /help author.manual.texxml loncom/html/adm/help/tex Sequence_Advanced_Editor_Links_Conditions.tex
damieng
damieng at source.lon-capa.org
Wed Feb 15 11:39:52 EST 2017
damieng Wed Feb 15 16:39:52 2017 EDT
Added files:
/loncom/html/adm/help/tex
Sequence_Advanced_Editor_Links_Conditions.tex
Modified files:
/doc/help author.manual.texxml
Log:
added documentation about conditions in the advanced sequence editor
Index: doc/help/author.manual.texxml
diff -u doc/help/author.manual.texxml:1.41 doc/help/author.manual.texxml:1.42
--- doc/help/author.manual.texxml:1.41 Wed Feb 1 21:20:18 2017
+++ doc/help/author.manual.texxml Wed Feb 15 16:39:52 2017
@@ -358,6 +358,9 @@
<subsection name="Authoring a Simple .sequence With The Advanced Editor">
<file name="Sequence_Advanced_Editor_Creation.tex"/>
</subsection>
+ <subsection name="Adding links and conditions">
+ <file name="Sequence_Advanced_Editor_Links_Conditions.tex"/>
+ </subsection>
<subsection name="Page Maps">
<file name="Sequence_Page_Maps.tex"/>
</subsection>
Index: loncom/html/adm/help/tex/Sequence_Advanced_Editor_Links_Conditions.tex
+++ loncom/html/adm/help/tex/Sequence_Advanced_Editor_Links_Conditions.tex
\label{Sequence_Advanced_Editor_Links_Conditions}
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:
\begin{itemize}
\item \textit{Recommendation if true}: displays the link only if the condition is true
\item \textit{Blocking this link if false}: hides the link if the condition is false
\item \textit{Blocking other links if true}: hides the other links if the condition is true
\end{itemize}
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.
Here is an example:\\
\texttt{\&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 \texttt{mapalias} parameter set to ``test'', in part \texttt{0} (which is the part id used when a problem has no part).
Here are some \texttt{\&EXT} parameters that are particularly useful for advanced sequences:
\begin{itemize}
\item \texttt{awarded}: \texttt{''} or a floating point number between 0 and 1 inclusive, that is the percentage of the weight for this problem
\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{''}
\item \texttt{tries}: number of tries used
\item \texttt{award}: detailed award determined by how the most recently graded part was graded; possible values:\\
\texttt{'EXACT\_ANS'}, \texttt{'APPROX\_ANS'}, \texttt{'NO\_RESPONSE'}, \texttt{'EXTRA\_ANSWER'},\\
\texttt{'MISSING\_ANSWER'}, \texttt{'WRONG\_NUMBOXESCHECKED'}, \texttt{'ERROR'},\\
\texttt{'TOO\_LONG'}, \texttt{'WANTED\_NUMERIC'}, \texttt{'MISORDERED\_RANK'},\\
\texttt{'EXCESS\_FILESIZE'}, \texttt{'FILENAME\_INUSE'}, \texttt{'INVALID\_FILETYPE'},\\
\texttt{'SIG\_FAIL'}, \texttt{'UNIT\_INVALID\_INSTRUCTOR'}, \texttt{'UNIT\_INVALID\_STUDENT'},\\
\texttt{'UNIT\_FAIL'}, \texttt{'UNIT\_IRRECONCIBLE'}, \texttt{'UNIT\_NOTNEEDED'},\\
\texttt{'NO\_UNIT'}, \texttt{'COMMA\_FAIL'}, \texttt{'BAD\_FORMULA'}, \texttt{'NOT\_FUNCTION'},\\
\texttt{'WRONG\_FORMAT'}, \texttt{'INTERNAL\_ERROR'}, \texttt{'INCORRECT'}, \texttt{'SUBMITTED'},\\
\texttt{'SUBMITTED\_CREDIT'}, \texttt{'ANONYMOUS'}, \texttt{'ANONYMOUS\_CREDIT'}, \texttt{'DRAFT'},\\
\texttt{'ASSIGNED\_SCORE'}, \texttt{''}
\item \texttt{status} (for bridge task): one of the strings: \texttt{'review'}, \texttt{'ungraded'}, \texttt{'fail'}, \texttt{'pass'}
\end{itemize}
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.
More information about the LON-CAPA-cvs
mailing list