[LON-CAPA-users] How to automatically display solution for a problem?

Justin Gray jgray at math.sfu.ca
Mon Mar 5 16:08:47 EST 2018


Here is a sample problem that uses a block for after solved:

<problem><startouttext />Enter the correct answer 42 to see the hidden text
or image:<endouttext />
<numericalresponse answer="42">


    <textline readonly="no" spellcheck="none" />

</numericalresponse>
<solved>
    <img encrypturl="no" /><startouttext /><p>Hooray!</p><endouttext />
</solved>
</problem>

Note that the solution could be, for example, a text/HTML block or an image.

Justin


Justin Gray | Senior Lecturer
Department of Mathematics | Simon Fraser University
8888 University Drive, Burnaby | V5A 1S6 | Canada
Tel: +1 778.782.4237



On Mon, Mar 5, 2018 at 1:03 PM, Mills, Douglas G <dmills at illinois.edu>
wrote:

> HI Itay,
>
>
>
> There these very handy "Blocks" you can insert in your problem code and I
> think the "postanswerdate" block will do what you want, but I'm including
> all four that can be found from the Insert menu on the "colorful" editor.
> I would describe these as predefined conditionals so the postanswerdate
> pair, for example, will only display what is within the opening and closing
> tags after the answer has become available.  If you put your link to a
> solution PDF inside a pair of postanswerdate tags, that should do what
> you're looking for. The others work analogously I believe.
>
>
>
>             <postanswerdate></postanswerdate>
>
>             <preduedate></preduedate>
>
>             <solved></solved>
>
>             <notsolved></notsolved>
>
>
>
>
>
>
>
> Doug
>
>
>
> Douglas Mills
>
> Director of Instructional Technology
>
> Department of Chemistry
>
> University of Illinois
>
>
>
>
>
> *From: *LON-CAPA-users <lon-capa-users-bounces at mail.lon-capa.org> on
> behalf of Itay <itayf at nospammail.net>
> *Reply-To: *Discussion list for LON-CAPA users <
> lon-capa-users at mail.lon-capa.org>
> *Date: *Monday, March 5, 2018 at 2:34 PM
> *To: *Discussion list for LON-CAPA users <lon-capa-users at mail.lon-capa.org
> >
> *Subject: *[LON-CAPA-users] How to automatically display solution for a
> problem?
>
>
>
> Hi
>
>
>
> I failed to find a solution to this seemingly simple and universal issue.
>
> Conditional sequences might be the mechanism I am looking for, but I could
> not find enough details and examples of implementation.
>
>
>
> Assume I prepared and published a problem  'some.problem', and a
> corresponding solution 'solution.pdf'.
>
> I imported the problem into a course and set the parameters duedate and
> answerdate.
>
>
>
> I am looking for a mechanism that will allow me
>
> (1) to include a reference to the 'solution.pdf' inside 'some.problem'; and
>
> (2) will display 'solution.pdf' to the students only when 'answerdate' is
> reached and the answer for 'some.problem' is displayed.
>
> And I would like to achieve this for every problem inside a folder and/or
> a course.
>
>
>
> I would appreciate any hints on how to achieve that.
>
>
>
> Thanks in advance,
>
> Itay
>
>
>
>
>
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users at mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.lon-capa.org/pipermail/lon-capa-users/attachments/20180305/6c333c87/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SFU_2012_email_sig.jpg
Type: image/jpeg
Size: 8910 bytes
Desc: not available
URL: <http://mail.lon-capa.org/pipermail/lon-capa-users/attachments/20180305/6c333c87/attachment.jpg>


More information about the LON-CAPA-users mailing list