[LON-CAPA-users] Conditional Branching in sequences and problems

Sean Wolf lon-capa-users@mail.lon-capa.org
Sun, 14 Jun 2009 21:34:07 -0600


--001636988a0b02665b046c5abb60
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Err, some other info on this code is that it is for Part 2 of a numerical
response problem.  This code comes after the the response tags but before
the </part> tag.  It is used to show hints and other messages only after the
user has answered incorrectly or gotten the problem right or ran out of
tries, etc.

On Sun, Jun 14, 2009 at 9:32 PM, Sean Wolf <wolf.m.sean@gmail.com> wrote:

> Hey Mark,
>
> Is this the kind of conditional stuff you are talking about?:
>
> <block condition="&EXT('user.resource.resource.2.tries')>0 &&
>> &EXT('user.resource.resource.2.solved') eq 'incorrect_attempted' &&
>> !(&EXT('resource.2.maxtries') eq &EXT('user.resource.resource.2.tries'))">
>>
>> <startouttext />
>>
>> // student got the problem wrong, provide a hint
>>
>> <endouttext />
>>
>> </block>
>>
>> <block condition="&EXT('user.resource.resource.2.tries')>1 &&
>> &EXT('user.resource.resource.2.solved') eq 'incorrect_attempted' &&
>> !(&EXT('resource.2.maxtries') eq &EXT('user.resource.resource.2.tries'))">
>>
>> <startouttext />
>>
>> // student got the problem wrong again, provide another hint
>>
>> <endouttext />
>>
>> </block>
>>
>> <block condition="&EXT('user.resource.resource.2.solved') eq
>> 'correct_by_student'">
>>
>> <startouttext />
>>
>> // student answered correctly, say good job
>>
>> <endouttext />
>>
>> </block>
>>
>> <block condition="&EXT('resource.2.maxtries') eq
>> &EXT('user.resource.resource.2.tries')">
>>
>> <startouttext />
>>
>> // student ran out of tries, say sorry
>>
>> <endouttext />
>>
>> </block>
>>
>
>
> On Tue, Jun 9, 2009 at 9:40 PM, Mark Lucas<lucasm@ohio.edu> wrote:
> > Hi,
> >
> > A colleague at JMU is looking to stretch his coding a bit and is asking
> > about conditional branching in sequences.
> >
> > I've played around a little with this, but have never gone so far as to
> go
> > into production.
> >
> > If you have comments/answers for any of the following questions, I'd
> > appreciate it!
> >
> > * What are some sample "conditional" or "user input" problems that are
> coded
> > in the system, are published as open source, tested, and that you'd be
> > willing to share with people (for example, having it linked into
> showntell
> > General).
> >
> > * Do you have sample conditional sequences?
> >
> > * A more technical question - how the heck do we share source for
> sequences?
> > We don't have an "Open Source" option for sequences, in part because it's
> > downright dangerous to dive into sequence XML by hand. Is there a way to
> > share the source for a sequence so that someone can place it in their
> > construction space and use it as an example?
> >
> > Thanks for any input!
> >
> > Mark
> >
> > _______________________________________________
> > LON-CAPA-users mailing list
> > LON-CAPA-users@mail.lon-capa.org
> > http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
> >
>
>
>
> --
> Sean Wolf
> 2400 Ford St.
> Golden, CO 80401
> (720) 897-7763
>
>
>


-- 
Sean Wolf
2400 Ford St.
Golden, CO 80401
(720) 897-7763

