--- loncom/interface/londocs.pm 2007/07/02 23:43:36 1.282 +++ loncom/interface/londocs.pm 2007/07/03 00:30:47 1.284 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.282 2007/07/02 23:43:36 albertel Exp $ +# $Id: londocs.pm,v 1.284 2007/07/03 00:30:47 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -122,16 +122,17 @@ sub dumpbutton { my ($home,$other,%outhash)=&authorhosts(); my $type = &Apache::loncommon::course_type(); if ($home+$other==0) { return ''; } - my $output=''; if ($home) { - return ''. + return '
'. ''. - &Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs'); + &Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs'). + '
'; } else { - return''. + return '
'. &mt('Dump '.$type. - ' DOCS to Construction Space: available on other servers'); + ' DOCS to Construction Space: available on other servers'). + '
'; } } @@ -199,9 +200,9 @@ sub dumpcourse { $fail=1; } if ($fail) { - $r->print('fail'); + $r->print(''.&mt('fail').''); } else { - $r->print('ok'); + $r->print(''.&mt('ok').''); } } } else { @@ -257,10 +258,10 @@ sub dumpcourse { sub exportbutton { my $type = &Apache::loncommon::course_type(); - return ''. + return '
'. ''. - &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs'); + &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'
'; } sub exportcourse { @@ -1255,7 +1256,7 @@ sub editor { my ($breadcrumbtrail,$randompick,$ishidden,$isencrypted,$plain)=&breadcrumbs($folder); $r->print($breadcrumbtrail); if ($fatal) { - $r->print('

'.$errtext.'

'); + $r->print('

'.$errtext.'

