--- loncom/interface/lonhelper.pm 2005/07/12 16:03:12 1.111
+++ loncom/interface/lonhelper.pm 2005/09/28 19:03:42 1.115
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# .helper XML handler to implement the LON-CAPA helper
#
-# $Id: lonhelper.pm,v 1.111 2005/07/12 16:03:12 albertel Exp $
+# $Id: lonhelper.pm,v 1.115 2005/09/28 19:03:42 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1188,7 +1188,8 @@ sub render {
if ($self->{'multichoice'}) {
$result .= <
SCRIPT
}
@@ -1436,7 +1438,7 @@ sub render {
$choiceLabel = eval($choiceLabel);
$choiceLabel = &$choiceLabel($helper, $self);
}
- $result .= ">" . &mtn($choiceLabel) . "\n";
+ $result .= ">" . &mtn($choiceLabel) . "\n";
}
$result .= "\n";
@@ -1930,7 +1932,8 @@ sub render {
if ($self->{'multichoice'}) {
$result = <
SCRIPT
my %lt=&Apache::lonlocal::texthash(
@@ -2057,6 +2061,7 @@ BUTTONS
};
$result.=(<
+//
@@ -2203,7 +2209,8 @@ sub render {
if ($self->{'multichoice'}) {
$result = <
SCRIPT
@@ -2250,23 +2291,12 @@ SCRIPT
$buttons = <
-
-
-
-
-
-
-
-
-
-
-
-
+
BUTTONS
@@ -2364,8 +2394,44 @@ BUTTONS
}
$result .= "\n\n";
- $result .= $buttons;
-
+ $result .= $buttons;
+ #
+ # now add the fancy section choice... first enumerate the sections:
+
+ my %sections;
+ for my $key (@keys) {
+ my $section_name = $classlist->{$key}->[$section];
+ if ($section_name ne "") {
+ $sections{$section_name} = 1;
+ }
+ }
+ # The variable $choice_widget will have the html to make the choice
+ # selector.
+
+ my $choice_widget = '\n";
+
+ # Build a table without any borders to contain the section based
+ # selection:
+
+ my $section_selectors = '
'."\n";
+ $section_selectors .= "
\n
For Sections:
$choice_widget
\n";
+ $section_selectors .= '
\n";
+ $section_selectors .= '
\n";
+ $section_selectors .= '
\n";
+ $section_selectors .= "
\n";
+ $section_selectors .= "
\n";
+ $section_selectors .= '
'."\n";
+ $section_selectors .= '
'."\n
\n";
+ $section_selectors .= " ";
+
+ $result .= $section_selectors;
return $result;
}
@@ -2547,7 +2613,8 @@ sub render {
if ($self->{'multichoice'}) {
$result = <
SCRIPT
my %lt=&Apache::lonlocal::texthash(