--001636988a0b02665b046c5abb60
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Err, some other info on this code is that it is for Part 2 of a numerical r=
esponse problem.=A0 This code comes after the the response tags but before =
the &lt;/part&gt; tag.=A0 It is used to show hints and other messages only =
after the user has answered incorrectly or gotten the problem right or ran =
out of tries, etc.<br>
<br><div class=3D"gmail_quote">On Sun, Jun 14, 2009 at 9:32 PM, Sean Wolf <=
span dir=3D"ltr">&lt;<a href=3D"mailto:wolf.m.sean@gmail.com">wolf.m.sean@g=
mail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; p=
adding-left: 1ex;">
Hey Mark,<br><br>Is this the kind of conditional stuff you are talking abou=
t?:<br><br><blockquote style=3D"border-left: 1px solid rgb(204, 204, 204); =
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class=3D"gmail_quote">&lt;bl=
ock condition=3D&quot;&amp;EXT(&#39;user.resource.resource.2.tries&#39;)&gt=
;0 &amp;&amp; &amp;EXT(&#39;user.resource.resource.2.solved&#39;) eq &#39;i=
ncorrect_attempted&#39; &amp;&amp; !(&amp;EXT(&#39;resource.2.maxtries&#39;=
) eq &amp;EXT(&#39;user.resource.resource.2.tries&#39;))&quot;&gt;<br>

<br>&lt;startouttext /&gt;<br><br>// student got the problem wrong, provide=
 a hint<br><br>&lt;endouttext /&gt;<br><br>&lt;/block&gt;<br><br>&lt;block =
condition=3D&quot;&amp;EXT(&#39;user.resource.resource.2.tries&#39;)&gt;1 &=
amp;&amp; &amp;EXT(&#39;user.resource.resource.2.solved&#39;) eq &#39;incor=
rect_attempted&#39; &amp;&amp; !(&amp;EXT(&#39;resource.2.maxtries&#39;) eq=
 &amp;EXT(&#39;user.resource.resource.2.tries&#39;))&quot;&gt;<br>

<br>&lt;startouttext /&gt;<br><br>// student got the problem wrong again, p=
rovide another hint<br><br>&lt;endouttext /&gt;<br><br>&lt;/block&gt;<br><b=
r>&lt;block condition=3D&quot;&amp;EXT(&#39;user.resource.resource.2.solved=
&#39;) eq &#39;correct_by_student&#39;&quot;&gt;<br>

<br>&lt;startouttext /&gt;<br><br>// student answered correctly, say good j=
ob<br><br>&lt;endouttext /&gt;<br><br>&lt;/block&gt;<br><br>&lt;block condi=
tion=3D&quot;&amp;EXT(&#39;resource.2.maxtries&#39;) eq &amp;EXT(&#39;user.=
resource.resource.2.tries&#39;)&quot;&gt;<br>

<br>&lt;startouttext /&gt;<br><br>// student ran out of tries, say sorry<br=
><br>&lt;endouttext /&gt;<br><br>&lt;/block&gt;<br></blockquote><div><div><=
/div><div class=3D"h5"><br><br>On Tue, Jun 9, 2009 at 9:40 PM, Mark Lucas&l=
t;<a href=3D"mailto:lucasm@ohio.edu" target=3D"_blank">lucasm@ohio.edu</a>&=
gt; wrote:<br>

&gt; Hi,<br>&gt;<br>&gt; A colleague at JMU is looking to stretch his codin=
g a bit and is asking<br>&gt; about conditional branching in sequences.<br>=
&gt;<br>&gt; I&#39;ve played around a little with this, but have never gone=
 so far as to go<br>

&gt; into production.<br>&gt;<br>&gt; If you have comments/answers for any =
of the following questions, I&#39;d<br>&gt; appreciate it!<br>&gt;<br>&gt; =
* What are some sample &quot;conditional&quot; or &quot;user input&quot; pr=
oblems that are coded<br>

&gt; in the system, are published as open source, tested, and that you&#39;=
d be<br>&gt; willing to share with people (for example, having it linked in=
to showntell<br>&gt; General).<br>&gt;<br>&gt; * Do you have sample conditi=
onal sequences?<br>

&gt;<br>&gt; * A more technical question - how the heck do we share source =
for sequences?<br>&gt; We don&#39;t have an &quot;Open Source&quot; option =
for sequences, in part because it&#39;s<br>&gt; downright dangerous to dive=
 into sequence XML by hand. Is there a way to<br>

&gt; share the source for a sequence so that someone can place it in their<=
br>&gt; construction space and use it as an example?<br>&gt;<br>&gt; Thanks=
 for any input!<br>&gt;<br>&gt; Mark<br>&gt;<br>&gt; ______________________=
_________________________<br>

&gt; LON-CAPA-users mailing list<br>&gt; <a href=3D"mailto:LON-CAPA-users@m=
ail.lon-capa.org" target=3D"_blank">LON-CAPA-users@mail.lon-capa.org</a><br=
>&gt; <a href=3D"http://mail.lon-capa.org/mailman/listinfo/lon-capa-users" =
target=3D"_blank">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users<=
/a><br>

&gt;<br><br><br><br></div></div><font color=3D"#888888">-- <br>Sean Wolf <b=
r>2400 Ford St.<br>Golden, CO 80401<br>(720) 897-7763<br><br><br>
</font></blockquote></div><br><br clear=3D"all"><br>-- <br>Sean Wolf <br>24=
00 Ford St.<br>Golden, CO 80401<br>(720) 897-7763<br><br>

--001636988a0b02665b046c5abb60--