[LON-CAPA-cvs] cvs: rat / lonratedt.pm loncom/interface groupsort.pm londocs.pm

www lon-capa-cvs@mail.lon-capa.org
Fri, 10 Jun 2005 16:56:11 -0000


www		Fri Jun 10 12:56:11 2005 EDT

  Modified files:              
    /loncom/interface	groupsort.pm londocs.pm 
    /rat	lonratedt.pm 
  Log:
  Saving my work on zombie rehab
  
  
Index: loncom/interface/groupsort.pm
diff -u loncom/interface/groupsort.pm:1.35 loncom/interface/groupsort.pm:1.36
--- loncom/interface/groupsort.pm:1.35	Fri Jun 10 11:17:35 2005
+++ loncom/interface/groupsort.pm	Fri Jun 10 12:56:08 2005
@@ -2,7 +2,7 @@
 # The LON-CAPA group sort handler
 # Allows for sorting prior to import into RAT.
 #
-# $Id: groupsort.pm,v 1.35 2005/06/10 15:17:35 www Exp $
+# $Id: groupsort.pm,v 1.36 2005/06/10 16:56:08 www Exp $
 # 
 # Copyright Michigan State University Board of Trustees
 #
@@ -360,6 +360,8 @@
 <input type="hidden" name="oldval" value="" />
 <input type="hidden" name="newval" value="" />
 <input type="hidden" name="mode" value="$env{'form.mode'}" />
+<input type="hidden" name="readfile" value="$env{'form.readfile'}" />
+<input type="hidden" name="recover" value="$env{'form.recover'}" />
 END
 
         # --- Expand here if "GO BACK" button desired
@@ -414,7 +416,7 @@
 	    $r->print("</td><td bgcolor='$fileclr'>");
 	    $r->print("<img src='$iconname' />");
 	    $r->print("</td><td bgcolor='$fileclr'>");
-	    $r->print("$thash{$key}</td><td bgcolor='$fileclr'>\n");
+	    $r->print("$thash{$key}$nhash{$key}</td><td bgcolor='$fileclr'>\n");
 	    $r->print("$key</td></tr>\n");
 	} 
     }
@@ -470,7 +472,7 @@
     my $string;
     $string = '<select name="alt'.$sel.'"';
     $string .= " onChange='selectchange($sel)'>";
-    $string .= "<option name='o0' value='0'>remove</option>";
+    $string .= "<option name='o0' value='0'>".&mt('discard')."</option>";
     for my $cur (1..$total) {
 	$string .= "<option name='o$cur' value='$cur'";
 	if ($cur == $sel) {
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.185 loncom/interface/londocs.pm:1.186
--- loncom/interface/londocs.pm:1.185	Fri Jun 10 11:33:45 2005
+++ loncom/interface/londocs.pm	Fri Jun 10 12:56:08 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.185 2005/06/10 15:33:45 www Exp $
+# $Id: londocs.pm,v 1.186 2005/06/10 16:56:08 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2120,7 +2120,7 @@
 }
 
 function cutres(folderpath,index,oldtitle,container,pagesymb) {
-    if (confirm('WARNING: Cutting a resource makes associated grades and scores inaccessible,\\neven if it is pasted in again elsewhere!\\nCut "'+oldtitle+'"?')) {
+    if (confirm('WARNING: Cutting a resource makes associated grades and scores inaccessible!\\nGrades remain inaccessible if resource is pasted into another folder.\\nCut "'+oldtitle+'"?')) {
 	this.document.forms.renameform.cmd.value='cut_'+index;
 	this.document.forms.renameform.markcopy.value=index;
         if (container == 'sequence') {
@@ -2169,6 +2169,7 @@
                 'impo' => 'Import',
                 'selm' => 'Select Map',
                 'load' => 'Load Map',
+                'reco' => 'Recover Deleted Resources',
                 'newf' => 'New Folder',
                 'newp' => 'New Composite Page',
                 'extr' => 'External Resource',
@@ -2259,7 +2260,11 @@
                      '.sequence';
        my $pageseq = '/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time.
                      '.page';
-
+	my $container='sequence';
+	if ($env{'form.pagepath'}) {
+	    $container='page';
+	}
+	my $readfile='/uploaded/'.$coursedom.'/'.$coursenum.'/'.$folder.'.'.$container;
        $r->print(<<ENDFORM);
 <table cellspacing=4 cellpadding=4><tr>
 <th bgcolor="#DDDDDD">$lt{'uplm'}</th>
@@ -2300,6 +2305,10 @@
 $help{'Load_Map'}</nobr>
 </p>
 </form>
+<hr />
+<form action="/adm/groupsort" method="post" name="recover">
+<input type="button" name="recovermap" onClick="javascript:groupopen('$readfile',1)" value="$lt{'reco'}" />
+</form>
 ENDFORM
        unless ($env{'form.pagepath'}) {
 	   $r->print(<<ENDFORM);
Index: rat/lonratedt.pm
diff -u rat/lonratedt.pm:1.72 rat/lonratedt.pm:1.73
--- rat/lonratedt.pm:1.72	Thu Jun  9 17:40:37 2005
+++ rat/lonratedt.pm	Fri Jun 10 12:56:08 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Edit Handler for RAT Maps
 #
-# $Id: lonratedt.pm,v 1.72 2005/06/09 21:40:37 www Exp $
+# $Id: lonratedt.pm,v 1.73 2005/06/10 16:56:08 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -689,6 +689,14 @@
    idx.focus();
 }
 
+// ------------------------------------------------------ Open groupsort window
+function groupopen(url,recover) {
+   var options="scrollbars=1,resizable=1,menubar=0";
+   idxflag=1;
+   idx=open("/adm/groupsort?mode=$mode&recover="+recover+"&readfile="+url,"idxout",options);
+   idx.focus();
+}
+
 // --------------------------------------------------------- Open search window
 function srchopen(mode) {
    var options="scrollbars=1,resizable=1,menubar=0";
@@ -705,6 +713,7 @@
 function groupimport() {
    idxcheck('groupimport');
 }
+
 // ------------------------------------------------------- Do srch status check
 function srchcheck(mode) {
    if (!srch || srch.closed || srchmode!=mode) {