[ww-devel] webwork-devel Digest, Vol 41, Issue 1

Davide P. Cervone dpvc at union.edu
Tue Aug 12 16:19:54 EDT 2014


The dimming is handled entirely within the scaffolding macros and doesn't involve changes to Problem.pm.  Certainly Problem.pm and PGcore.pm work in concert already, as the results table requires the PG_ANSWERS_HASH from the PG object in order to build it.  The dimming is based on that connection that is already there.  Problem.pm has lots of other connections into PG, as well.  It uses the answer hash to determine the correct/incorrect values, the scores, and so on.  So Problem.pm is already taking data from PGcore.pm as it is.

My thought about Peter's question about not coloring unanswered blanks in a section that just opens is to add a flag to the results in the answer hash that Problem.pm would use to decide whether to add the answer to the color list or not.  It would be generic so that other answer checkers could use it to affect the coloring, not just scaffold problems. And it would not require Problem.pm to have any knowledge of the way scaffolding problems work.  I think a similar flag could be used for things like essay answers that aren't graded, rather than looking specifically for an 'essay' answer type as is currently done.  That seems to be the type of tying of Problem to PG that you are concerned about here, and I agree that it should be limited.  Abstracting that sort of thing to data passed in the answer hash seems to me a good way of keeping the separation while still allowing Problem.pm to do what it needs to do.

Davide

On Aug 12, 2014, at 4:08 PM, Geoff Goehle wrote:

> I don't know how Davide is implementing the "dimming" rows, but I'm a
> little wary of things that require Problem.pm and PG.pm to work in
> concert.  Especially when it depends on a particular problem library.
> This is mainly because the idea is still that PG will operate pretty
> much independently of the thing calling it.  Is there anything that
> could be done only (or almost entirely) on the PG side.  I was thinking
> that PG could just not provide answer hash data for parts of the problem
> that are not available.  This way Problem.pm would print a shorter table
> just as a matter of course.  (The problem could still provide the total
> status for all of the sections, of course.)  
> 
> Geoff.
> 
> _______________________________________________
> webwork-devel mailing list
> webwork-devel at webwork.maa.org
> http://webwork.maa.org/mailman/listinfo/webwork-devel
> 



More information about the webwork-devel mailing list