--- loncom/interface/londocs.pm 2009/05/23 20:43:24 1.368 +++ loncom/interface/londocs.pm 2009/06/05 10:51:13 1.369 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.368 2009/05/23 20:43:24 truskell Exp $ +# $Id: londocs.pm,v 1.369 2009/06/05 10:51:13 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -142,7 +142,7 @@ sub dumpcourse { my ($r) = @_; my $type = &Apache::loncommon::course_type(); $r->print(&Apache::loncommon::start_page('Dump '.$type.' DOCS to Construction Space'). - '
'); + ''); $r->print(&Apache::lonhtmlcommon::breadcrumbs('Dump '.$type.' DOCS to Construction Space')); my ($home,$other,%outhash)=&authorhosts(); unless ($home) { return ''; } @@ -321,9 +321,15 @@ sub exportcourse { open(OUTPUT, "zip -r $imszip * 2> /dev/null |"); close(OUTPUT); chdir $cwd; - $outcome .= &mt('Download the zip file from IMS '.lc($type).' archive
',$imszipfile,); + $outcome .= '

' + .&mt('Download the zip file from [_1]IMS '.lc($type).' archive[_2]' + ,'','') + .'

'; if ($copyresult) { - $outcome .= &mt('The following errors occurred during export - [_1]',$copyresult); + $outcome .= '

' + .&mt('The following errors occurred during export - [_1]' + ,$copyresult) + .'

'; } } else { $outcome = '
'.&mt('Unfortunately you will not be able to retrieve an IMS archive of this posts at this time, because there was a problem creating a manifest file.').'
'; @@ -335,21 +341,23 @@ sub exportcourse { $r->print(&Apache::loncommon::end_page()); } else { my $display; - $display = ''."\n"; - $display .= &mt('Choose which items you wish to export from your '.$type.'.

'); - $display .= ''. - ''. - ''. - ''. - '
 Content items'. - ''; + $display .= '
'. + ''.&mt('Content items').''. + ''. - '  
  
 Discussion posts'. - '
'. + '
'. + ''.&mt('Discussion posts').''. + ''. - '  
'; + '  '. + ''; my $curRes; my $depth = 0; my $count = 0; @@ -358,13 +366,17 @@ sub exportcourse { my %parent = (); my %children = (); my $lastcontainer = $startcount; - my @bgcolors = ('#F6F6F6','#FFFFFF'); - $display .= ''. - '' + .''; + $display .= '' + .&Apache::loncommon::end_data_table_header_row(); while ($curRes = $it->next()) { if (ref($curRes)) { $count ++; @@ -385,16 +397,17 @@ sub exportcourse { $ressymb = 'bulletin___'.$3.'___adm/wrapper/adm/'.$1.'/'.$2.'/'.$3.'/bulletinboard'; } } - my $color = $count%2; - $display .=''; + $display .= ' '.$curRes->title().''."\n"; + + # Existing discussion posts? if ($discussiontime{$ressymb} > 0) { $boards ++; $currelem = $count+$boards+$startcount; - $display .= ''."\n"; + $display .= ''."\n"; } else { - $display .= ''."\n"; + $display .= ''."\n"; } + $display .= &Apache::loncommon::end_data_table_row(); } } + $display .= &Apache::loncommon::end_data_table(); my $scripttag = qq| - |; $r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package', $scripttag)); $r->print(&Apache::lonhtmlcommon::breadcrumbs('Export '.lc($type).' to IMS content package')); - $r->print($display.'
Export content item?
 '."\n"; + $display .= &Apache::loncommon::start_data_table() + .&Apache::loncommon::start_data_table_header_row() + .''.&mt('Export content item?').''; if ($numdisc > 0) { - $display.='Export discussion posts?'."\n"; + $display .= &mt('Export discussion posts?'); + } else { + $display .= ' '; } - $display.=' 
