--- loncom/interface/londocs.pm 2010/02/02 01:28:10 1.418 +++ loncom/interface/londocs.pm 2010/03/18 16:33:44 1.423 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.418 2010/02/02 01:28:10 raeburn Exp $ +# $Id: londocs.pm,v 1.423 2010/03/18 16:33:44 onken Exp $ # # Copyright Michigan State University Board of Trustees # @@ -120,12 +120,19 @@ sub dumpbutton { my $crstype = &Apache::loncommon::course_type(); if ($home+$other==0) { return ''; } if ($home) { - my $link = "".&mt('Dump '.$crstype.' DOCS to Construction Space').""; - return $link.' '. - &Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs').'
'; + my $link = + "" + .&mt('Dump '.$crstype.' Documents to Construction Space') + .''; + return + $link.' ' + .&Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs') + .'
'; } else { - return &mt('Dump '.$crstype. - ' DOCS to Construction Space: available on other servers'); + return + &mt('Dump '.$crstype.' Documents to Construction Space: available on other servers'); } } @@ -140,9 +147,9 @@ sub clean { sub dumpcourse { my ($r) = @_; my $crstype = &Apache::loncommon::course_type(); - $r->print(&Apache::loncommon::start_page('Dump '.$crstype.' DOCS to Construction Space'). + $r->print(&Apache::loncommon::start_page('Dump '.$crstype.' Documents to Construction Space'). '
'); - $r->print(&Apache::lonhtmlcommon::breadcrumbs('Dump '.$crstype.' DOCS to Construction Space')); + $r->print(&Apache::lonhtmlcommon::breadcrumbs('Dump '.$crstype.' Documents to Construction Space')); my ($home,$other,%outhash)=&authorhosts(); unless ($home) { return ''; } my $origcrsid=$env{'request.course.id'}; @@ -253,7 +260,7 @@ sub dumpcourse { $r->print(&Apache::loncommon::end_data_table()); &untiehash(); $r->print( - '

'); + '

