--- loncom/imspackages/imsimportdocs.pm 2006/03/23 23:12:21 1.15 +++ loncom/imspackages/imsimportdocs.pm 2009/11/20 14:39:32 1.26 @@ -1,3 +1,7 @@ +# The LearningOnline Network with CAPA +# +# $Id: imsimportdocs.pm,v 1.26 2009/11/20 14:39:32 bisitz Exp $ +# # Copyright Michigan State University Board of Trustees # # This file is part of the LearningOnline Network with CAPA (LON-CAPA). @@ -30,6 +34,10 @@ use Apache::loncommon; use Apache::lonlocal; use Apache::imsprocessor; use LONCAPA::Configuration; +use LONCAPA::map(); +use lib '/home/httpd/lib/perl/'; +use LONCAPA; + use strict; sub jscript_one { @@ -150,16 +158,22 @@ sub handler { my $uname=$env{'user.name'}; my $udom=$env{'user.domain'}; - my $plainname=&Apache::lonnet::escape( + my $plainname=&escape( &Apache::loncommon::plainname($uname,$udom)); # does this user have privileges to post, etc? my $allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'}); unless ($allowed) { $r->print(&Apache::loncommon::start_page('Import IMS package',undef, - {'only_body' => 1,})); - $r->print('
' + .&mt('Modification of Course Contents Disallowed') + .'
' + .&mt('Your current role does not grant you the right to modify course content in this course.') + .'
' + .&Apache::loncommon::end_page() + ); return OK; } @@ -175,11 +189,13 @@ sub handler { } $javascript = - "\n"; - my $start_page = &Apache::loncommon::start_page('Import IMS package', - $javascript, - {'only_body' => 1,}); + "\n"; + my $headline = 'Import IMS package'; + my $start_page = &Apache::loncommon::start_page($headline, + $javascript, + {'only_body' => 1,}) + .'
-
|
-