--- loncom/interface/lonhtmlcommon.pm 2012/10/08 10:47:34 1.327
+++ loncom/interface/lonhtmlcommon.pm 2012/10/31 12:54:13 1.328
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.327 2012/10/08 10:47:34 foxr Exp $
+# $Id: lonhtmlcommon.pm,v 1.328 2012/10/31 12:54:13 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3011,6 +3011,56 @@ FOURTH
return $output;
}
+##############################################
+##############################################
+
+sub javascript_jumpto_resource {
+ my $confirm_switch = &mt("Editing requires switching to the resource's home server.").'\n'.
+ &mt('Switch server?');
+ return (<&').'&'.
+ 'symb='.&HTML::Entities::encode($env{'request.symb'},'"<>&');
+ if ($uploaded) {
+ $cfile .= '&forceedit=1';
+ }
+ $jscall = "need_switchserver('$cfile');";
+ }
+ } else {
+ if ($uploaded) {
+ $cfile .= '?forceedit=1';
+ }
+ $jscall = "go('$cfile')";
+ }
+ return $jscall;
+}
##############################################
##############################################