--- loncom/interface/lonhelper.pm 2005/07/07 03:56:52 1.104 +++ loncom/interface/lonhelper.pm 2006/03/19 23:09:20 1.135 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # .helper XML handler to implement the LON-CAPA helper # -# $Id: lonhelper.pm,v 1.104 2005/07/07 03:56:52 albertel Exp $ +# $Id: lonhelper.pm,v 1.135 2006/03/19 23:09:20 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -573,22 +573,20 @@ sub display { } # Phase 4: Display. - my $html=&Apache::lonxml::xmlbegin(); my $stateTitle=&mt($state->title()); - my $helperTitle = &mt($self->{TITLE}); - my $bodytag = &Apache::loncommon::bodytag($helperTitle,'',''); + my $browser_searcher_js = + ''; + + $result .= &Apache::loncommon::start_page($self->{TITLE}, + $browser_searcher_js); + my $previous = HTML::Entities::encode(&mt("<- Previous"), '<>&"'); my $next = HTML::Entities::encode(&mt("Next ->"), '<>&"'); # FIXME: This should be parameterized, not concatenated - Jeremy - my $loncapaHelper = &mt("LON-CAPA Helper:"); - $result .= < - $loncapaHelper: $helperTitle - - $bodytag -HEADER + if (!$state->overrideForm()) { $result.="
"; } $result .= < @@ -651,10 +649,9 @@ HEADER - - FOOTER + $result .= &Apache::loncommon::end_page(); # Handle writing out the vars to the file my $file = Apache::File->new('>'.$self->{FILENAME}); print $file $self->_varsInFile(); @@ -1188,7 +1185,8 @@ sub render { if ($self->{'multichoice'}) { $result .= < + SCRIPT } @@ -1265,13 +1264,13 @@ BUTTONS my $id = &new_id(); $result .= "\n \n"; $result .= "[1],"<>&\"'") . "'"; if ($checkedChoices{$choice->[1]}) { - $result .= " checked "; + $result .= " checked='checked' "; } - $result .= qq{id="$id"}; + $result .= qq{id="id$id"}; my $choiceLabel = $choice->[0]; if ($choice->[4]) { # if we need to evaluate this choice $choiceLabel = "sub { my $helper = shift; my $state = shift;" . @@ -1279,7 +1278,7 @@ BUTTONS $choiceLabel = eval($choiceLabel); $choiceLabel = &$choiceLabel($helper, $self); } - $result .= "/> ".qq{