--- loncom/interface/lonfeedback.pm 2004/09/13 12:19:14 1.124 +++ loncom/interface/lonfeedback.pm 2004/09/13 12:49:42 1.125 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.124 2004/09/13 12:19:14 raeburn Exp $ +# $Id: lonfeedback.pm,v 1.125 2004/09/13 12:49:42 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -332,7 +332,6 @@ sub list_discussion { # open manifest file my $manifest = '/imsmanifest.xml'; my $manifestfilename = $tempexport.$manifest; - print STDERR "manifestfilename is $manifestfilename\n"; if ($manifestfile = Apache::File->new('>'.$manifestfilename)) { $manifestok=1; print $manifestfile qq| @@ -482,7 +481,6 @@ imscp_v1p1.xsd http://www.imsglobal.org/ my $postfilename = $alldiscussion{$_}.'-'.$imsitems{$alldiscussion{$_}}{'timestamp'}.'.html'; if ($manifestok) { if (($depth[$alldiscussion{$_}] <= $currdepth) && ($alldiscussion{$_} != $firstidx)) { - print STDERR "depth is $depth[$alldiscussion{$_}], currdepth is $currdepth, idx is $alldiscussion{$_}, firstidx is $firstidx\n"; print $manifestfile ' '."\n"; } $currdepth = $depth[$alldiscussion{$_}]; @@ -608,7 +606,7 @@ END undef(%oldENV); $discussion .= 'Download the zip file from Discussion Posting Archive
'; if ($copyresult) { - $discussion .= 'The following errors occurred during export - '.$copyresult; + $discussion .= 'The following errors occurred during export -
'.$copyresult; } } else { $discussion .= '
Unfortunately you will not be able to retrieve an archive of the discussion posts at this time, because there was a problem creating a manifest file.
'; @@ -1159,22 +1157,23 @@ sub replicate_attachments { $i ++; } my ($content,$rtncode); - print STDERR "File to replicate is $$attachrefs{$id}{'filename'} in $1,$2\n"; my $uploadreply = &Apache::lonnet::getuploaded('GET',$$attachrefs{$id}{'filename'},$1,$2,$content,$rtncode); if ($uploadreply eq 'ok') { - my $attachcopy; - if ($attachcopy = Apache::File->new('>'.$destination)) { - print $attachcopy $content; - close($attachcopy); - } else { - $response .= 'Error copying a file attachment to IMS package: '.$!.'
'."\n"; - } + my $attachcopy; + if ($attachcopy = Apache::File->new('>'.$destination)) { + print $attachcopy $content; + close($attachcopy); + } else { + $response .= 'Error copying file attachment - '.$5.' to IMS package: '.$!.'
'."\n"; + } } else { - print STDERR "return code from lonnet was $rtncode\n"; + &Apache::lonnet::logthis("Replication of attachment failed when building IMS export of discussion posts - domain: $1, course: $2, file: $$attachrefs{$id}{'filename'} -error: $rtncode"); + $response .= 'Error copying file attachment - '.$5.' to IMS package: '.$rtncode.'
'."\n"; } } } } + return $response; } sub mail_screen {