[LON-CAPA-cvs] cvs: loncom /interface lonhelper.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sun, 16 Jan 2005 08:20:38 -0000
albertel Sun Jan 16 03:20:38 2005 EDT
Modified files:
/loncom/interface lonhelper.pm
Log:
- get rid of a typo that prevented 'activeonly' from be respected in the student selector
- rework <final> so that it generally more useful
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.92 loncom/interface/lonhelper.pm:1.93
--- loncom/interface/lonhelper.pm:1.92 Mon Jan 10 07:15:23 2005
+++ loncom/interface/lonhelper.pm Sun Jan 16 03:20:38 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# .helper XML handler to implement the LON-CAPA helper
#
-# $Id: lonhelper.pm,v 1.92 2005/01/10 12:15:23 foxr Exp $
+# $Id: lonhelper.pm,v 1.93 2005/01/16 08:20:38 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2124,7 +2124,7 @@
$helper->declareVar($paramHash->{'variable'});
$paramHash->{'multichoice'} = $token->[2]{'multichoice'};
$paramHash->{'coursepersonnel'} = $token->[2]{'coursepersonnel'};
- $paramHash->{'sctiveonly'} = $token->[2]{'activeonly'};
+ $paramHash->{'activeonly'} = $token->[2]{'activeonly'};
if (defined($token->[2]{'nextstate'})) {
$paramHash->{NEXTSTATE} = $token->[2]{'nextstate'};
}
@@ -3022,6 +3022,9 @@
which is useful for the Course Initialization helper so the users never see
the old values taking effect.
+If the parameter "restartCourse" is not true a 'Finish' Button will be
+presented that takes the user back to whatever was defined as <exitpage>
+
=cut
no strict;
@@ -3119,8 +3122,12 @@
$result .= '</ul>';
}
+ my $actionURL = $self->{EXIT_PAGE};
+ my $targetURL = '';
+ my $finish=&mt('Finish');
if ($self->{'restartCourse'}) {
- my $targetURL = '/adm/menu';
+ my $actionURL = '/adm/roles';
+ $targetURL = '/adm/menu';
if ($ENV{'course.'.$ENV{'request.course.id'}.'.url'}=~/^uploaded/) {
$targetURL = '/adm/coursedocs';
} else {
@@ -3129,25 +3136,24 @@
if ($ENV{'course.'.$ENV{'request.course.id'}.'.clonedfrom'}) {
$targetURL = '/adm/parmset?overview=1';
}
- my $previous = HTML::Entities::encode(&mt("<- Previous"), '<>&"');
- my $next = HTML::Entities::encode(&mt("Next ->"), '<>&"');
- $result .= "<center>\n" .
- "<form action='/adm/roles' method='post' target='loncapaclient'>\n" .
- "<input type='button' onclick='history.go(-1)' value='$previous' />" .
- "<input type='hidden' name='orgurl' value='$targetURL' />" .
- "<input type='hidden' name='selectrole' value='1' />\n" .
- "<input type='hidden' name='" . $ENV{'request.role'} .
- "' value='1' />\n<input type='submit' value='" .
- &mt('Finish Course Initialization') . "' />\n" .
- "</form></center>";
+ my $finish=&mt('Finish Course Initialization');
}
+ my $previous = HTML::Entities::encode(&mt("<- Previous"), '<>&"');
+ my $next = HTML::Entities::encode(&mt("Next ->"), '<>&"');
+ $result .= "<center>\n" .
+ "<form action='".$actionURL."' method='post' target='loncapaclient'>\n" .
+ "<input type='button' onclick='history.go(-1)' value='$previous' />" .
+ "<input type='hidden' name='orgurl' value='$targetURL' />" .
+ "<input type='hidden' name='selectrole' value='1' />\n" .
+ "<input type='hidden' name='" . $ENV{'request.role'} .
+ "' value='1' />\n<input type='submit' value='" . $finish . "' />\n" .
+ "</form></center>";
return $result;
}
sub overrideForm {
- my $self = shift;
- return $self->{'restartCourse'};
+ return 1;
}
1;