--- loncom/interface/Attic/lonwizard.pm 2003/01/30 19:34:24 1.3
+++ loncom/interface/Attic/lonwizard.pm 2003/02/10 22:13:55 1.6
@@ -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
@@ -834,7 +858,7 @@ sub render {
} else {
$result .= "