'); } } @@ -261,7 +268,7 @@ sub dumpcourse { sub exportbutton { my $crstype = &Apache::loncommon::course_type(); - return "".&mt('IMS Export')."". + return "".&mt('IMS Export')."". &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'
'; } @@ -2242,11 +2249,11 @@ sub list_symbs { } else { $r->print("
\n");
         foreach my $res ($navmap->retrieveResources()) {
-	    $r->print($res->compTitle()."\t".$res->symb()."\n");
+            $r->print($res->compTitle()."\t".$res->symb()."\n");
         }
         $r->print("\n
\n"); } - $r->print(''.&mt('Return to DOCS').''); + $r->print('
'.&mt('Back to Course Editor').''); } @@ -2265,9 +2272,9 @@ sub verifycontent { if ($hash{$key}=~/\.(page|sequence)$/) { if (($key=~/^src_/) && ($alreadyseen{&unescape($hash{$key})})) { $r->print('
'. - &mt('The following sequence or page is included more than once in your '.$crstype.': '). + &mt('The following sequence or page is included more than once in your '.$crstype.':').' '. &unescape($hash{$key}).'
'. - &mt('Note that grading records for problems included in this sequence or folder will overlap.
')); + &mt('Note that grading records for problems included in this sequence or folder will overlap.').'
'); } } if (($key=~/^src\_(.+)$/) && (!$alreadyseen{&unescape($hash{$key})})) { @@ -2275,8 +2282,13 @@ sub verifycontent { } } &untiehash(); - $r->print('

'.&mt('Done').'.

'.''. - &mt('Return to DOCS').''); + $r->print( + '

'.&mt('Done').'

' + .'
' + .'

' + .&mt('Back to Course Editor') + .'

' + ); } @@ -2526,7 +2538,7 @@ ENDHEADERS } } $r->print(''); - $r->print('

'.&mt('Done').'.

'); + $r->print('

'.&mt('Done').'

'); &untiehash(); } @@ -2650,7 +2662,7 @@ sub handler { &init_breadcrumbs('versions','Check/Set Resource Versions'); &checkversions($r); } elsif ($allowed && $env{'form.dumpcourse'}) { - &init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' DOCS to Construction Space'); + &init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' Documents to Construction Space'); &dumpcourse($r); } elsif ($allowed && $env{'form.exportcourse'}) { &init_breadcrumbs('exportcourse','IMS Export'); @@ -2897,7 +2909,7 @@ sub create_form_ul { 'book' => 'Import Bookmarks', 'selm' => 'Select Map', 'load' => 'Load Map', - 'reco' => 'Recover Deleted Resources', + 'reco' => 'Recover Deleted Documents', 'newf' => 'New Folder', 'newp' => 'New Composite Page', 'extr' => 'External Resource', @@ -2965,9 +2977,9 @@ FUFORM SEDFFORM my @simpleeditdefaultforma = ( - { ''.$lt{srch}.'' => "$uploadtag$lt{'srch'}" }, - { ''.$lt{impo}.'' => "$lt{'impo'}$help{'Importing_LON-CAPA_Resource'}" }, - { ''.$lt{book}.'' => "$lt{'book'}" }, + { ''.$lt{srch}.'' => "$uploadtag$lt{'srch'}" }, + { ''.$lt{impo}.'' => "$lt{'impo'}$help{'Importing_LON-CAPA_Resource'}" }, + { ''.$lt{book}.'' => "$lt{'book'}" }, ); $simpleeditdefaultform .= create_form_ul(create_list_elements(@simpleeditdefaultforma)); $simpleeditdefaultform .=(< $uploadtag - $lt{'extr'}$help{'Adding_External_Resource'} + $lt{'extr'}$help{'Adding_External_Resource'} ERFORM @@ -3103,14 +3115,14 @@ HIDDENFORM my $recoverform=(< - $lt{'reco'} + $lt{'reco'} RFORM my $imspform=(< - $lt{'imsf'} + $lt{'imsf'} IMSPFORM @@ -3120,7 +3132,7 @@ IMSPFORM $uploadtag - $lt{'navc'} + $lt{'navc'} $help{'Navigate_Content'} NNFORM @@ -3129,7 +3141,7 @@ NNFORM $uploadtag - $lt{'sipa'} + $lt{'sipa'} $help{'Simple Page'} NSPFORM @@ -3139,7 +3151,7 @@ NSPFORM $uploadtag - $lt{'sipr'} + $lt{'sipr'} $help{'Simple Problem'} @@ -3150,7 +3162,7 @@ NSPROBFORM $uploadtag - $lt{'drbx'} + $lt{'drbx'} NDBFORM @@ -3159,7 +3171,7 @@ NDBFORM $uploadtag - $lt{'scuf'} + $lt{'scuf'} $help{'Score_Upload_Form'} NEXUFORM @@ -3169,7 +3181,7 @@ NEXUFORM $uploadtag - $lt{'bull'} + $lt{'bull'} $help{'Bulletin Board'} NBFORM @@ -3180,7 +3192,7 @@ NBFORM $uploadtag - $lt{'mypi'} + $lt{'mypi'} $help{'My Personal Information Page'} NAMFORM @@ -3190,7 +3202,7 @@ NAMFORM $uploadtag - $lt{'abou'} + $lt{'abou'} NASOFORM @@ -3201,7 +3213,7 @@ NASOFORM $uploadtag - $lt{'rost'} + $lt{'rost'} $help{'Course Roster'} NROSTFORM @@ -3219,7 +3231,7 @@ my $newfolderb; - $lt{'newp'} + $lt{'newp'} $help{'Adding_Pages'} NPFORM @@ -3230,7 +3242,7 @@ NPFORM - $lt{'newf'}$help{'Adding_Folders'} + $lt{'newf'}$help{'Adding_Folders'} NFFORM @@ -3240,7 +3252,7 @@ NFFORM $uploadtag - $lt{'syll'} + $lt{'syll'} $help{'Syllabus'} @@ -3252,12 +3264,12 @@ NSYLFORM $uploadtag - $lt{'grpo'} + $lt{'grpo'} $help{'Group Portfolio'} NGFFORM @specialdocumentsforma=( - {''.$lt{newp}.''=>$newpageform}, + {''.$lt{newp}.''=>$newpageform}, {''.$lt{syll}.''=>$newsylform}, {''.$lt{grpo}.''=>$newgroupfileform}, ); @@ -3368,7 +3380,7 @@ SUPDOCFORM - $lt{'newf'} + $lt{'newf'} $help{'Adding_Folders'} SNFFORM @@ -3379,7 +3391,7 @@ SNFFORM - $lt{'extr'} $help{'Adding_External_Resource'} + $lt{'extr'} $help{'Adding_External_Resource'} SNEFORM @@ -3389,7 +3401,7 @@ SNEFORM - $lt{'syll'} + $lt{'syll'} $help{'Syllabus'} SNSFORM @@ -3400,7 +3412,7 @@ SNSFORM - $lt{'mypi'} + $lt{'mypi'} $help{'My Personal Information Page'} SNAMFORM @@ -3472,7 +3484,7 @@ sub generate_admin_options { 'ls' => 'List Symbs', 'sl' => 'Show Log', 'imse' => 'IMS Export', - 'dcd' => 'Dump Course DOCS to Construction Space: available on other servers' + 'dcd' => 'Dump Course Documents to Construction Space: available on other servers' ); my %help = %{$help_ref}; my %env = %{$env_ref}; @@ -3480,19 +3492,19 @@ sub generate_admin_options { my $exportbut=&exportbutton(); my @list = ( {''.$lt{vc}.'' - => "$lt{'vc'}$help{'Verify_Content'}"}, + => "$lt{'vc'}$help{'Verify_Content'}"}, {''.$lt{cv}.'' - =>"$lt{'cv'}$help{'Check_Resource_Versions'}"}, + =>"$lt{'cv'}$help{'Check_Resource_Versions'}"}, ); if($dumpbut ne ''){ push @list, {''.$lt{dcd}.''=>$dumpbut}; } - push @list, ({''.$lt{imse}.'' + push @list, ({''.$lt{imse}.'' =>$exportbut}, {''.$lt{ls}.'' - =>"$lt{'ls'}"}, + =>"$lt{'ls'}"}, {''.$lt{sl}.'' - =>"$lt{'sl'}"}, + =>"$lt{'sl'}"}, ); return '
'.create_form_ul(create_list_elements(@list)).'
'; @@ -3518,7 +3530,7 @@ sub generate_edit_table { }elsif($activetab eq $name){ $active = 'class="active"'; } - $form .= '
  • '.&mt(${$orderhash{$name}}[0]).'
  • '; + $form .= '
  • '.&mt(${$orderhash{$name}}[0]).'
  • '; } else { $form .= '
  • '.${$orderhash{$name}}[1].'
  • '; @@ -3528,14 +3540,14 @@ sub generate_edit_table { $form .= '
    '; foreach my $field (keys(%orderhash)){ if($field ne '00'){ - if($activetab eq '' || $activetab ne $field){ + if($activetab eq '' || $activetab ne $field){ $active = 'style="display: none;"'; - }elsif($activetab eq $field){ + }elsif($activetab eq $field){ $active = 'style="display:block;"'; - } - $form .= '
    '.${$orderhash{$field}}[1] - .'
    '; + } + $form .= '
    '.${$orderhash{$field}}[1] + .'
    '; } } $form .= '
    '; @@ -3781,6 +3793,9 @@ function openTabs(pageId) { if(currentLis[i].className == 'active') { funcString = currentLis[i].onclick.toString(); tab = funcString.split('"'); + if(tab.length < 2) { + tab = funcString.split("'"); + } currentData = document.getElementById(tab[1]); currentData.style.display = 'block'; }