'."\n". - ''."\n" + .'is_sequence()) || ($curRes->is_page())) { my $checkitem = $count + $boards + $startcount; - $display .= 'onClick="javascript:propagateCheck('."'$checkitem'".')"'; + $display .= 'onclick="javascript:propagateCheck('."'$checkitem'".')"'; } $display .= ' />'."\n"; for (my $i=0; $i<$depth; $i++) { - $display .= ''."\n"; + $display .= '' + .''."\n"; } if ($curRes->is_sequence()) { $display .= ' '."\n"; @@ -405,19 +418,25 @@ sub exportcourse { } my $currelem = $count+$boards+$startcount; $children{$parent{$depth}} .= $currelem.':'; - $display .= ' '.$curRes->title().'  ' + .'' + .'  
'. + $r->print($display. '

'. '

'); @@ -1961,7 +1980,7 @@ END my $ro_set= ((&LONCAPA::map::getparameter($orderidx,'parameter_randomorder'))[0]=~/^yes$/i?' checked="checked"':''); $rand_order_text =' -'; +'; } if ($ispage) { my $pagename=&escape($pagetitle); @@ -2005,12 +2024,12 @@ END $line.=(< $form_start - + $form_end $form_start - + $form_end $form_start $rand_order_text $form_end @@ -2093,7 +2112,7 @@ sub checkonthis { if (($errorcount) || ($warningcount)) { if ($errorcount) { - $r->print(''. + $r->print(''.&mt('bomb').''. &mt('[quant,_1,error]',$errorcount).''); } if ($warningcount) { @@ -2483,13 +2502,17 @@ sub changewarning { $message='Changes will become active for your current session after [_1], or the next time you log in.'; } $r->print("\n\n". -''."\n". +''."\n". '
'. '

'. &mt($message,' '). + &mt('re-initializing '.$course_type).'" onclick="reinit(this.form)" />'). $help{'Caching'}.'

'."\n\n"); } @@ -2646,7 +2669,11 @@ sub handler { $script .= &editing_js($udom,$uname); } # -------------------------------------------------------------------- Body tag - $script = ''; + $script = ''; my $brcrum = [{href=>"/adm/createuser",text=>"$type Documents"}]; $r->print(&Apache::loncommon::start_page("$type Documents", $script, {'force_register' => $showdoc, @@ -2820,20 +2847,20 @@ FUFORM
$lt{'pubd'}
$uploadtag - +
- + $help{'Importing_LON-CAPA_Resource'}
- +

$lt{'copm'}

$help{'Load_Map'}

@@ -2845,7 +2872,7 @@ SEDFFORM $uploadtag - $help{'Adding_External_Resource'}
@@ -2924,7 +2951,12 @@ HIDDENFORM } my $postexec=''; if ($folder eq 'default') { - $r->print(''); + $r->print('' + ); } else { #$postexec='self.close();'; } @@ -2942,14 +2974,14 @@ HIDDENFORM my $recoverform=(< - + RFORM my $imspform=(< - + IMSPFORM @@ -2970,7 +3002,7 @@ NNFORM $help{'Simple Page'} + onclick="javascript:makesmppage();" /> $help{'Simple Page'} NSPFORM @@ -2981,7 +3013,7 @@ NSPFORM $help{'Simple Problem'} + onclick="javascript:makesmpproblem();" />$help{'Simple Problem'} @@ -2993,7 +3025,7 @@ NSPROBFORM + onclick="javascript:makedropbox();" /> NDBFORM @@ -3004,7 +3036,7 @@ NDBFORM + onclick="javascript:makeexamupload();" /> $help{'Score_Upload_Form'} @@ -3016,7 +3048,7 @@ NEXUFORM + onclick="javascript:makebulboard();" /> $help{'Bulletin Board'} @@ -3040,7 +3072,7 @@ NAMFORM + onclick="javascript:makeabout();" /> NASOFORM @@ -3070,7 +3102,7 @@ my $newfolderform; $help{'Adding_Pages'} @@ -3082,7 +3114,7 @@ NPFORM $help{'Adding_Folders'} @@ -3199,7 +3231,7 @@ SUPDOCFORM $help{'Adding_Folders'} @@ -3212,7 +3244,7 @@ SNFFORM $help{'Adding_External_Resource'}