--- loncom/imspackages/imsimport.pm 2006/04/04 08:18:33 1.19 +++ loncom/imspackages/imsimport.pm 2006/11/27 16:37:36 1.21 @@ -34,15 +34,21 @@ use HTML::Entities(); use Apache::lonlocal; use Apache::lonupload; use File::Basename(); - +use LONCAPA; + # ---------------------------------------------------------------- Jscript One sub jscript_one { my ($fullpath,$jsref) = @_; + my %body_layout = ('rightmargin' => "0", + 'leftmargin' => "0", + 'marginwidth' => "0", + 'topmargin' => "0", + 'marginheight' => "0"); my $start_page = &Apache::loncommon::start_page('Create IMS import directory',undef, {'only_body' => 1, - 'add_entries' => "topmargin='0' leftmargin='0' marginheight='0'marginwidth='0' rightmargin='0'", + 'add_entries' => \%body_layout, 'js_ready' => 1,}); my $end_page = &Apache::loncommon::end_page({'js_ready' => 1,}); @@ -752,7 +758,7 @@ sub get_ccroles { my @crslist = (); my %descrip =(); foreach my $key (keys %roles ) { - if ($key =~ m/^\/(\w+)\/(\w+)_cc$/) { + if ($key =~ m{^/($LONCAPA::domain_re)/($LONCAPA::username_re)_cc$}) { my $cdom = $1; my $crs = $2; my $role_end = 0; @@ -821,7 +827,6 @@ sub handler { my $javascript = ''; my $page_name = ''; my $current_page = ''; - my $loadentries = ''; my $qcount = ''; # get personal information for this user @@ -864,7 +869,6 @@ sub handler { unless ($pathname eq '/') { $fullpath .= '/'; } - my $loadentries = ''; my @areas = (); my %cmsmap = (); @@ -886,9 +890,7 @@ sub handler { $javascript = "\n"; my $title = 'Upload IMS package to Construction Space'; - $r->print(&Apache::loncommon::start_page($title, $javascript, - {'add_entries' => - $loadentries,})); + $r->print(&Apache::loncommon::start_page($title, $javascript)); if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { $r->print('

'.&mt('Co-Author').': '.$uname.