Annotation of loncom/html/adm/help/tex/Authoring_Scripting_Tags.tex, revision 1.4

1.1       bowersj2    1: \label{Authoring_Scripting_Tags}
                      2: 
                      3: \begin{itemize}
1.2       www         4: \item \textbf{display}\index{display}: The intervening Perl script is evaluated
1.1       bowersj2    5: in the safe space and the return value of the script replaces the
                      6: entire tag.
1.3       vandui11    7: \item \textbf{import}\index{import}: This causes the parse to read in the file
1.1       bowersj2    8: named in the body of the tag and parse it as if the entire text of
1.3       vandui11    9: the file had existed at the location of the tag.
                     10: \item \textbf{parserlib}\index{parserlib}: The enclosed filename contains
1.1       bowersj2   11: definitions for new tags.
                     12: \item \textbf{script}\index{script}: If the attribute \textbf{type} is
1.2       www        13: set to {}``loncapa/perl'' the enclosed data is a Perl script which
1.3       vandui11   14: is evaluated inside the Perl safe space. The return value of the script
1.1       bowersj2   15: is ignored. 
                     16: \item \textbf{scriptlib}\index{scriptlib}: The enclosed filename contains
1.2       www        17: Perl code to run in the safe space.
1.3       vandui11   18: \item \textbf{block}\index{block}: This has a required argument \textbf{condition}
                     19: that is evaluated. If the condition is true, everything inside the
                     20: tag is evaluated; otherwise, everything inside the block tag is skipped.
1.1       bowersj2   21: \item \textbf{notsolved}\index{notsolved}: Everything inside the tag is
                     22: skipped if the problem is {}``solved''.
                     23: \item \textbf{postanswerdate}\index{postanswerdate}: Everything inside
                     24: the tag is skipped if the problem is before the answer date.
                     25: \item \textbf{preduedate}\index{preduedate}: Everything inside the tag
1.3       vandui11   26: is skipped if the problem is after the due date. 
1.1       bowersj2   27: \item \textbf{randomlist}\index{randomlist}: The enclosed tags are parsed
1.4     ! lira       28: in a stable random order. The optional attribute \textbf{show=``N''} restricts
1.1       bowersj2   29: the number of tags inside that are actually parsed to no more than
1.4     ! lira       30: \textbf{N}. N can equal the total tags inside. The randomlist tag can be used to randomize problem 
        !            31: parts by wrapping the $<$part$>$ tags with a randomlist tag. 
        !            32: \index{randomizing parts}Note that when randomlist wraps $<$part$>$ tags, that all
        !            33: students will work all parts only if \textbf{show=``N''} where N is the total number
        !            34: of parts wrapped. When N is less than the total number of parts wrapped, 
        !            35: there will be gaps in the assessment chart, and also in the table
        !            36: of submissions for each student, corresponding to those parts which are
        !            37: never available to that particular student. For more examples see section 
        !            38: \ref{Authoring_Library_Scripts}.
1.1       bowersj2   39: \item \textbf{solved}\index{solved}: Everything inside the tag is skipped
                     40: if the problem is {}``not solved''.
1.3       vandui11   41: \item \textbf{while}\index{while}: This implements a while loop. The required
1.2       www        42: attribute \textbf{condition} is a Perl scriptlet that when evaluated
1.3       vandui11   43: results in a true or false value. If true, the entirety of the text
1.1       bowersj2   44: between the whiles is parsed. The condition is tested again, etc.
1.3       vandui11   45: If false, it goes to the next tag.
1.1       bowersj2   46: \end{itemize}

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