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

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


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

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

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

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><br><br>On =
Tue, Jun 9, 2009 at 9:40 PM, Mark Lucas&lt;<a href=3D"mailto:lucasm@ohio.ed=
u">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">LON-CAPA-users@mail.lon-capa.org</a><br>&gt; <a href=3D"h=
ttp://mail.lon-capa.org/mailman/listinfo/lon-capa-users">http://mail.lon-ca=
pa.org/mailman/listinfo/lon-capa-users</a><br>
&gt;<br><br><br><br>-- <br>Sean Wolf <br>2400 Ford St.<br>Golden, CO 80401<=
br>(720) 897-7763<br><br><br>

--001636c5a7237973a5046c5ab347--