--- loncom/interface/lonpdfupload.pm 2008/09/09 13:56:44 1.1
+++ loncom/interface/lonpdfupload.pm 2009/04/03 15:40:17 1.2
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpdfupload.pm,v 1.1 2008/09/09 13:56:44 onken Exp $
+# $Id: lonpdfupload.pm,v 1.2 2009/04/03 15:40:17 onken Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -46,45 +46,48 @@ use Apache::lonmsg();
use Apache::lonhomework;
use LONCAPA::Enrollment;
use LONCAPA::Configuration;
+use CAM::PDF;
use strict;
sub handler() {
- my $r = shift;
+ my $r = shift;
- #Testen ob der Benutzer ein gültiges Cookie besitzt
- if(!&checkpermission($r)) {
- return OK;
- }
+ # check user permissions
+ if(!&checkpermission($r)) {
+ # stop processing
+ return OK;
+ }
- $Apache::lonxml::request=$r;
- $Apache::lonxml::debug=$env{'user.debug'};
- $env{'request.uri'}=$r->uri;
-
- $r->content_type('text/html');
- $r->send_http_header();
- $r->print(&Apache::loncommon::start_page('Upload-PDF-Form'));
-
- #lade die per POST gesendenten daten in env
- &Apache::lonacc::get_posted_cgi($r);
-
- if($env{'form.Uploaded'} && $env{'form.file'}) {
- #Upload-Formular wurde gesendet
- $r->print(&processPDF);
-
- } else {
- #erster Aufruf Upload-Formular wird ausgeben
- $r->print(&get_javascripts);
- $r->print(&get_uploadform);
-
- }
-
- #&dumpenv($r); #debug -> prints the environment
- $r->print("
".&mt("Navigate Contents")."
");
- $r->print("