--- loncom/interface/londocs.pm	2007/12/01 01:59:55	1.300
+++ loncom/interface/londocs.pm	2008/10/08 17:19:18	1.314
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.300 2007/12/01 01:59:55 albertel Exp $
+# $Id: londocs.pm,v 1.314 2008/10/08 17:19:18 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -228,11 +228,19 @@ sub dumpcourse {
 	my $title=$origcrsdata{'description'};
 	$title=~s/[\/\s]+/\_/gs;
 	$title=&clean($title);
-	$r->print('<h3>'.&mt('Folder in Construction Space').'</h3><input type="text" size="50" name="authorfolder" value="'.$title.'" /><br />');
+	$r->print('<h3>'.&mt('Folder in Construction Space').'</h3>'
+                 .'<input type="text" size="50" name="authorfolder" value="'.$title.'" /><br />');
 	&tiehash();
-	$r->print('<h3>'.&mt('Filenames in Construction Space').'</h3><table border="2"><tr><th>'.&mt('Internal Filename').'</th><th>'.&mt('Title').'</th><th>'.&mt('Save as ...').'</th></tr>');
+	$r->print('<h3>'.&mt('Filenames in Construction Space').'</h3>'
+                 .&Apache::loncommon::start_data_table()
+                 .&Apache::loncommon::start_data_table_header_row()
+                 .'<th>'.&mt('Internal Filename').'</th>'
+                 .'<th>'.&mt('Title').'</th>'
+                 .'<th>'.&mt('Save as ...').'</th>'
+                 .&Apache::loncommon::end_data_table_header_row());
 	foreach (&Apache::lonclonecourse::crsdirlist($origcrsid,'userfiles')) {
-	    $r->print('<tr><td>'.$_.'</td>');
+	    $r->print(&Apache::loncommon::start_data_table_row()
+                     .'<td>'.$_.'</td>');
 	    my ($ext)=($_=~/\.(\w+)$/);
 	    my $title=$hash{'title_'.$hash{
 		'ids_/uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/'.$_}};
@@ -245,12 +253,13 @@ sub dumpcourse {
 	    $title=~s/\.(\w+)$//;
 	    $title=&clean($title);
 	    $title.='.'.$ext;
-	    $r->print("\n<td><input type='text' size='60' name='namefor_".$_."' value='".$title."' /></td></tr>\n");
+	    $r->print("\n<td><input type='text' size='60' name='namefor_".$_."' value='".$title."' /></td>"
+                     .&Apache::loncommon::end_data_table_row());
 	}
-	$r->print("</table>\n");
+	$r->print(&Apache::loncommon::end_data_table());
 	&untiehash();
 	$r->print(
-  '<p><input type="submit" name="dumpcourse" value="'.&mt('Dump [_1] DOCS',$type).'" /></p></form>');
+  '<p><input type="submit" name="dumpcourse" value="'.&mt("Dump $type DOCS").'" /></p></form>');
     }
 }
 
@@ -309,10 +318,10 @@ sub exportcourse {
                 chdir $cwd;
                 $outcome .= &mt('Download the zip file from <a href="[_1]">IMS '.lc($type).' archive</a><br />',$imszipfile,);
                 if ($copyresult) {
-                    $outcome .= 'The following errors occurred during export - '.$copyresult;
+                    $outcome .= &mt('The following errors occurred during export - [_1]',$copyresult);
                 }
             } else {
-                $outcome = '<br />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.<br />';
+                $outcome = '<br />'.&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.').'<br />';
             }
         }
         $r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package'));
@@ -818,7 +827,7 @@ sub extract_media {
         $dirpath = $url;
         $container = '';
     }
