--- loncom/interface/lonhelper.pm 2005/01/21 22:59:54 1.95 +++ loncom/interface/lonhelper.pm 2005/02/22 11:43:05 1.98 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # .helper XML handler to implement the LON-CAPA helper # -# $Id: lonhelper.pm,v 1.95 2005/01/21 22:59:54 albertel Exp $ +# $Id: lonhelper.pm,v 1.98 2005/02/22 11:43:05 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -575,6 +575,7 @@ 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,'',''); @@ -584,9 +585,8 @@ sub display { my $loncapaHelper = &mt("LON-CAPA Helper:"); $result .= < +$html - $loncapaHelper: $helperTitle $bodytag @@ -1977,6 +1977,7 @@ BUTTONS $mapUrl = $self->{MAP_URL}; } + # Create the composite function that renders the column on the nav map # have to admit any language that lets me do this can't be all bad # - Jeremy (Pythonista) ;-) @@ -2005,14 +2006,19 @@ BUTTONS return $result; } else { my $col = ""; + my $raw_name = &$valueFunc($resource); my $resource_name = - HTML::Entities::encode(&$valueFunc($resource),"<>&\"'"); + HTML::Entities::encode($raw_name,"<>&\"'"); if($option_vars) { foreach my $option_var (@$option_vars) { + my $checked =""; + if($helper->{VARS}->{$option_var} =~ /$raw_name/) { + $checked = "checked"; + } $col .= " "; + $resource_name . "' $checked /> "; } } @@ -2870,7 +2876,7 @@ sub render { my $result = ''; if (defined $self->{ERROR_MSG}) { - $result .= '
' . $self->{ERROR_MSG} . '

'; + $result .= '

' . $self->{ERROR_MSG} . '

'; } $result .= '