Diff for /loncom/interface/lonfeedback.pm between versions 1.375 and 1.376

version 1.375, 2017/11/08 00:36:56 version 1.376, 2017/11/12 17:41:32
Line 44  use HTML::LCParser(); Line 44  use HTML::LCParser();
 #use HTML::Tidy::libXML;  #use HTML::Tidy::libXML;
 use Apache::lonspeller();  use Apache::lonspeller();
 use Apache::longroup;  use Apache::longroup;
 use Cwd;  use Archive::Zip qw( :ERROR_CODES );
 use LONCAPA qw(:DEFAULT :match);  use LONCAPA qw(:DEFAULT :match);
   
 sub discussion_open {  sub discussion_open {
Line 702  END Line 702  END
                         my $imszipfile = '/prtspool/'.                          my $imszipfile = '/prtspool/'.
                                       join('_',$env{'user.name'},$env{'user.domain'},$now).                                        join('_',$env{'user.name'},$env{'user.domain'},$now).
                                       '_'.rand(1000000000).'.zip';                                        '_'.rand(1000000000).'.zip';
                         my $cwd = &getcwd();                           my $zip = Archive::Zip->new();
                           $zip->addTree($tempexport);
                         my $imszip = '/home/httpd/'.$imszipfile;                          my $imszip = '/home/httpd/'.$imszipfile;
                         chdir $tempexport;                          if ($zip->writeToFileNamed($imszip) == AZ_OK) { 
                         open(OUTPUT, "zip -r $imszip *  2> /dev/null |");                              $discussion .= &mt('Download the zip file from [_1]Discussion Posting Archive[_2]',
                         close(OUTPUT);  
                         chdir $cwd;  
                         $discussion .= &mt('Download the zip file from [_1]Discussion Posting Archive[_2]',  
                                            '<a href="'.$imszipfile.'">','</a>').'<br />';                                             '<a href="'.$imszipfile.'">','</a>').'<br />';
                           } else {
                               $discussion .=  &mt('Failed to create zip file').'<br />';
                           }
                         if ($copyresult) {                          if ($copyresult) {
                             $discussion .= '<span class="LC_error">'.                              $discussion .= '<span class="LC_error">'.
                                            &mt('The following errors occurred during export:').                                             &mt('The following errors occurred during export:').

Removed from v.1.375  
changed lines
  Added in v.1.376


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>