--- loncom/interface/londocs.pm 2007/06/15 19:12:56 1.277 +++ loncom/interface/londocs.pm 2007/06/16 17:42:24 1.278 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.277 2007/06/15 19:12:56 albertel Exp $ +# $Id: londocs.pm,v 1.278 2007/06/16 17:42:24 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1446,13 +1446,14 @@ sub editor { $r->print('

'.&mt('Caution: this folder is set to randomly pick a subset of resources. Adding or removing resources from this folder will change the set of resources that the students see, resulting in spurious or missing credit for completed problems, not limited to ones you modify. Do not modify the contents of this folder if it is in active student use.').'

'); } $r->print(''); - foreach (@LONCAPA::map::order) { - my ($name,$url)=split(/\:/,$LONCAPA::map::resources[$_]); + foreach my $res (@LONCAPA::map::order) { + my ($name,$url)=split(/\:/,$LONCAPA::map::resources[$res]); $name=&LONCAPA::map::qtescape($name); $url=&LONCAPA::map::qtescape($url); unless ($name) { $name=(split(/\//,$url))[-1]; } unless ($name) { $idx++; next; } - $r->print(&entryline($idx,$name,$url,$folder,$allowed,$_,$coursenum)); + $r->print(&entryline($idx,$name,$url,$folder,$allowed,$res, + $coursenum)); $idx++; $shown++; } @@ -1466,11 +1467,19 @@ sub editor { ENDPASTE - $r->print( - ' '.&Apache::loncommon::filedescription( - (split(/\./,$env{'form.markedcopy_url'}))[-1]).': '. - $env{'form.markedcopy_title'}); + $r->print(' '); + + my $type; + if ($env{'form.markedcopy_url'} =~ m{^/adm/wrapper/ext}) { + $type = &mt('External Resource'); + $r->print($type.': '. $env{'form.markedcopy_title'}); + } else { + my $extension = (split(/\./,$env{'form.markedcopy_url'}))[-1]; + my $type = &Apache::loncommon::filedescription($extension); + my $icon = ''; + $r->print($icon.$type.': '. $env{'form.markedcopy_title'}); + } if ($container eq 'page') { $r->print(<