-    &Apache::lonnet::extract_embedded_items(undef,undef,\%allfiles,\%codebase,$content);
+    &Apache::lonnet::extract_embedded_items(undef,\%allfiles,\%codebase,$content);
     foreach my $embed_file (keys(%allfiles)) {
         my $filename;
         if ($embed_file =~ m#([^/]+)$#) {
@@ -924,7 +933,7 @@ sub group_import {
             my $result=&Apache::lonnet::finishuserfileupload($coursenum,$coursedom,
                                                 'output',$1.$2);
             if ($result != m|^/uploaded/|) {
-                $errtext.='Map not saved: A network error occured when trying to save the new map. ';
+                $errtext.='Map not saved: A network error occurred when trying to save the new map. ';
                 $fatal = 2;
             }
             if ($fatal) {
@@ -949,7 +958,7 @@ sub group_import {
 }
 
 sub breadcrumbs {
-    my ($where)=@_;
+    my ($where,$allowed,$type)=@_;
     &Apache::lonhtmlcommon::clear_breadcrumbs();
     my (@folders);
     if ($env{'form.pagepath'}) {
@@ -966,7 +975,7 @@ sub breadcrumbs {
     my $is_random_order=0;
     while (@folders) {
 	my $folder=shift(@folders);
-	my $foldername=shift(@folders);
+    	my $foldername=shift(@folders);
 	if ($folderpath) {$folderpath.='&';}
 	$folderpath.=$folder.'&'.$foldername;
 	my $url='/adm/coursedocs?folderpath='.
@@ -982,6 +991,13 @@ sub breadcrumbs {
             if ($2) { $ishidden=1; }
             if ($3) { $isencrypted=1; }
 	    if ($4 ne '') { $is_random_order = 1; }
+            if ($folder eq 'supplemental') {
+                if ($allowed) {
+                    $name = &mt('Supplemental '.$type.' Documents');
+                } else {
+                    $name = &mt($type.' Documents');
+                }
+            }
 	    &Apache::lonhtmlcommon::add_breadcrumb(
 		      {'href'=>$url.$cpinfo,
 		       'title'=>$name,
@@ -1201,12 +1217,15 @@ sub update_paste_buffer {
 # Mark for copying
     my ($title,$url)=split(':',$LONCAPA::map::resources[$LONCAPA::map::order[$env{'form.markcopy'}]]);
     if (&is_supplemental_title($title)) {
+        &Apache::lonnet::appenv({'docs.markedcopy_supplemental' => $title});
 	($title) = &parse_supplemental_title($title);
+    } elsif ($env{'docs.markedcopy_supplemental'}) {
+        &Apache::lonnet::delenv('docs\\.markedcopy_supplemental');
     }
     $url=~s{http(&colon;|:)//https(&colon;|:)//}{https$2//};
 
-    &Apache::lonnet::appenv('docs.markedcopy_title' => $title,
-			    'docs.markedcopy_url'   => $url);
+    &Apache::lonnet::appenv({'docs.markedcopy_title' => $title,
+			    'docs.markedcopy_url'   => $url});
     delete($env{'form.markcopy'});
 }
 
@@ -1233,7 +1252,7 @@ ENDPASTE
 	    $icon = &Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL'));
 	    $icon .= '/folder_closed.gif';
 	}
-	my $icon = '<img src="'.$icon.'" alt="" class="LC_icon" />';
+	$icon = '<img src="'.$icon.'" alt="" class="LC_icon" />';
 	$r->print($icon.$type.': '.  &parse_supplemental_title(&LONCAPA::map::qtescape($env{'docs.markedcopy_title'})));
     }
     if ($container eq 'page') {
@@ -1250,7 +1269,7 @@ ENDPASTE
 }
 
 sub do_paste_from_buffer {
-    my ($coursenum,$coursedom) = @_;
+    my ($coursenum,$coursedom,$folder) = @_;
 
     return 0 if (!$env{'form.pastemarked'});
 
@@ -1292,6 +1311,20 @@ sub do_paste_from_buffer {
     $url       = &LONCAPA::map::qtunescape($url);
 # Now insert the URL at the bottom
     my $newidx = &LONCAPA::map::getresidx($url);
+    if ($env{'docs.markedcopy_supplemental'}) {
+        if ($folder =~ /^supplemental/) {
+            $title = $env{'docs.markedcopy_supplemental'};
+        } else {
+            (undef,undef,$title) = 
+                &parse_supplemental_title($env{'docs.markedcopy_supplemental'});
+        }
+    } else {
+        if ($folder=~/^supplemental/) {
+           $title=time.'___&&&___'.$env{'user.name'}.'___&&&___'.
+                  $env{'user.domain'}.'___&&&___'.$title;
+        }
+    }
+
     $LONCAPA::map::resources[$newidx]= 	$title.':'.$url.':'.$ext.':normal:res';
     push(@LONCAPA::map::order, $newidx);
 # Store the result
@@ -1370,7 +1403,7 @@ sub handle_edit_cmd {
 }
 
 sub editor {
-    my ($r,$coursenum,$coursedom,$folder,$allowed,$upload_output,$which)=@_;
+    my ($r,$coursenum,$coursedom,$folder,$allowed,$upload_output,$type)=@_;
 
     my $container= ($env{'form.pagepath'}) ? 'page'
 		                           : 'sequence';
@@ -1387,7 +1420,7 @@ sub editor {
     }
     
     my ($breadcrumbtrail,$randompick,$ishidden,$isencrypted,$plain,$is_random_order)=
-	&breadcrumbs($folder);
+	&breadcrumbs($folder,$allowed,$type);
     $r->print($breadcrumbtrail);
     
 # ------------------------------------------------------------ Process commands
@@ -1412,7 +1445,7 @@ sub editor {
 	}
 	    
 	if ($env{'form.pastemarked'}) {
-	    &do_paste_from_buffer($coursenum,$coursedom);
+	    &do_paste_from_buffer($coursenum,$coursedom,$folder);
 	    ($errtext,$fatal) = &storemap($coursenum,$coursedom,$folder.'.'.$container);
 	    return $errtext if ($fatal);
 	}
@@ -1489,8 +1522,9 @@ sub editor {
 	$r->print('<tr><td>'.&mt('Currently no documents.').'</td></tr>');
     }
     $r->print("\n</table>\n");
-    
-    &print_paste_buffer($r,$container);
+    if ($allowed) {
+        &print_paste_buffer($r,$container);
+    }
     return;
 }
 
@@ -1571,8 +1605,8 @@ sub process_file_upload {
 
                     $$upload_output .= 
 			'This file contains embedded multimedia objects, which need to be uploaded to LON-CAPA.<br />'.
-			&ask_for_embedded_content('/adm/coursedocs',
-						  $state,$allfiles,$codebase);
+			&Apache::loncommon::ask_for_embedded_content(
+                            '/adm/coursedocs',$state,$allfiles,$codebase);
                 } else {
                     $$upload_output .= 'No embedded items identified<br />';
                 }
@@ -1582,55 +1616,6 @@ sub process_file_upload {
     return $phase_status;
 }
 
-sub ask_for_embedded_content {
-    my ($actionurl,$state,$allfiles,$codebase,$args)=@_;
-    my $upload_output = '
-   <form name="upload_embedded" action="'.$actionurl.'"
-                  method="post" enctype="multipart/form-data">';
-    $upload_output .= $state;
-    $upload_output .= '<b>Upload embedded files</b>:<br />'.
-	&Apache::loncommon::start_data_table();
-
-    my $num = 0;
-    foreach my $embed_file (sort {lc($a) cmp lc($b)} keys(%{$allfiles})) {
-	$upload_output .= &Apache::loncommon::start_data_table_row().
-	    '<td>'.$embed_file.'</td><td>';
-	if ($args->{'ignore_remote_references'}
-	    && $embed_file =~ m{^\w+://}) {
-	    $upload_output.='<span class="LC_warning">'.&mt("URL points to other server.").'</span>';
-	} elsif ($args->{'error_on_invalid_names'}
-	    && $embed_file ne &Apache::lonnet::clean_filename($embed_file,{'keep_path' => 1,})) {
-	    
-	    $upload_output.='<span class="LC_warning">'.&mt("Invalid characters").'</span>';
-	    
-	} else {
-
-	    $upload_output .='
-           <input name="embedded_item_'.$num.'" type="file" value="bob" />
-           <input name="embedded_orig_'.$num.'" type="hidden" value="'.&escape($embed_file).'" />';
-	    my $attrib = join(':',@{$$allfiles{$embed_file}});
-	    $upload_output .=
-		"\n\t\t".
-		'<input name="embedded_attrib_'.$num.'" type="hidden" value="'.
-		$attrib.'" />';
-	    if (exists($$codebase{$embed_file})) {
-		$upload_output .= 
-		    "\n\t\t".
-		    '<input name="codebase_'.$num.'" type="hidden" value="'.
-		    &escape($$codebase{$embed_file}).'" />';
-	    }
-	}
-	$upload_output .= '</td>'.&Apache::loncommon::end_data_table_row();
-	$num++;
-    }
-    $upload_output .= &Apache::loncommon::end_data_table().'<br />
-   <input type ="hidden" name="number_embedded_items" value="'.$num.'" />
-   <input type ="submit" value="'.&mt('Upload Listed Files').'" />
-   '.&mt('(only files for which a location has been provided will be uploaded)').'
-   </form>';
-    return $upload_output;
-}
-
 sub process_secondary_uploads {
     my ($upload_output,$coursedom,$coursenum,$formname,$num,$newidx) = @_;
     my $folder=$env{'form.folder'};
@@ -2014,6 +1999,9 @@ sub checkonthis {
     $r->rflush();
     if (($url) && ($url!~/^\/uploaded\//) && ($url!~/\*$/)) {
        $r->print("\n<br />");
+       if ($level==0) {
+           $r->print("<br />");
+       }
        for (my $i=0;$i<=$level*5;$i++) {
            $r->print('&nbsp;');
        }
@@ -2023,7 +2011,7 @@ sub checkonthis {
 	  my $result=&Apache::lonnet::repcopy(
                               &Apache::lonnet::filelocation('',$url));
           if ($result eq 'ok') {
-             $r->print('<font color="green">'.&mt('ok').'</font>');
+             $r->print('<span class="LC_success">'.&mt('ok').'</span>');
              $r->rflush();
              &Apache::lonnet::countacc($url);
              $url=~/\.(\w+)$/;
@@ -2033,7 +2021,7 @@ sub checkonthis {
                  for (my $i=0;$i<=$level*5;$i++) {
                      $r->print('&nbsp;');
                  }
-                 $r->print('- '.&mt('Rendering').': ');
+                 $r->print('- '.&mt('Rendering:').' ');
 		 my ($errorcount,$warningcount)=split(/:/,
 	       &Apache::lonnet::ssi_body($url,
 			       ('grade_target'=>'web',
@@ -2042,13 +2030,11 @@ sub checkonthis {
                      ($warningcount)) {
 		     if ($errorcount) {
                         $r->print('<img src="/adm/lonMisc/bomb.gif" /><span class="LC_error">'.
-			  $errorcount.' '.
-				  &mt('error(s)').'</span> ');
+                          &mt('[quant,_1,error]',$errorcount).'</span>');
                      }
 		     if ($warningcount) {
                         $r->print('<span class="LC_warning">'.
-			  $warningcount.' '.
-				  &mt('warning(s)').'</span>');
+                          &mt('[quant,_1,warning]',$warningcount).'</span>');
                      }
                  } else {
                      $r->print('<span class="LC_success">'.&mt('ok').'</span>');
@@ -2066,15 +2052,15 @@ sub checkonthis {
              $r->print('<span class="LC_error">'.&mt('connection down').'</span>');
           } elsif ($result eq 'not_found') {
 	      unless ($url=~/\$/) {
-		  $r->print('<span class="LC_error">'.&mt('not found').'</b></font>');
+		  $r->print('<span class="LC_error">'.&mt('not found').'</b></span>');
 	      } else {
 		  $r->print('<span class="LC_unknown">'.&mt('unable to verify variable URL').'</span>');
 	      }
           } else {
              $r->print('<span class="LC_error">'.&mt('access denied').'</span>');
           }
-      }
-   }
+       }
+    }
 }
 
 
@@ -2513,6 +2499,26 @@ sub handler {
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
 					    ['folderpath','pagepath',
 					     'pagesymb']);
+# No folderpath, no pagepath, see if we have something stored
+    if ((!$env{'form.folderpath'}) && (!$env{'form.pagepath'})) {
+        &Apache::loncommon::restore_course_settings('docs_folderpath',
+                                              {'folderpath' => 'scalar'});
+    }
+    if (!$env{'form.folderpath'}) {
+        &Apache::loncommon::restore_course_settings('docs_folderpath',
+                                              {'pagepath' => 'scalar'});
+    }
+    if ($env{'form.pagepath'}) {
+       $env{'form.folderpath'}='';
+    }
+    if ($env{'form.folderpath'} =~ /^supplemental_\d+/) {
+        $env{'form.folderpath'} = 'supplemental&'.
+                                  &escape(&mt('Supplemental '.$type.' Documents')).'&'.
+                                  $env{'form.folderpath'};
+    }
+    &Apache::loncommon::store_course_settings('docs_folderpath',
+                                                {'pagepath' => 'scalar',
+                                                 'folderpath' => 'scalar'});
     if ($env{'form.folderpath'}) {
 	my (@folderpath)=split('&',$env{'form.folderpath'});
 	$env{'form.foldername'}=&unescape(pop(@folderpath));
@@ -2774,7 +2780,7 @@ ENDCOURSEVERIFY
        }
        $hadchanges=0;
        my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,
-			   $upload_output);
+			   $upload_output,$type);
        if ($error) {
 	   $r->print('<p><span class="LC_error">'.$error.'</span></p>');
        }
@@ -2811,7 +2817,7 @@ $uploadtag
 <br />
 <span class="LC_nobreak">
 <label>$lt{'parse'}?
-<input type="checkbox" name="parserflag" />
+<input type="checkbox" name="parserflag" checked="checked" />
 </label>
 </span>
 <br />
@@ -2891,7 +2897,7 @@ value="$lt{'newp'}" />$help{'Adding_Page
 <br /><form action="/adm/coursedocs" method="post" name="newsyl">
 $uploadtag
 <input type="hidden" name="importdetail" 
-value="Syllabus=/public/$coursedom/$coursenum/syllabus" />
+value="$lt{'syll'}=/public/$coursedom/$coursenum/syllabus" />
 <span class="LC_nobreak">
 <input name="newsyl" type="submit" value="$lt{'syll'}" /> 
  $help{'Syllabus'}
@@ -2900,7 +2906,7 @@ value="Syllabus=/public/$coursedom/$cour
 <br /><form action="/adm/coursedocs" method="post" name="newnav">
 $uploadtag
 <input type="hidden" name="importdetail" 
-value="Navigate Content=/adm/navmaps" />
+value="$lt{'navc'}=/adm/navmaps" />
 <span class="LC_nobreak">
 <input name="newnav" type="submit" value="$lt{'navc'}" />
 $help{'Navigate_Content'}
@@ -2968,7 +2974,7 @@ onClick="javascript:makeabout();" />
 <br /><form action="/adm/coursedocs" method="post" name="newgroupfiles">
 $uploadtag
 <input type="hidden" name="importdetail"
-value="Group Files=/adm/$coursedom/$coursenum/aboutme" />
+value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" />
 <span class="LC_nobreak">
 <input name="newgroupfiles" type="submit" value="$lt{'grpo'}" />
 $help{'Group Files'}
@@ -2977,7 +2983,7 @@ $help{'Group Files'}
 <br /><form action="/adm/coursedocs" method="post" name="newroster">
 $uploadtag
 <input type="hidden" name="importdetail" 
-value="Course Roster=/adm/viewclasslist" />
+value="$lt{'rost'}=/adm/viewclasslist" />
 <span class="LC_nobreak">
 <input name="newroster" type="submit" value="$lt{'rost'}" />
 $help{'Course Roster'}
@@ -3020,11 +3026,11 @@ ENDBLOCK
 	   $folder='supplemental';
        }
        if ($folder =~ /^supplemental$/ &&
-	   $env{'form.folderpath'} =~ /^default\&/) {
-	   $env{'form.folderpath'}='supplemental&'.
-	       &escape(&mt('Supplemental '.$type.' Documents'));
+	   (($env{'form.folderpath'} =~ /^default\&/) || ($env{'form.folderpath'} eq ''))) {
+          $env{'form.folderpath'} = 'supplemental&'.
+                                    &escape(&mt('Supplemental '.$type.' Documents'));
        }
-       my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed);
+       my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
        if ($error) {
 	   $r->print('<p><span class="LC_error">'.$error.'</span></p>');
        }
@@ -3132,10 +3138,33 @@ ENDSUPFORM
 sub editing_js {
     my ($udom,$uname) = @_;
     my $now = time();
+    my %lt = &Apache::lonlocal::texthash(
+                                          p_mnf => 'Name of New Folder',
+                                          t_mnf => 'New Folder',
+                                          p_mnp => 'Name of New Page',
+                                          t_mnp => 'New Page',
+                                          p_mxu => 'Title for the Uploaded Score',
+                                          p_msp => 'Title for the Page',
+                                          p_msb => 'Title for the Problem',
+                                          p_mdb => 'Title for the Drop Box',
+                                          p_mbb => 'Title for the Bulletin Board',
+                                          p_mab => "Enter user:domain for User's 'About Me' Page",
+                                          p_mab2 => "About [_99]",
+                                          p_mab_alrt1 => 'Not a valid user:domain',
+                                          p_mab_alrt2 => 'Please enter both user and domain in the format user:domain',
+                                          p_chn => 'New Title',
+                                          p_rmr1 => 'WARNING: Removing a resource makes associated grades and scores inaccessible!',
+                                          p_rmr2a => 'Remove[_99]',
+                                          p_rmr2b => '?[_99]',
+                                          p_ctr1a => 'WARNING: Cutting a resource makes associated grades and scores inaccessible!',
+                                          p_ctr1b => 'Grades remain inaccessible if resource is pasted into another folder.',
+                                          p_ctr2a => 'Cut[_98]',
+                                          p_ctr2b => '?[_98]'
+                                        );
 
     return <<ENDNEWSCRIPT;
 function makenewfolder(targetform,folderseq) {
-    var foldername=prompt('Name of New Folder','New Folder');
+    var foldername=prompt('$lt{"p_mnf"}','$lt{"t_mnf"}');
     if (foldername) {
        targetform.importdetail.value=escape(foldername)+"="+folderseq;
         targetform.submit();
@@ -3143,7 +3172,7 @@ function makenewfolder(targetform,folder
 }
 
 function makenewpage(targetform,folderseq) {
-    var pagename=prompt('Name of New Page','New Page');
+    var pagename=prompt('$lt{"p_mnp"}','$lt{"t_mnp"}');
     if (pagename) {
         targetform.importdetail.value=escape(pagename)+"="+folderseq;
         targetform.submit();
@@ -3167,7 +3196,7 @@ function edittext(targetname,residx,titl
 }
 
 function makeexamupload() {
-   var title=prompt('Listed Title for the Uploaded Score');
+   var title=prompt('$lt{"p_mxu"}');
    if (title) { 
     this.document.forms.newexamupload.importdetail.value=
 	escape(title)+'=/res/lib/templates/examupload.problem';
@@ -3176,7 +3205,7 @@ function makeexamupload() {
 }
 
 function makesmppage() {
-   var title=prompt('Listed Title for the Page');
+   var title=prompt('$lt{"p_msp"}');
    if (title) { 
     this.document.forms.newsmppg.importdetail.value=
 	escape(title)+'=/adm/$udom/$uname/$now/smppg';
@@ -3185,7 +3214,7 @@ function makesmppage() {
 }
 
 function makesmpproblem() {
-   var title=prompt('Listed Title for the Problem');
+   var title=prompt('$lt{"p_msb"}');
    if (title) { 
     this.document.forms.newsmpproblem.importdetail.value=
 	escape(title)+'=/res/lib/templates/simpleproblem.problem';
@@ -3194,7 +3223,7 @@ function makesmpproblem() {
 }
 
 function makedropbox() {
-   var title=prompt('Listed Title for the Drop Box');
+   var title=prompt('$lt{"p_mdb"}');
    if (title) { 
     this.document.forms.newdropbox.importdetail.value=
         escape(title)+'=/res/lib/templates/DropBox.problem';
@@ -3203,7 +3232,7 @@ function makedropbox() {
 }
 
 function makebulboard() {
-   var title=prompt('Listed Title for the Bulletin Board');
+   var title=prompt('$lt{"p_mbb"}');
    if (title) {
     this.document.forms.newbul.importdetail.value=
 	escape(title)+'=/adm/$udom/$uname/$now/bulletinboard';
@@ -3212,20 +3241,20 @@ function makebulboard() {
 }
 
 function makeabout() {
-   var user=prompt("Enter user:domain for User's 'About Me' Page");
+   var user=prompt("$lt{'p_mab'}");
    if (user) {
        var comp=new Array();
        comp=user.split(':');
        if ((typeof(comp[0])!=undefined) && (typeof(comp[1])!=undefined)) {
 	   if ((comp[0]) && (comp[1])) {
 	       this.document.forms.newaboutsomeone.importdetail.value=
-		   'About '+escape(user)+'=/adm/'+comp[1]+'/'+comp[0]+'/aboutme';
+		   '$lt{"p_mab2"}'+escape(user)+'=/adm/'+comp[1]+'/'+comp[0]+'/aboutme';
 	       this.document.forms.newaboutsomeone.submit();
 	   } else {
-               alert("Not a valid user:domain");
+               alert("$lt{'p_mab_alrt1'}");
            }
        } else {
-           alert("Please enter both user and domain in the format user:domain"); 
+           alert("$lt{'p_mab_alrt2'}");
        }
    }
 }
@@ -3247,7 +3276,7 @@ function finishpick() {
 }
 
 function changename(folderpath,index,oldtitle,container,pagesymb) {
-    var title=prompt('New Title',oldtitle);
+    var title=prompt('$lt{"p_chn"}',oldtitle);
     if (title) {
 	this.document.forms.renameform.markcopy.value=-1;
 	this.document.forms.renameform.title.value=title;
@@ -3264,7 +3293,7 @@ function changename(folderpath,index,old
 }
 
 function removeres(folderpath,index,oldtitle,container,pagesymb,skip_confirm) {
-    if (skip_confirm || confirm('WARNING: Removing a resource makes associated grades and scores inaccessible!\\nRemove "'+oldtitle+'"?')) {
+    if (skip_confirm || confirm('$lt{"p_rmr1"}\\n\\n$lt{"p_rmr2a"} "'+oldtitle+'" $lt{"p_rmr2b"}')) {
 	this.document.forms.renameform.markcopy.value=-1;
 	this.document.forms.renameform.cmd.value='del_'+index;
         if (container == 'sequence') {
@@ -3279,7 +3308,7 @@ function removeres(folderpath,index,oldt
 }
 
 function cutres(folderpath,index,oldtitle,container,pagesymb,folder,skip_confirm) {
-    if (skip_confirm || confirm('WARNING: Cutting a resource makes associated grades and scores inaccessible!\\nGrades remain inaccessible if resource is pasted into another folder.\\nCut "'+oldtitle+'"?')) {
+    if (skip_confirm || confirm('$lt{"p_ctr1a"}\\n$lt{"p_ctr1b"}\\n\\n$lt{"p_ctr2a"} "'+oldtitle+'" $lt{"p_ctr2b"}')) {
 	this.document.forms.renameform.cmd.value='cut_'+index;
 	this.document.forms.renameform.markcopy.value=index;
 	this.document.forms.renameform.copyfolder.value=folder+'.'+container;