[LON-CAPA-cvs] cvs: loncom(version_2_2_X) /interface portfolio.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 28 Jun 2006 19:53:15 -0000


albertel		Wed Jun 28 15:53:15 2006 EDT

  Modified files:              (Branch: version_2_2_X)
    /loncom/interface	portfolio.pm 
  Log:
  - backport 1.124
  
  
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.121.2.1 loncom/interface/portfolio.pm:1.121.2.2
--- loncom/interface/portfolio.pm:1.121.2.1	Tue Jun 27 11:38:08 2006
+++ loncom/interface/portfolio.pm	Wed Jun 28 15:53:15 2006
@@ -219,7 +219,7 @@
                 }
                my $fullpath = $current_path.$filename;
                 $fullpath = &prepend_group($fullpath,$group);
-                if ($select_mode eq 'true'){
+                if ($select_mode eq 'true') {
                     $line='<td><input type="checkbox" name="checkfile" value="'.$filename.'"';
 		    if ($$checked_files{$filename} eq 'selected') {
                         $line.=" checked ";
@@ -246,51 +246,55 @@
                         }
                         $line .= '</td>';
                     }
-		    $r->print('<tr class="'.$css_class.'">');
-		    $r->print($line);
                 }
-                my $curr_access;
-                my $pub_access = 0;
-                my $guest_access = 0;
-                my $cond_access = 0;
-                foreach my $key (sort(keys(%{$access_controls{$fullpath}}))) {
-                    my ($num,$scope,$end,$start) = &unpack_acc_key($key);
-                    if (($now > $start) && (!$end || $end > $now)) {
-                        if ($scope eq 'public')  {
-                            $pub_access = 1;
-                        } elsif ($scope eq 'guest') {
-                            $guest_access = 1;
-                        } else {
-                            $cond_access = 1;
-                        }
-                    }
-                }
-                if (!$pub_access && !$guest_access && !$cond_access) {
-                    $curr_access = &mt('Private');
-                } else {
-                    my @allaccesses; 
-                    if ($pub_access) {
-                        push(@allaccesses,&mt('Public'));
-                    }
-                    if ($guest_access) {
-                        push(@allaccesses,&mt('Passphrase-protected'));
-                    }
-                    if ($cond_access) {
-                        push(@allaccesses,&mt('Conditional'));
-                    }
-                    $curr_access = join('+ ',@allaccesses);
-                }
-                $r->print('<td><img alt="" src="'.&Apache::loncommon::icon($filename).'" /></td>');
-                $r->print('<td><a href="'.$href_location.$filename.'">'.
-			    $filename.'</a></td>'); 
-                $r->print('<td>'.$size.'</td>');
-                $r->print('<td>'.&Apache::lonlocal::locallocaltime($mtime).'</td>');
-                $r->print('<td><span style="white-space: nowrap">'.
-                          &mt($curr_access).'&nbsp;&nbsp;&nbsp;');
-                $r->print('<a href="'.$url.'?access='.$filename.
-                              '&amp;currentpath='.$current_path.$groupecho.
-                              '">'.$access_admin_text.'</a>');
-                $r->print('</span></td></tr>');
+		$r->print('<tr class="'.$css_class.'">');
+		$r->print($line);
+		my $curr_access;
+		if ($select_mode ne 'true') {
+		    my $pub_access = 0;
+		    my $guest_access = 0;
+		    my $cond_access = 0;
+		    foreach my $key (sort(keys(%{$access_controls{$fullpath}}))) {
+			my ($num,$scope,$end,$start) = &unpack_acc_key($key);
+			if (($now > $start) && (!$end || $end > $now)) {
+			    if ($scope eq 'public')  {
+				$pub_access = 1;
+			    } elsif ($scope eq 'guest') {
+				$guest_access = 1;
+			    } else {
+				$cond_access = 1;
+			    }
+			}
+		    }
+		    if (!$pub_access && !$guest_access && !$cond_access) {
+			$curr_access = &mt('Private');
+		    } else {
+			my @allaccesses; 
+			if ($pub_access) {
+			    push(@allaccesses,&mt('Public'));
+			}
+			if ($guest_access) {
+			    push(@allaccesses,&mt('Passphrase-protected'));
+			}
+			if ($cond_access) {
+			    push(@allaccesses,&mt('Conditional'));
+			}
+			$curr_access = join('+ ',@allaccesses);
+		    }
+		}
+		$r->print('<td><img alt="" src="'.&Apache::loncommon::icon($filename).'" /></td>');
+		$r->print('<td><a href="'.$href_location.$filename.'">'.
+			  $filename.'</a></td>'); 
+		$r->print('<td>'.$size.'</td>');
+		$r->print('<td>'.&Apache::lonlocal::locallocaltime($mtime).'</td>');
+		if ($select_mode ne 'true') {
+		    $r->print('<td><span style="white-space: nowrap">'.
+			      &mt($curr_access).'&nbsp;&nbsp;&nbsp;');
+		    $r->print('<a href="'.$url.'?access='.$filename.
+			      '&amp;currentpath='.$current_path.$groupecho.
+			      '">'.$access_admin_text.'</a></span>');
+		}
+		$r->print('</td></tr>'.$/);
             }
         }
     }