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

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 23 Dec 2004 17:28:31 -0000


raeburn		Thu Dec 23 12:28:31 2004 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  If user has an active co-author role for construction space where source for a particular problem used in a course is stored, he/she will no longer be permitted to export source code for the problem when exporting the course to IMS; HTML of the rendered problem will be exported instead.
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.159 loncom/interface/londocs.pm:1.160
--- loncom/interface/londocs.pm:1.159	Thu Dec 23 11:31:27 2004
+++ loncom/interface/londocs.pm	Thu Dec 23 12:28:31 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.159 2004/12/23 16:31:27 raeburn Exp $
+# $Id: londocs.pm,v 1.160 2004/12/23 17:28:31 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -658,7 +658,6 @@
     my $content_type;
     my $message;
 # find where user is author or co-author
-    my %roleshash = &Apache::lonnet::get_my_roles();
     my @uploads = ();
     if ($curRes->is_sequence()) {
         $content_type = 'sequence';
@@ -714,14 +713,6 @@
         my $canedit = 0;
         if ($2 eq $ENV{'user.domain'} && $3 eq $ENV{'user.name'})  {
             $canedit= 1;
-        } elsif (defined($roleshash{$coauth})) {
-            if ($roleshash{$coauth} =~ /(\d+):(\d+)/) {
-                if (($1 < time || $1 == 0) && ($2 == 0 || $2 >= time)) {
-                    $canedit = 1;
-                }
-            } elsif ($roleshash{$coauth} eq ':') {
-                $canedit = 1;
-            }
         }
         if ($canedit) {
             $$content_file = &replicate_content($cdom,$cnum,$tempexport,$symb,$count,\$message,$href,'resource');