--- loncom/interface/lonhtmlcommon.pm	2021/12/31 20:56:46	1.358.2.19.2.1
+++ loncom/interface/lonhtmlcommon.pm	2015/07/07 20:10:20	1.367
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.358.2.19.2.1 2021/12/31 20:56:46 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.367 2015/07/07 20:10:20 musolffc Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -92,7 +92,7 @@ sub raw_href_to_link {
 
 sub entity_encode {
     my ($text)=@_;
-    return &HTML::Entities::encode($text, '\'<>&"');
+    return &HTML::Entities::encode($text, '<>&"');
 }
 
 sub direct_parm_link {
@@ -407,7 +407,7 @@ sub textbox {
 ##############################################
 ##############################################
 sub checkbox {
-    my ($name,$checked,$value,$special) = @_;
+    my ($name,$checked,$value) = @_;
     my $Str = '<input type="checkbox" name="'.$name.'" ';
     if (defined($value)) {
         $Str .= 'value="'.$value.'"';
@@ -415,7 +415,7 @@ sub checkbox {
     if ($checked) {
         $Str .= ' checked="checked"';
     }
-    $Str .= $special.' />';
+    $Str .= ' />';
     return $Str;
 }
 
@@ -451,10 +451,12 @@ sub radio {
 &date_setter returns html and javascript for a compact date-setting form.
 To retrieve values from it, use &get_date_from_form.
 
-Inputs
-
 =over 4
 
+=item Inputs
+
+=over
+
 =item $dname 
 
 The name to prepend to the form elements.  
@@ -515,10 +517,12 @@ If true, text boxes for seconds are omit
 
 =back
 
-Bugs
+=item Bugs
 
 The method used to restrict user input will fail in the year 2400.
 
+=back
+
 =cut
 
 ##############################################
@@ -534,8 +538,6 @@ sub date_setter {
 
     if (! defined($state) || $state ne 'disabled') {
         $state = '';
-    } else {
-        $state = 'disabled="disabled"';
     }
     if (! defined($no_hh_mm_ss)) {
         $no_hh_mm_ss = 0;
@@ -671,7 +673,7 @@ ENDJS
     my $minuteselector = qq{<input type="text" name="$dname\_minute" $special $state value="$min" size="3" />};
     my $secondselector= qq{<input type="text" name="$dname\_second" $special $state value="$sec" size="3" />};
     my $cal_link;
-    unless (($nolink) || ($state eq 'disabled')) {
+    if (!$nolink) {
         $cal_link = qq{<a href="javascript:$dname\_opencalendar()">};
     }
     #
@@ -685,18 +687,20 @@ ENDJS
                       $monthselector,$dayselector,$yearselector,
                       $hourselector).
                    $tzone;
+
     } elsif ($no_ss) {
         $result .= &mt('[_1] [_2] [_3] [_4] [_5]m',
                       $monthselector,$dayselector,$yearselector,
                       $hourselector,$minuteselector).
                    $tzone;
+
     } else {
         $result .= &mt('[_1] [_2] [_3] [_4] [_5]m [_6]s ',
                       $monthselector,$dayselector,$yearselector,
                       $hourselector,$minuteselector,$secondselector).
                    $tzone;
     }
-    unless (($nolink) || ($state eq 'disabled')) {
+    if (!$nolink) {
         $result .= &mt('[_1]Select Date[_2]',$cal_link,'</a>');
     }
     $result .= "</span>\n<!-- end $dname date setting form -->\n";
@@ -741,7 +745,9 @@ sub build_url {
 
 get_date_from_form retrieves the date specified in an &date_setter form.
 
-Inputs:
+=over
+
+=item Inputs:
 
 =over 4
 
@@ -755,6 +761,8 @@ The unix time to use as the default in c
 
 =back
 
+=back
+
 Returns: Unix time represented in the form.
 
 =cut
@@ -848,14 +856,13 @@ parameter setting wizard.
 ##############################################
 sub pjump_javascript_definition {
     my $Str = <<END;
-    function pjump(type,dis,value,marker,ret,call,hour,min,sec,extra) {
+    function pjump(type,dis,value,marker,ret,call,hour,min,sec) {
         openMyModal("/adm/rat/parameter.html?type="+escape(type)
                  +"&value="+escape(value)+"&marker="+escape(marker)
                  +"&return="+escape(ret)
                  +"&call="+escape(call)+"&name="+escape(dis)
                  +"&defhour="+escape(hour)+"&defmin="+escape(min)
-                 +"&defsec="+escape(sec)+"&extra="+escape(extra)
-                 +"&modal=1",350,350,'no');
+                 +"&defsec="+escape(sec)+"&modal=1",350,350,'no');
     }
 END
     return $Str;
@@ -927,7 +934,9 @@ sub javascript_docopen {
 Returns html for a selection box which allows the user to choose the
 enrollment status of students.  The selection box name is 'Status'.
 
-Inputs:
+=over
+
+=item Inputs:
 
 $status: the currently selected status.  If undefined the value of
 $env{'form.Status'} is taken.  If that is undefined, a value of 'Active'
@@ -941,6 +950,8 @@ $size: the size (number of lines) of the
 $onchange: javascript to use when the value is changed.  Enclosed in 
 double quotes, ""s, not single quotes.
 
+=back
+
 Returns: a perl string as described.
 
 =cut
@@ -988,7 +999,7 @@ sub StatusOptions {
 
 =pod
 
-=item Progess Window Handling Routines
+=item Progress Window Handling Routines
 
 These routines handle the creation, update, increment, and closure of 
 progress windows.  The progress window reports to the user the number
@@ -1002,28 +1013,30 @@ of items completed and an estimate of th
 Writes javascript to the client to open a progress window and returns a
 data structure used for bookkeeping.
 
-Inputs
+=over
 
-=over 4
+=item Inputs
+
+=over
 
 =item $r Apache request
 
 =item $number_to_do The total number of items being processed.
 
-=item $preamble Optional HTML to display before the progress bar.
+=back
 
 =back
 
 Returns a hash containing the progress state data structure.
-If $number_to_do is zero or null, an indeterminate progress bar will
-be used.
 
 =item &Update_PrgWin()
 
 Updates the text in the progress indicator.  Does not increment the count.
 See &Increment_PrgWin.
 
-Inputs:
+=over
+
+=item Inputs:
 
 =over 4
 
@@ -1035,25 +1048,38 @@ Inputs:
 
 =back
 
+=back
+
 Returns: none
 
 
-=item Increment_PrgWin()
+=item &Increment_PrgWin()
 
 Increment the count of items completed for the progress window by $step or 1 if no step is provided.
 
-Inputs:
+=over
+
+=item Inputs:
 
 =over 4
 
-=item $r Apache request
+=item $r 
 
-=item $prog_state Pointer to the data structure returned by Create_PrgWin
+Apache request
+
+=item $prog_state
+
+Pointer to the data structure returned by Create_PrgWin
+
+=item $extraInfo
+
+A description of the items being iterated over.  Typically 'student'.
+
+=item $step
 
-=item $extraInfo A description of the items being iterated over.  Typically
-'student'.
+(optional) counter step. Will be set to default 1 if ommited. step must be greater than 0 or empty.
 
-=item $step (optional) counter step. Will be set to default 1 if ommited. step must be greater than 0 or empty.
+=back
 
 =back
 
@@ -1064,7 +1090,9 @@ Returns: none
 
 Closes the progress window.
 
-Inputs:
+=over
+
+=item Inputs:
 
 =over 4 
 
@@ -1074,6 +1102,8 @@ Inputs:
 
 =back
 
+=back
+
 Returns: none
 
 =back
@@ -1086,20 +1116,20 @@ Returns: none
 
 # Create progress
 sub Create_PrgWin {
-    my ($r,$number_to_do,$preamble)=@_;
+    my ($r,$number_to_do)=@_;
     my %prog_state;
     $prog_state{'done'}=0;
     $prog_state{'firststart'}=&Time::HiRes::time();
     $prog_state{'laststart'}=&Time::HiRes::time();
     $prog_state{'max'}=$number_to_do;
-    &Apache::loncommon::LCprogressbar($r,$prog_state{'max'},$preamble); 
+    &Apache::loncommon::LCprogressbar($r); 
     return %prog_state;
 }
 
 # update progress
 sub Update_PrgWin {
     my ($r,$prog_state,$displayString)=@_;
-    &Apache::loncommon::LCprogressbarUpdate($r,undef,$displayString,$$prog_state{'max'});
+    &Apache::loncommon::LCprogressbarUpdate($r,undef,$displayString);
     $$prog_state{'laststart'}=&Time::HiRes::time();
 }
 
@@ -1149,7 +1179,7 @@ sub Increment_PrgWin {
     if ($$prog_state{'max'}) {
        $percent=int(100.*$current/$$prog_state{'max'});
     }
-    &Apache::loncommon::LCprogressbarUpdate($r,$percent,$timeinfo,$$prog_state{'max'});
+    &Apache::loncommon::LCprogressbarUpdate($r,$percent,$timeinfo);
     $$prog_state{'laststart'}=&Time::HiRes::time();
 }
 
@@ -1164,9 +1194,9 @@ sub Close_PrgWin {
 # ------------------------------------------------------- Puts directory header
 
 sub crumbs {
-    my ($uri,$target,$prefix,$form,$skiplast,$onclick)=@_;
+    my ($uri,$target,$prefix,$form,$skiplast)=@_;
 # You cannot crumbnify uploaded or adm resources
-    if ($uri=~/^\/*(uploaded|adm)\//) { return &mt('(Internal Course/Community Content)'); }
+    if ($uri=~/^\/*(uploaded|adm)\//) { return &mt('(Internal Course/Group Content)'); }
     if ($target) {
         $target = ' target="'.
                   &Apache::loncommon::escape_single($target).'"';
@@ -1186,19 +1216,13 @@ sub crumbs {
             } else {
                 $path.='/'; 
             }
-            if ($path eq '/res/') {
-                unless (&Apache::lonnet::allowed('bre',$path)) {
-                    $output.="$dir/";
-                    next;
-                }
-            }
             my $href_path = &HTML::Entities::encode($path,'<>&"');
             &Apache::loncommon::inhibit_menu_check(\$href_path);
             if ($form) {
                 my $href = 'javascript:'.$form.".action='".$href_path."';".$form.'.submit();';
-                $output.=qq{<a href="$href"$onclick$target>$dir</a>/};
+                $output.=qq{<a href="$href"$target>$dir</a>/};
             } else {
-                $output.=qq{<a href="$href_path"$onclick$target>$dir</a>/};
+                $output.=qq{<a href="$href_path"$target>$dir</a>/};
             }
         }
     } else {
@@ -1269,9 +1293,9 @@ sub htmlareaheaders {
 ENDEDITOR
 	}
     $s.=(<<ENDJQUERY);
-<script type="text/javascript" src="/adm/jQuery/js/jquery-3.2.1.min.js"></script>
-<script type="text/javascript" src="/adm/jQuery/js/jquery-ui-1.12.1.custom.min.js"></script>
-<link rel="stylesheet" type="text/css" href="/adm/jQuery/css/smoothness/jquery-ui-1.12.1.custom.min.css" />
+<script type="text/javascript" src="/adm/jQuery/js/jquery-1.11.3.min.js"></script>
+<script type="text/javascript" src="/adm/jQuery/js/jquery-ui-1.11.4.custom.min.js"></script>
+<link rel="stylesheet" type="text/css" href="/adm/jQuery/css/smoothness/jquery-ui-1.11.4.custom.css" />
 <script type="text/javascript" src="/adm/jpicker/js/jpicker-1.1.6.min.js" >
 </script>
 <link rel="stylesheet" type="text/css" href="/adm/jpicker/css/jPicker-1.1.6.min.css" />
@@ -1694,7 +1718,7 @@ sub show_return_link {
             (($env{'request.noversionuri'}=~/^\/adm\//) &&
              ($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) &&
              ($env{'request.noversionuri'}!~
-              m{^/adm/.*/(smppg|bulletinboard|ext\.tool)($|\?)})
+              m{^/adm/.*/(smppg|bulletinboard)($|\?)})
            ));
 }
 
@@ -1768,19 +1792,54 @@ A link to help for the component will be
 
 All inputs can be undef without problems.
 
-Inputs: $component (the text on the right side of the breadcrumbs trail),
-        $component_help (the help item filename (without .tex extension).
-        $menulink (boolean, controls whether to include a link to /adm/menu)
-        $helplink (if 'nohelp' don't include the orange help link)
-        $css_class (optional name for the class to apply to the table for CSS)
-        $no_mt (optional flag, 1 if &mt() is _not_ to be applied to $component
-           when including the text on the right.
-        $CourseBreadcrumbs (optional flag, 1 if &breadcrumbs called from &docs_breadcrumbs,
-           because breadcrumbs are being)
-        $topic_help (optional help item to be displayed on right side of the breadcrumbs 
-           row, using loncommon::help_open_topic() to generate the link.
-        $topic_help_text (text to include in the link in the optional help item 
-           on the right side of the breadcrumbs row.
+=over
+
+=item Inputs:
+
+=over
+
+=item $component
+
+the text on the right side of the breadcrumbs trail
+
+=item $component_help
+
+the help item filename (without .tex extension).
+
+=item $menulink
+
+boolean, controls whether to include a link to /adm/menu
+
+=item $helplink
+
+if 'nohelp' don't include the orange help link
+
+=item $css_class
+
+optional name for the class to apply to the table for CSS
+
+=item $no_mt 
+
+optional flag, 1 if &mt() is _not_ to be applied to $component when including the text on the right
+
+=item $CourseBreadcrumbs
+
+optional flag, 1 if &breadcrumbs called from &docs_breadcrumbs, because breadcrumbs are being
+used to display hierarchy for current folder shown in the Course Editor. 
+
+=item $topic_help
+
+optional help item to be displayed on right side of the breadcrumbs row, using 
+loncommon::help_open_topic() to generate the link. 
+
+=item $topic_help_text
+
+text to include in the link in the optional help item ($topic_help) on the right
+side of the breadcrumbs row.
+
+=back
+
+=back
 
 Returns a string containing breadcrumbs for the current page.
 
@@ -1825,16 +1884,6 @@ returns: nothing
         # The first one should be the course or a menu link
         if (!defined($menulink)) { $menulink=1; }
         if ($menulink) {
-            if ($env{'request.course.id'}) {
-                my ($menucoll,$deeplinkmenu,$menuref) = &Apache::loncommon::menucoll_in_effect();
-                if (($menucoll) && (ref($menuref) eq 'HASH')) {
-                    if ($menuref->{'main'} eq 'n') {
-                       undef($menulink);
-                    }
-                }
-            }
-        }
-        if ($menulink) {
             my $description = 'Menu';
             my $no_mt_descr = 0;
             if ((exists($env{'request.course.id'})) && 
@@ -1844,7 +1893,7 @@ returns: nothing
                     $env{'course.'.$env{'request.course.id'}.'.description'};
                 $no_mt_descr = 1;
                 if ($env{'request.noversionuri'} =~ 
-                    m{^/?public/($match_domain)/($match_courseid)/syllabus$}) {
+                    m{^/public/($match_domain)/($match_courseid)/syllabus$}) {
                     unless (($env{'course.'.$env{'request.course.id'}.'.domain'} eq $1) &&
                             ($env{'course.'.$env{'request.course.id'}.'.num'} eq $2)) {
                         $description = 'Menu';
@@ -1997,7 +2046,9 @@ Adds $html to $category of the breadcrum
 $html is usually a link to a page that invokes a function on the currently 
 displayed data (e.g. print when viewing a problem)
 
-Currently there are 3 possible values for $category: 
+=over
+
+=item Currently there are 3 possible values for $category: 
 
 =over 
 
@@ -2011,7 +2062,9 @@ remaining items in right of breadcrumbs
 advanced tools shown in a separate box below breadcrumbs line 
 
 =back
- 
+
+=back
+
 returns: nothing
 
 =cut
@@ -2045,23 +2098,22 @@ returns: nothing
         undef(%tools);
     }
 
-=item &current_breadcrumb_tools()
+=item &render_tools(\$breadcrumbs)
 
-returns: a hash containing the current breadcrumb tools.
+Creates html for breadcrumb tools (categories navigation and tools) and inserts 
+\$breadcrumbs at the correct position.
 
-=cut
+=over
 
-    sub current_breadcrumb_tools {
-        return %tools;
-    }
+=item input: 
 
-=item &render_tools(\$breadcrumbs)
+=over
 
-Creates html for breadcrumb tools (categories navigation and tools) and inserts 
-\$breadcrumbs at the correct position.
+=item \$breadcrumbs - a reference to the string containing prepared breadcrumbs.
+
+=back
 
-input: \$breadcrumbs - a reference to the string containing prepared 
-breadcrumbs.
+=back
 
 returns: nothing
 
@@ -2087,8 +2139,17 @@ returns: nothing
 Creates html for advanced tools (category advtools) and inserts \$breadcrumbs 
 at the correct position.
 
-input: \$breadcrumbs - a reference to the string containing prepared 
-breadcrumbs (after render_tools call).
+=over
+
+=item input:
+
+=over
+
+=item \$breadcrumbs - a reference to the string containing prepared breadcrumbs (after render_tools call).
+
+=back
+
+=back
 
 returns: nothing
 
@@ -2121,11 +2182,11 @@ sub docs_breadcrumbs {
         my $foldername=shift(@folders);
         if ($folderpath) {$folderpath.='&';}
         $folderpath.=$folder.'&'.$foldername;
-        my $url = $env{'request.use_absolute'};
+        my $url;
         if ($allowed) {
-            $url .= '/adm/coursedocs?folderpath=';
+            $url = '/adm/coursedocs?folderpath=';
         } else {
-            $url .= '/adm/supplemental?folderpath=';
+            $url = '/adm/supplemental?folderpath=';
         }
         $url .= &escape($folderpath);
         my $name=&unescape($foldername);
@@ -2550,9 +2611,9 @@ sub course_custom_roles {
 
 
 sub resource_info_box {
-   my ($symb,$onlyfolderflag,$stuvcurrent,$stuvdisp,$divforres)=@_;
+   my ($symb,$onlyfolderflag,$stuvcurrent,$stuvdisp)=@_;
    my $return='';
-   if (($stuvcurrent ne '') || ($divforres)) {
+   if ($stuvcurrent ne '') {
        $return = '<div class="LC_left_float">';
    }
    if ($symb) {
@@ -2581,7 +2642,7 @@ sub resource_info_box {
     } else {
        $return='<p><span class="LC_error">'.&mt('No context provided.').'</span></p>';
     }
-    if (($stuvcurrent ne '') || ($divforres)) {
+    if ($stuvcurrent ne '') {
         $return .= '</div>';
     }
     return $return;
@@ -2596,9 +2657,9 @@ sub resource_info_box {
 #
 
 sub display_usage {
-    my ($current_disk_usage,$disk_quota,$context) = @_;
-    my $usage = $current_disk_usage/1024;
-    my $quota = $disk_quota/1024;
+    my ($current_disk_usage,$disk_quota) = @_;
+    my $usage = $current_disk_usage/1000;
+    my $quota = $disk_quota/1000;
     my $percent;
     if ($disk_quota == 0) {
         $percent = 100.0;
@@ -2622,13 +2683,9 @@ sub display_usage {
     if ($prog_width > 100) {
         $prog_width = 100;
     }
-    my $display = 'block';
-    if ($context eq 'authoring') {
-        $display = 'inline';
-    }
     return '
-  <div id="meter1" align="left" style="display:'.$display.'" '.$cssclass.'>'.&mt('Currently using [_1] of the [_2] available.',$usage.' MB <span style="font-weight:bold;">('.$percent.'%)</span>',$quota.' MB')."\n".
-'   <div id="meter2" style="display:block; margin-top:3px; margin-bottom:3px; margin-left:0px; margin-right:0px; width:400px; border:1px solid #000000; height:10px;">'."\n".
+  <div id="meter1" align="left" '.$cssclass.'>'.&mt('Currently using [_1] of the [_2] available.',$usage.' MB <span style="font-weight:bold;">('.$percent.'%)</span>',$quota.' MB')."\n".
+'   <div id="meter2" style="display:block; margin-top:5px; margin-bottom:5px; margin-left:0px; margin-right:0px; width:400px; border:1px solid #000000; height:10px;">'."\n".
 '    <div id="meter3" style="display:block; background-color:'.$color.'; width:'.$prog_width.'%; height:10px; color:#000000; margin:0px;"></div>'."\n".
 '   </div>'."\n".
 '  </div>';
@@ -3312,18 +3369,12 @@ PARAMSONE
         if (itemid != null) {
             itemh = itemid.offsetHeight;
         }
-        var primaryheight = 0;
-        if (document.getElementById('LC_nav_bar') != null) {
-            primaryheight = document.getElementById('LC_nav_bar').offsetHeight;
-        }
-        var secondaryheight = 0;
+        var primaryheight = document.getElementById('LC_nav_bar').offsetHeight;
+        var secondaryheight;
         if (document.getElementById('LC_secondary_menu') != null) { 
             secondaryheight = document.getElementById('LC_secondary_menu').offsetHeight;
         }
-        var crumbsheight = 0;
-        if (document.getElementById('LC_breadcrumbs') != null) {
-            crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight;
-        }
+        var crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight;
         var dccidheight = 0;
         if (document.getElementById('dccid') != null) {
             dccidheight = document.getElementById('dccid').offsetHeight;
@@ -3403,17 +3454,7 @@ function go(url) {
    if (url!='' && url!= null) {
        currentURL = null;
        currentSymb= null;
-       var lcHostname = setLCHost();
-       if (lcHostname!='' && lcHostname!= null) {
-           var RegExp = /^https?\:/;
-           if (RegExp.test(url)) {
-               window.location.href=url;
-           } else {
-               window.location.href=lcHostname+url;
-           }
-       } else {
-           window.location.href=url;
-       }
+       window.location.href=url;
    }
 }
 
@@ -3432,8 +3473,8 @@ ENDUTILITY
 
 sub jump_to_editres {
     my ($cfile,$home,$switchserver,$forceedit,$forcereg,$symb,$folderpath,
-        $title,$hostname,$idx,$suppurl,$todocs,$suppanchor) = @_;
-    my ($jscall,$anchor,$usehttp,$usehttps,$is_ext);
+        $title,$idx,$suppurl,$todocs) = @_;
+    my $jscall;
     if ($switchserver) {
         if ($home) {
             $cfile = '/adm/switchserver?otherserver='.$home.'&amp;role='.
@@ -3453,44 +3494,7 @@ sub jump_to_editres {
         }
     } else {
         unless ($cfile =~ m{^/priv/}) {
-            if ($cfile =~ m{^(/adm/wrapper/ext/([^#]+))(?:|#([^#]+))$}) {
-                $cfile = $1;
-                my $extlink = $2;
-                $anchor = $3;
-                $is_ext = 1;
-                if (($extlink !~ /^https:/) && ($ENV{'SERVER_PORT'} == 443)) {
-                    unless ((&Apache::lonnet::uses_sts()) || (&Apache::lonnet::waf_allssl($hostname))) {
-                        $usehttp = 1;
-                    }
-                } elsif ($env{'request.use_absolute'}) {
-                    if ($env{'request.use_absolute'} =~ m{^https://}) {
-                        $usehttps = 1;
-                    }
-                }
-            } elsif ($cfile =~ m{^/?public/($match_domain)/($match_courseid)/syllabus}) {
-                if ($ENV{'SERVER_PORT'} == 443) {
-                    my ($cdom,$cnum) = ($1,$2);
-                    if (($env{'request.course.id'}) &&
-                        ($env{'course.'.$env{'request.course.id'}.'.num'} eq $cnum) &&
-                        ($env{'course.'.$env{'request.course.id'}.'.domain'} eq $cdom)) {
-                        if ($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ m{^http://}) {
-                            unless ((&Apache::lonnet::uses_sts()) || (&Apache::lonnet::waf_allssl($hostname))) {
-                                $usehttp = 1;
-                            }
-                        }
-                    }
-                } elsif ($env{'request.use_absolute'}) {
-                    if ($env{'request.use_absolute'} =~ m{^https://}) {
-                        $usehttps = 1;
-                    }
-                }
-            }
             if ($symb) {
-                if ($anchor ne '') {
-                    if ($symb =~ m{^([^#]+)\Q#$anchor\E$}) {
-                        $symb = $1.&escape(&escape('#')).$anchor;
-                    }
-                }
                 $cfile .= (($cfile=~/\?/)?'&amp;':'?')."symb=$symb";
             } elsif ($folderpath) {
                 $cfile .= (($cfile=~/\?/)?'&amp;':'?').
@@ -3509,31 +3513,14 @@ sub jump_to_editres {
             }
             if ($forceedit) {
                 $cfile .= (($cfile=~/\?/)?'&amp;':'?').'forceedit=1';
-                if ($usehttps) {
-                    $cfile = $env{'request.use_absolute'}.(($cfile =~ /^\//)? '':'/').$cfile;
-                }
-            } elsif ($usehttp) {
-                if ($hostname ne '') {
-                    $cfile = 'http://'.$hostname.(($cfile =~ /^\//)? '':'/').$cfile;
-                }
-                $cfile .= (($cfile=~/\?/)?'&amp;':'?').'usehttp=1';
-            } elsif ($usehttps) {
-                $cfile = $env{'request.use_absolute'}.(($cfile =~ /^\//)? '':'/').$cfile;
             }
             if ($forcereg) {
                 $cfile .= (($cfile=~/\?/)?'&amp;':'?').'register=1';
             }
             if ($todocs) {
-                $cfile .= (($cfile=~/\?/)?'&amp;':'?').'todocs=1';
-            }
-            if ($suppanchor ne '') {
-                $cfile .= (($cfile=~/\?/)?'&amp;':'?').'anchor='.
-                          &HTML::Entities::encode($suppanchor,'"<>&');
+               $cfile .= (($cfile=~/\?/)?'&amp;':'?').'todocs=1';
             }
         }
-        if ($anchor ne '') {
-            $cfile .= '#'.$anchor;
-        }
         $jscall = "go('".&Apache::loncommon::escape_single($cfile)."')";
     }
     return $jscall;
@@ -3545,18 +3532,15 @@ sub jump_to_editres {
 # javascript_valid_email
 #
 # Generates javascript to validate an e-mail address.
-# Returns a javascript function which accepts a form field as argument, and
+# Returns a javascript function which accetps a form field as argumnent, and
 # returns false if field.value does not satisfy two regular expression matches
 # for a valid e-mail address.  Backwards compatible with old browsers without
 # support for javascript RegExp (just checks for @ in field.value in this case). 
 
 sub javascript_valid_email {
     my $scripttag .= <<'END';
-function validmail(field,suffix) {
+function validmail(field) {
     var str = field.value;
-    if (suffix != '' && suffix != undefined) {
-        str += suffix;
-    }
     if (window.RegExp) {
         var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)";
         var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"; //"
@@ -3666,7 +3650,9 @@ sub scripttag {
 
 Constructs a XHTML list from \@array.
 
-input: 
+=over
+
+=item input: 
 
 =over
 
@@ -3680,7 +3666,9 @@ Attributes for <ul> and <li> passed in a
 See htmltag() for more details.
 
 =back
- 
+
+=back
+
 returns: XHTML list as String. 
 
 =cut   
@@ -3799,13 +3787,19 @@ should be included in this list.
 
 If the optional headline text is not provided, a default text will be used.
 
+=over
+
+=item Related routines:
 
-Related routines:
 =over 4
-add_item_funclist
-end_funclist
+
+=item add_item_funclist
+
+=item end_funclist
+
 =back
 
+=back
 
 Inputs: (optional) headline text
 
@@ -3832,10 +3826,18 @@ sub start_funclist {
 
 Adds an item to the list of available functions
 
-Related routines:
+=over
+
+=item Related routines:
+
 =over 4
-start_funclist
-end_funclist
+
+=item start_funclist
+
+=item end_funclist
+
+=back
+
 =back
 
 Inputs: content item with text and link to function
@@ -3858,10 +3860,13 @@ sub add_item_funclist {
 
 End list of available functions
 
-Related routines:
-=over 4
-start_funclist
-add_item_funclist
+=over
+
+=item Related routines:
+
+ start_funclist
+ add_item_funclist
+
 =back
 
 Inputs: ./.
@@ -3894,7 +3899,7 @@ A string that's used as visually highlig
 it's value evaluates to false.
 
 =back
- 
+
 returns: XHTML list as string. 
 
 =back
@@ -3907,7 +3912,7 @@ sub funclist_from_array {
     $args->{legend} ||= mt('Functions');
     return list_from_array( [$args->{legend}, @$items], 
                { listattr => {class => 'LC_funclist'} });
-}   
+}
 
 =pod
 
@@ -3929,8 +3934,8 @@ e.g. a file operation in Authoring Space
 A reference to the array containing text. Details: sub funclist_from_array
 
 =back
- 
-Returns: XHTML div as string.
+
+Returns: XHTML div as string. 
 
 =back