[LON-CAPA-cvs] cvs: rat /client ratcode.js loncom/interface groupsort.pm
www
lon-capa-cvs@mail.lon-capa.org
Sat, 11 Jun 2005 01:06:57 -0000
www Fri Jun 10 21:06:57 2005 EDT
Modified files:
/loncom/interface groupsort.pm
/rat/client ratcode.js
Log:
Bug #3738: being able to recover "zombie" resources (i.e., undelete without
data loss)
Index: loncom/interface/groupsort.pm
diff -u loncom/interface/groupsort.pm:1.37 loncom/interface/groupsort.pm:1.38
--- loncom/interface/groupsort.pm:1.37 Fri Jun 10 16:43:10 2005
+++ loncom/interface/groupsort.pm Fri Jun 10 21:06:54 2005
@@ -2,7 +2,7 @@
# The LON-CAPA group sort handler
# Allows for sorting prior to import into RAT.
#
-# $Id: groupsort.pm,v 1.37 2005/06/10 20:43:10 www Exp $
+# $Id: groupsort.pm,v 1.38 2005/06/11 01:06:54 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -351,7 +351,7 @@
my $ctr = 0;
my $clen = scalar(keys %shash);
- if ($clen > 1) {
+ if (($clen > 1) || ($env{'form.readfile'})) {
my %lt=&Apache::lonlocal::texthash(
'fin'=> 'Finalize order of resources',
'gb' => 'Go Back',
@@ -421,7 +421,7 @@
my $key=$_;
$ctr++;
my $iconname=&Apache::loncommon::icon($key);
- if ($clen > 1) {
+ if (($clen > 1) || ($env{'form.readfile'})) {
$r->print("<tr><td bgcolor='$fileclr'>");
if ($env{'form.readfile'}) {
$r->print(&checkbox($ctr-1));
@@ -430,7 +430,7 @@
}
}
$r->print(&hidden($ctr-1,$thash{$key},$key));
- if ($clen > 1) {
+ if (($clen > 1) || ($env{'form.readfile'})) {
$r->print("</td>");
unless ($env{'form.readfile'}) {
$r->print("<td bgcolor='$fileclr'>".
@@ -444,7 +444,7 @@
$r->print("$key</td></tr>\n");
}
}
- if ($clen > 1) {
+ if (($clen > 1) || ($env{'form.readfile'})) {
$r->print("</table></td></tr></table></form>");
} else {
$r->print(<<END);
Index: rat/client/ratcode.js
diff -u rat/client/ratcode.js:1.3 rat/client/ratcode.js:1.4
--- rat/client/ratcode.js:1.3 Wed Jun 8 17:13:06 2005
+++ rat/client/ratcode.js Fri Jun 10 21:06:54 2005
@@ -1,7 +1,7 @@
<!--
The LearningOnline Network
Resource Assembly Tool
-// $Id: ratcode.js,v 1.3 2005/06/08 21:13:06 www Exp $
+// $Id: ratcode.js,v 1.4 2005/06/11 01:06:54 www Exp $
//
// Copyright Michigan State University Board of Trustees
//
@@ -1672,6 +1672,14 @@
idx=open("/res/?launch=1&mode=rat&catalogmode="+mode,"idxout",options);
idx.focus();
}
+// -------------------------------------------------------- Open zombie window
+function groupopen(url) {
+ var options="scrollbars=1,resizable=1,menubar=0";
+ idxmode=mode;
+ idxflag=1;
+ idx=open("/adm/groupsort?mode=rat&recover=1&readfile="+url,"idxout",options);
+ idx.focus();
+}
// ------------------------------------------------- Open browser to select map
var editbrowser;
function openbrowser(formname,elementname,only,omit) {