[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonmenu.pm
raeburn
raeburn at source.lon-capa.org
Tue Sep 25 19:01:00 EDT 2012
raeburn Tue Sep 25 23:01:00 2012 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface lonmenu.pm
Log:
- For 2.11.
- Backport 1.386.
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.369.2.22 loncom/interface/lonmenu.pm:1.369.2.23
--- loncom/interface/lonmenu.pm:1.369.2.22 Mon Aug 27 15:53:40 2012
+++ loncom/interface/lonmenu.pm Tue Sep 25 23:01:00 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.369.2.22 2012/08/27 15:53:40 raeburn Exp $
+# $Id: lonmenu.pm,v 1.369.2.23 2012/09/25 23:01:00 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1975,8 +1975,22 @@
} else {
$ccrole = 'cc';
}
- my $priv;
+ my ($priv,$gotsymb,$destsymb);
my $destinationurl = $ENV{'REQUEST_URI'};
+ if ($destinationurl =~ /\?symb=/) {
+ $gotsymb = 1;
+ } elsif ($destinationurl =~ m{^/enc/}) {
+ my $plainurl = &Apache::lonenc::unencrypted($destinationurl);
+ if ($plainurl =~ /\?symb=/) {
+ $gotsymb = 1;
+ }
+ }
+ unless ($gotsymb) {
+ $destsymb = &Apache::lonnet::symbread();
+ if ($destsymb ne '') {
+ $destsymb = &Apache::lonenc::check_encrypt($destsymb);
+ }
+ }
my $reqprivs = &required_privs();
if (ref($reqprivs) eq 'HASH') {
my $destination = $destinationurl;
@@ -2064,7 +2078,12 @@
$role_selector .= "\n".'<option value="'.$role.'">'.&Apache::lonnet::plaintext($role).'</option>';
}
}
- $role_selector .= '</select>'."\n".
+ $role_selector .= '</select>'."\n";
+ if ($destsymb ne '') {
+ $role_selector .= '<input type="hidden" name="destsymb" value="'.
+ &HTML::Entities::encode($destsymb).'" />'."\n";
+ }
+ $role_selector .=
'<input type="hidden" name="destinationurl" value="'.
&HTML::Entities::encode($destinationurl).'" />'."\n".
'<input type="hidden" name="gotorole" value="1" />'."\n".
More information about the LON-CAPA-cvs
mailing list