--- loncom/interface/Attic/lonwizard.pm 2003/01/30 19:34:24 1.3
+++ loncom/interface/Attic/lonwizard.pm 2003/02/10 21:27:27 1.5
@@ -5,6 +5,7 @@ package Apache::lonwizard;
use Apache::Constants qw(:common :http);
use Apache::loncommon;
+use Apache::lonnet;
=head1 lonwizard - HTML "Wizard" framework for LON-CAPA
@@ -253,6 +254,8 @@ HEADER
}
else
{
+ $result .= '(): Returns a string representing the current state of the wizard, suitable for use directly as part of a query string. (See resource_state for an example.)
+
+=cut
+
+sub queryStringVars {
+ my $self = shift;
+
+ my @queryString = ();
+
+ for my $varname (keys %{$self->{VARS}}) {
+ push @queryString, Apache::lonnet::escape($varname) . "=" .
+ Apache::lonnet::escape($self->{VARS}{$varname});
+ }
+ push @queryString, 'CURRENT_STATE=' . Apache::lonnet::escape($self->{STATE});
+ push @queryString, 'RETURN_PAGE=' . Apache::lonnet::escape($self->{RETURN_PAGE});
+
+ return join '&', @queryString;
+}
+
+=pod
+
=item B(): If a state calls this, the wizard will consider itself completed. The state should display a friendly "Done" message, and the wizard will display a link returning the user to the invoking page, rather then a "Next" button.
=cut
@@ -375,7 +399,7 @@ WIZBEGIN
Apache::lonwizard::resource_choice->new($wizard, "CHOOSE_FOLDER", "Select Folder", "", "", "CHOOSE_STUDENT_LEVEL", "RESOURCE_ID", sub {my $res = shift; return $res->is_map();});
Apache::lonwizard::resource_choice->new($wizard, "CHOOSE_RESOURCE", "Select Resource", "", "", "CHOOSE_STUDENT_LEVEL", "RESOURCE_ID", sub {my $res = shift; return $res->is_map() || $res->is_problem();}, sub {my $res = shift; return $res->is_problem(); });
Apache::lonwizard::switch_state->new($wizard, "CHOOSE_STUDENT_LEVEL", "Parameter Targets", "TARGETS", [
- ["course", "Set for All Students in Course", "CHOOSE_DATE"],
+ ["course", "Set for All Studen####n Course", "CHOOSE_DATE"],
["section", "Set for Section", "CHOOSE_SECTION"],
["student", "Set for an Individual Student", "CHOOSE_STUDENT"]],
"Whom should this setting affect?");
@@ -834,7 +858,7 @@ sub render {
} else {
$result .= "