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

Lucas, Mark lucasm at ohio.edu
Mon Mar 5 16:06:10 EST 2018


If you are coding these problems new or have control over the code,
the following might work:

Publish the pdf file solutions as resources.

Within the problem you can place a postanswerdate block with a relative
link to the pdf file.

I have a really simple example at:
/res/ohiou/physicslib/ZZZ_testing ground/lucas/examples/PDFSolutions/Sample1.problem

<numericalresponse answer="$c" id="11">
    <responseparam name="tol" type="tolerance" default="5%" description="Numerical Tolerance" />
    <textline />

    <p>Check out the following link: 
    <a href="sample1.pdf"> sample1.pdf</a> for a solution to the problem.</p>
<allow src="/res/ohiou/physicslib/ZZZ_testing ground/lucas/examples/PDFSolutions/Sample1.pdf" />


PS - I just saw that Doug posted something as well.

> On Mar 5, 2018, at 3:34 PM, Itay <itayf at nospammail.net> wrote:
> 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

Mark Lucas 								email: lucasm at ohiou.edu
252D Clippinger Lab						phone: (740)597-2984
Department of Physics and Astronomy			fax: (740)593-0433
Ohio University
Athens, OH 45701

More information about the LON-CAPA-users mailing list