[LON-CAPA-users] Getting a message to appear with the "correct" statement.

Robley Light lon-capa-users@mail.lon-capa.org
Thu, 13 Apr 2006 17:39:17 -0400

Thanks, Guy.  The <solved> tag works fine, though I've worked out another
way to do what I wanted in a particular problem.  The idea was having them
solve problems to get densities of metals, then tell them what the metal was
after they got it correct, and bring the printed "correct" page to lab
because they need the metal densities for a class experiment.  

However the problem covered only a few metals picked randomly from a list so
I finally decided to just put in a table (as a pdf file) for them to be able
to print to bring to class, and I added a part to the problem that used this
pdf file to identify the metals whose density they found.

Comments, criticisms, suggestions appreciated.  Check it out at

In a related problem, though, densities of liquids, I did put in the
"solved" statements identifying the liquids.  See

>From this problem, I see that what I had wanted to do wouldn't work well
anyway.  Try answering one or more of the parts of this problem, then print
it.  Notice that the "answer" does not appear on the printed version as it
does on the web page.  So I would have to put in 
<solved>Correct: Liquid A is acetone, density 0.792 g/mL</solved> 
to get the information to print, and then the density would show twice on
the web view--okay but not very elegant.


PS Where would I learn more about the perl conditionals that one can use
with the <block> tag?

Robley J. Light                         Professor of Chemistry and
Department of Chemistry          Phone:   (850) 644-3844
   and Biochemistry                   Email:  rlight@chem.fsu.edu  
Florida State University             Fax:      (850) 644-8281
Tallahassee, FL 32306-4390    Home Page:


> -----Original Message-----
> From: lon-capa-users-admin@mail.lon-capa.org 
> [mailto:lon-capa-users-admin@mail.lon-capa.org] On Behalf Of 
> Guy Albertelli II
> Sent: Thursday, April 13, 2006 11:38 AM
> To: lon-capa-users@mail.lon-capa.org
> Subject: Re: [LON-CAPA-users] Getting a message to appear 
> with the "correct" statement.
> Hi Robley,
> > When a student gets a problem correct, the following message shows:
> > 
> > "You are Correct. Computer's answer now shown above.
> > Your receipt is 491-88"
> > 
> > What tag should I use to get a message to appear at about 
> the same place?
> There is currently no way to get a message from the problem 
> author to appear inside the green box of 'You are correct'
> > Does <solved> work? 
> > Like this?
> > 
> > <solved>
> > Message
> > </solved>
> This will create a message that will onlay appear after the 
> problem is correctly solved. But it will appear in the normal 
> course of the problem. Not in the correctness box.
> But from what you say later this is likely what you'd like.
> > Or should I use a block with a condition, and if so does 
> one just use 
> > the condition "solved".
> > <block condition="solved">
> > Message
> > </block>
> I'd suggest using <solved> if you want a message that display 
> only after they have correct answered the question. 
> Conditions need to be valid perl conditionals. (In this 
> example the value of the condition is the string "solved" and 
> all non empty string values are considered true in perl, so 
> this condition would always be true. Which isn't what you want.)
> > "You are correct.  Message.
> > Computer's answer now shown above.
> > Your receipt is 491-88"
> > 
> > I'm writing a problem where students are asked to find the 
> density of 
> > a series of metals.  When they get the density right, I want the 
> > following to
> > show:
> > 
> > You are correct. This metal is silver. (or whatever metal it was).
> I'd use the <solved> tag as this will do for the most part 
> what you want.
> If you want to have the green background for your text you 
> can do this with a <table> or <div>. 
> > The idea is that they can then print this page and bring it 
> to lab so 
> > they have a list of densities that they will need for their lab 
> > experiment.  But I don't want to give the identity away 
> before they work the problem.
> And it will print.
> Does this work for you?
> -- 
> guy@albertelli.com   0-7-1-8-27,137
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users