From: Michael G. <ga...@ma...> - 2005-10-18 02:31:48
|
On Oct 17, 2005, at 4:23 PM, Sam Hathaway wrote: > "warn" doesn't seem quite right to me -- the diagnostics aren't an > indication that something has necessarily gone wrong. Perhaps it > would be appropriate to add a new "slot" in the content that's > passed back from the translator for data such as this. It could > then be displayed conditionally by Problem.pm (i.e. only show it to > professors?). > There is no difficulty in separating out the different types of warnings and passing them out of the problem environment. There is a hash (something like PGflags) where the alert messages could be placed. The WARN messages are already there. We have redefined the perl warn so that warnings for the compiler and so forth are trapped and for debugging purposes it's simply been convenient to use the warn mechanism to pass out debugging info. You could define debug() in the problem environment and have it pass out the messages that it accumulates. You would have to add mechanisms to Problem.pm and/or to the template to grab the debug messages place them somewhere on the page. The transport through the PG interface will be easy. It will be pretty easy to define functions on the PG side which generate messages. The most work will be on the student/ instructor ContentGenerators where you decide how to present the information. Take care, Mike > I've never looked closely at the answer evaluation process, so I > don't know what would be easiest or make the most sense > architecturally, but maybe this could be added as a "diagnostics" > field to the value returned by each answer evaluator (called > rh_ans_evaluation_result in process_answers in Translator.pm). > > Mike may wish to comment further since he is most familiar with > this mechanism. > -sam > "Only dead fish swim with the stream." |