--- loncom/homework/hint.pm 2002/10/28 23:31:48 1.30 +++ loncom/homework/hint.pm 2002/11/25 21:36:42 1.33 @@ -1,13 +1,13 @@ # The LearningOnline Network with CAPA # implements the tags that control the hints # -# $Id: hint.pm,v 1.30 2002/10/28 23:31:48 albertel Exp $ +# $Id: hint.pm,v 1.33 2002/11/25 21:36:42 albertel Exp $ # # Copyright Michigan State University Board of Trustees # # This file is part of the LearningOnline Network with CAPA (LON-CAPA). # -# LON-CAPA is free software; you can redistribute it and/or modify +# LON-CAPA me&aree software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. @@ -123,6 +123,8 @@ sub start_numericalhint { $result = &Apache::edit::rebuild_tag($token); $result .= &Apache::edit::handle_insert(); } + } elsif ($target eq 'web') { + &Apache::response::reset_params(); } return $result; } @@ -131,6 +133,9 @@ sub end_numericalhint { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; my $result; if ($target eq 'web') { + if (!$Apache::lonxml::default_homework_loaded) { + &Apache::lonxml::default_homework_load($safeeval); + } $safeeval->share_from('capa',['&caparesponse_capa_check_answer']); my $name= &Apache::lonxml::get_param('name',$parstack,$safeeval); &Apache::response::setup_params('numericalhint'); @@ -338,7 +343,7 @@ sub start_radiobuttonhint { return $result; } -sp;&end_radiobuttonhint { +sub end_radiobuttonhint { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; my $result; if ($target eq 'web') {