'); } else { # ------------------------------------------------------------ Process commands @@ -1296,7 +1297,7 @@ sub editor { # store the changed version ($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.'.$container); if ($fatal) { - $r->print('

'.$errtext.'

'); + $r->print('

'.$errtext.'

'); return; } } @@ -1336,7 +1337,7 @@ sub editor { # store the changed version ($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.'.$container); if ($fatal) { - $r->print('

'.$errtext.'

'); + $r->print('

'.$errtext.'

'); return; } } @@ -1370,7 +1371,7 @@ sub editor { # Store the result ($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.'.$container); if ($fatal) { - $r->print('

'.$errtext.'

'); + $r->print('

'.$errtext.'

'); return; } @@ -1427,7 +1428,7 @@ sub editor { ($errtext,$fatal)=&storemap($coursenum,$coursedom, $folder.'.'.$container); if ($fatal) { - $r->print('

'.$errtext.'

'); + $r->print('

'.$errtext.'

'); return; } } @@ -1447,7 +1448,7 @@ sub editor { ($errtext,$fatal)=&group_import($coursenum, $coursedom, $folder, $container,'londocs',@imports); if ($fatal) { - $r->print('

'.$errtext.'

'); + $r->print('

'.$errtext.'

'); return; } } @@ -1464,11 +1465,12 @@ sub editor { ($errtext,$fatal)=&storemap($coursenum,$coursedom, $folder.'.'.$container); if ($fatal) { - $r->print('

'.$errtext.'

'); + $r->print('

'.$errtext.'

'); return; } } else { - $r->print('

'.&mt('No map selected.').'

'); + $r->print('

'.&mt('No map selected.').'

'); + } } &log_differences($plain); @@ -1569,7 +1571,7 @@ sub process_file_upload { ($errtext,$fatal)=&storemap($coursenum,$coursedom, $folder.'.'.$container); if ($fatal) { - $$upload_output .= '

'.$errtext.'

'; + $$upload_output .= '

'.$errtext.'

'; return 'failed'; } else { if ($parseaction eq 'parse') { @@ -1781,14 +1783,12 @@ sub entryline { if (!$nocopy) { $copylink=(< -$lt{'cp'} +$lt{'cp'} ENDCOPY } if (!$nocut) { $cutlink=(< -$lt{'ct'} +$lt{'ct'} ENDCUT } $line.=(< - $lt{'rm'} + $lt{'rm'} $cutlink - $lt{'rn'} + $lt{'rn'} $copylink END @@ -1939,9 +1939,9 @@ END ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i?' checked="1"':''); $line.=(< - + - + $parameterset ENDPARMS } @@ -2011,17 +2011,17 @@ sub checkonthis { if (($errorcount) || ($warningcount)) { if ($errorcount) { - $r->print(''. + $r->print(''. $errorcount.' '. - &mt('error(s)').' '); + &mt('error(s)').' '); } if ($warningcount) { - $r->print(''. + $r->print(''. $warningcount.' '. - &mt('warning(s)').''); + &mt('warning(s)').''); } } else { - $r->print(''.&mt('ok').''); + $r->print(''.&mt('ok').''); } $r->rflush(); } @@ -2033,15 +2033,15 @@ sub checkonthis { } } } elsif ($result eq 'unavailable') { - $r->print(''.&mt('connection down').''); + $r->print(''.&mt('connection down').''); } elsif ($result eq 'not_found') { unless ($url=~/\$/) { - $r->print(''.&mt('not found').''); + $r->print(''.&mt('not found').''); } else { - $r->print(''.&mt('unable to verify variable URL').''); + $r->print(''.&mt('unable to verify variable URL').''); } } else { - $r->print(''.&mt('access denied').''); + $r->print(''.&mt('access denied').''); } } } @@ -2083,9 +2083,9 @@ sub verifycontent { foreach (keys %hash) { if ($hash{$_}=~/\.(page|sequence)$/) { if (($_=~/^src_/) && ($alreadyseen{&unescape($hash{$_})})) { - $r->print('
'. + $r->print('
'. &mt('The following sequence or page is included more than once in your '.$type.': '). - &unescape($hash{$_}).'

'. + &unescape($hash{$_}).'
'. &mt('Note that grading records for problems included in this sequence or folder will overlap.
')); } } @@ -2165,7 +2165,7 @@ sub checkversions { $env{'course.'.$env{'request.course.id'}.'.num'}) eq 'ok') { $r->print('

'.&mt('Your Version Settings have been Saved').'

'); } else { - $r->print('

'.&mt('An Error Occured while Attempting to Save your Version Settings').'

'); + $r->print('

'.&mt('An Error Occured while Attempting to Save your Version Settings').'

'); } &mark_hash_old(); } @@ -2272,10 +2272,10 @@ ENDHEADERS 'lastrevisiondate') ). ''. - 'Most Recent: '. + 'Most Recent: '. ''.$currentversion.''. - ''. - 'In '.$type.': '. + ''. + 'In '.$type.': '. ''); # Used in course my $usedversion=$hash{'version_'.$linkurl}; @@ -2284,8 +2284,8 @@ ENDHEADERS } else { $r->print($currentversion); } - $r->print(''. - 'Use: '); + $r->print('
'. + 'Use: '); # Set version $r->print(&Apache::loncommon::select_form($setversions{$linkurl}, 'set_version_'.$linkurl, @@ -2294,7 +2294,7 @@ ENDHEADERS '' => '', 'mostrecent' => 'most recent', map {$_,$_} (1..$currentversion)))); - $r->print(''); + $r->print(''); my $lastold=1; for (my $prevvers=1;$prevvers<$currentversion;$prevvers++) { my $url=$root.'.'.$prevvers.'.'.$extension; @@ -2318,7 +2318,7 @@ ENDHEADERS my $cols_output = 1; for (my $prevvers=$lastold;$prevvers<$currentversion;$prevvers++) { my $url=$root.'.'.$prevvers.'.'.$extension; - $r->print(''.&mt('Version').' '.$prevvers.' ('. &Apache::lonlocal::locallocaltime( &Apache::lonnet::metadata($url, @@ -2331,7 +2331,7 @@ ENDHEADERS '&versionone='.$prevvers. '">'.&mt('Diffs').''); } - $r->print('
'); + $r->print('
'); if (++$entries_count % $entries_per_col == 0) { $r->print(''); if ($cols_output != 4) { @@ -2396,11 +2396,11 @@ sub changewarning { ''."\n". '
'. '

'. +'" />

'. &mt($message,' '). -$help{'Caching'}.'

'."\n\n"); +$help{'Caching'}.'

'."\n\n"); } # =========================================== Breadcrumbs for special functions @@ -2682,31 +2682,37 @@ sub handler { $r->print(< - - - - -$containertag + + + + + $containertag
- -$uploadtag + + $uploadtag
- -
-$help{'Verify_Content'} - - $help{'Check_Resource_Versions'} -$dumpbut -$exportbut - - - - - -
+
+ +
+ $help{'Verify_Content'} +
+
+ $help{'Check_Resource_Versions'} +
+ $dumpbut + $exportbut +
+ +
+
+ + +
+
+
 
ENDCOURSEVERIFY $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc', &mt('Editing the Table of Contents for your '.$type))); @@ -2759,17 +2765,17 @@ $lt{'title'}:
$uploadtag
- + - +

- + $help{'Uploading_From_Harddrive'} - + @@ -2778,20 +2784,20 @@ $lt{'pubd'}
$uploadtag
- + $help{'Importing_LON-CAPA_Resource'} - +


$lt{'copm'}

- -$help{'Load_Map'} +$help{'Load_Map'}


@@ -2805,10 +2811,10 @@ ENDFORM
$uploadtag - + $help{'Adding_External_Resource'} - +

@@ -2823,106 +2829,106 @@ ENDFORM
- + $help{'Adding_Folders'} - +

- + $help{'Adding_Pages'} - +

$uploadtag - + $help{'Syllabus'} - +

$uploadtag - + $help{'Navigate_Content'} - +

$uploadtag - + $help{'Simple Page'} - +

$uploadtag - + $help{'Simple Problem'} - +

$uploadtag - + - +

$uploadtag - + $help{'Score_Upload_Form'} - +

$uploadtag - + $help{'Bulletin Board'} - +

$uploadtag - + $help{'My Personal Info'} - +

$uploadtag - + - +

$uploadtag - + $help{'Group Files'} - +
ENDFORM } @@ -2931,19 +2937,19 @@ ENDFORM
$uploadtag - + $help{'Simple Problem'} - +

$uploadtag - + $help{'Score_Upload_Form'} - +
ENDBLOCK } @@ -2982,11 +2988,11 @@ ENDBLOCK

- + - +

$lt{'comment'}: