--- loncom/interface/groupsort.pm 2010/08/24 09:11:37 1.67 +++ loncom/interface/groupsort.pm 2012/06/30 23:02:20 1.69 @@ -2,7 +2,7 @@ # The LON-CAPA group sort handler # Allows for sorting prior to import into RAT. # -# $Id: groupsort.pm,v 1.67 2010/08/24 09:11:37 wenzelju Exp $ +# $Id: groupsort.pm,v 1.69 2012/06/30 23:02:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -37,7 +37,7 @@ use GDBM_File; use Apache::loncommon; use Apache::lonlocal; use Apache::lonnet; -use LONCAPA; +use LONCAPA qw(:DEFAULT :match); my $iconpath; # variable to be accessible to multiple subroutines my %hash; # variable to tie to user specific database @@ -86,8 +86,8 @@ sub update_actions_hash { sub readfromdb { my ($r,$resources)=@_; - my $diropendb = - "/home/httpd/perl/tmp/$env{'user.domain'}_$env{'user.name'}_sel_res.db"; + my $diropendb = LONCAPA::tempdir() . + "$env{'user.domain'}_$env{'user.name'}_sel_res.db"; # ----------------------------- diropendb is now the filename of the db to open if (tie(%hash,'GDBM_File',$diropendb,&GDBM_WRCREAT(),0640)) { @@ -411,7 +411,14 @@ END $r->print(""); $r->print(""); $r->print(""); - $r->print($resource->{'title'}.$resource->{'notes'}."\n"); + if (($env{'form.recover'}) && + ($resource->{'url'} =~ m{/uploaded/$match_domain/$match_courseid/supplemental/})) { + my $title = &Apache::loncommon::parse_supplemental_title($resource->{'title'}); + $r->print($title); + } else { + $r->print($resource->{'title'}); + } + $r->print($resource->{'notes'}."\n"); $r->print($resource->{'url'}."" .&Apache::loncommon::end_data_table_row() ."\n");