[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"><bl=
ock condition=3D"&EXT('user.resource.resource.2.tries')>=
;0 && &EXT('user.resource.resource.2.solved') eq 'i=
ncorrect_attempted' && !(&EXT('resource.2.maxtries'=
) eq &EXT('user.resource.resource.2.tries'))"><br>
<br><startouttext /><br><br>// student got the problem wrong, provide=
a hint<br><br><endouttext /><br><br></block><br><br><block =
condition=3D"&EXT('user.resource.resource.2.tries')>1 &=
amp;& &EXT('user.resource.resource.2.solved') eq 'incor=
rect_attempted' && !(&EXT('resource.2.maxtries') eq=
&EXT('user.resource.resource.2.tries'))"><br>
<br><startouttext /><br><br>// student got the problem wrong again, p=
rovide another hint<br><br><endouttext /><br><br></block><br><b=
r><block condition=3D"&EXT('user.resource.resource.2.solved=
') eq 'correct_by_student'"><br>
<br><startouttext /><br><br>// student answered correctly, say good j=
ob<br><br><endouttext /><br><br></block><br><br><block condi=
tion=3D"&EXT('resource.2.maxtries') eq &EXT('user.=
resource.resource.2.tries')"><br>
<br><startouttext /><br><br>// student ran out of tries, say sorry<br=
><br><endouttext /><br><br></block><br></blockquote><br><br>On =
Tue, Jun 9, 2009 at 9:40 PM, Mark Lucas<<a href=3D"mailto:lucasm@ohio.ed=
u">lucasm@ohio.edu</a>> wrote:<br>
> Hi,<br>><br>> A colleague at JMU is looking to stretch his codin=
g a bit and is asking<br>> about conditional branching in sequences.<br>=
><br>> I've played around a little with this, but have never gone=
so far as to go<br>
> into production.<br>><br>> If you have comments/answers for any =
of the following questions, I'd<br>> appreciate it!<br>><br>> =
* What are some sample "conditional" or "user input" pr=
oblems that are coded<br>
> in the system, are published as open source, tested, and that you'=
d be<br>> willing to share with people (for example, having it linked in=
to showntell<br>> General).<br>><br>> * Do you have sample conditi=
onal sequences?<br>
><br>> * A more technical question - how the heck do we share source =
for sequences?<br>> We don't have an "Open Source" option =
for sequences, in part because it's<br>> downright dangerous to dive=
into sequence XML by hand. Is there a way to<br>
> share the source for a sequence so that someone can place it in their<=
br>> construction space and use it as an example?<br>><br>> Thanks=
for any input!<br>><br>> Mark<br>><br>> ______________________=
_________________________<br>
> LON-CAPA-users mailing list<br>> <a href=3D"mailto:LON-CAPA-users@m=
ail.lon-capa.org">LON-CAPA-users@mail.lon-capa.org</a><br>> <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>
><br><br><br><br>-- <br>Sean Wolf <br>2400 Ford St.<br>Golden, CO 80401<=
br>(720) 897-7763<br><br><br>
--001636c5a7237973a5046c5ab347--