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

www lon-capa-cvs@mail.lon-capa.org
Fri, 05 Jan 2007 18:45:41 -0000


www		Fri Jan  5 13:45:41 2007 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  Don't let people cut or copy Simple Problems
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.266 loncom/interface/londocs.pm:1.267
--- loncom/interface/londocs.pm:1.266	Fri Jan  5 12:55:41 2007
+++ loncom/interface/londocs.pm	Fri Jan  5 13:45:40 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.266 2007/01/05 17:55:41 albertel Exp $
+# $Id: londocs.pm,v 1.267 2007/01/05 18:45:40 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1704,13 +1704,19 @@
 		}
 	    }
 	}
+        if ($url=~/^\/res\/lib\/templates\//) { $nocopy=1; }
         my $copylink=' ';
+        my $cutlink=' ';
         if ($env{'form.pagepath'}) {
            unless ($nocopy) {
                $copylink=(<<ENDCOPY);
 <a href='javascript:markcopy("$pagepath","$index","$renametitle","page","$pagesymb");'>
 <font size="-2" color="#000099">$lt{'cp'}</font></a></td>
 ENDCOPY
+               $cutlink=(<<ENDCUT);
+<a href='javascript:cutres("$pagepath","$index","$renametitle","page","$pagesymb");'>
+<font size="-2" color="#550044">$lt{'ct'}</font></a>
+ENDCUT
             }
             $line.=(<<END);
 <form name="entry_$index" action="/adm/coursedocs" method="post">
@@ -1732,8 +1738,7 @@
 </td><td bgcolor="#DDDDDD">
 <a href='javascript:removeres("$pagepath","$index","$renametitle","page","$pagesymb");'>
 <font size="-2" color="#990000">$lt{'rm'}</font></a>
-<a href='javascript:cutres("$pagepath","$index","$renametitle","page","$pagesymb");'>
-<font size="-2" color="#550044">$lt{'ct'}</font></a>
+$cutlink
 <a href='javascript:changename("$pagepath","$index","$renametitle","page","$pagesymb");'>
 <font size="-2" color="#009900">$lt{'rn'}</font></a>
 $copylink
@@ -1744,6 +1749,10 @@
 <a href='javascript:markcopy("$folderpath","$index","$renametitle","sequence");'>
 <font size="-2" color="#000099">$lt{'cp'}</font></a></td>
 ENDCOPY
+               $cutlink=(<<ENDCUT);
+<a href='javascript:cutres("$folderpath","$index","$renametitle","sequence");'>
+<font size="-2" color="#550044">$lt{'ct'}</font></a>
+ENDCUT
             }
             $line.=(<<END); 
 <form name="entry_$index" action="/adm/coursedocs" method="post">
@@ -1764,8 +1773,7 @@
 </td><td bgcolor="#DDDDDD">
 <a href='javascript:removeres("$folderpath","$index","$renametitle","sequence");'>
 <font size="-2" color="#990000">$lt{'rm'}</font></a>
-<a href='javascript:cutres("$folderpath","$index","$renametitle","sequence");'>
-<font size="-2" color="#550044">$lt{'ct'}</font></a>
+$cutlink
 <a href='javascript:changename("$folderpath","$index","$renametitle","sequence");'>
 <font size="-2" color="#009900">$lt{'rn'}</font></a>
 $copylink