--- loncom/interface/lonhtmlcommon.pm 2022/09/19 19:38:49 1.358.2.19.2.4 +++ loncom/interface/lonhtmlcommon.pm 2023/09/11 12:10:39 1.358.2.19.2.8 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.358.2.19.2.4 2022/09/19 19:38:49 raeburn Exp $ +# $Id: lonhtmlcommon.pm,v 1.358.2.19.2.8 2023/09/11 12:10:39 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1689,7 +1689,7 @@ sub show_return_link { $env{'request.uri'}=~m{^/priv/}) { return 1; } return if ($env{'request.noversionuri'} eq '/adm/supplemental'); - if (($env{'request.noversionuri'} =~ m{^/adm/(viewclasslist|navmaps)($|\?)}) + if (($env{'request.noversionuri'} =~ m{^/adm/viewclasslist($|\?)}) || ($env{'request.noversionuri'} =~ m{^/adm/.*/aboutme($|\?)})) { return if ($env{'form.register'}); @@ -1762,6 +1762,48 @@ clientTime = (new Date()).getTime(); END } +## +# Client-side javascript to convert any dashes in text pasted +# into textbox(es) for numericalresponse item(s) to a standard +# minus, i.e., - . Calls to dash_to_minus_js() in end_problem() +# and in loncommon::endbodytag() for a .page (arg: dashjs => 1) +# +# Will apply to any input tag with class: LC_numresponse_text. +# Currently set in start_textline for numericalresponse items. +# + +sub dash_to_minus_js { + return <<'ENDJS'; + + + +ENDJS +} + ############################################################ ############################################################ @@ -2148,8 +2190,10 @@ sub docs_breadcrumbs { # each of randompick number, hidden, encrypted, random order, is_page # are appended with ":"s to the foldername $name=~s/\:(\d*)\:(\w*)\:(\w*):(\d*)\:?(\d*)$//; - unless ($supplementalflag) { - if ($contenteditor) { + if ($contenteditor) { + if ($supplementalflag) { + if ($2) { $ishidden=1; } + } else { if ($1 ne '') { $randompick=$1; } else { @@ -3471,10 +3515,6 @@ sub jump_to_editres { if ($cfile =~ m{^/priv/($match_domain)/($match_username)/}) { my ($audom,$auname) = ($1,$2); unless (&Apache::lonnet::is_course($audom,$auname)) { - unless ((&Apache::lonnet::will_trust('othcoau',$env{'user.domain'},$audom)) && - (&Apache::lonnet::will_trust('coaurem',$audom,$env{'user.domain'}))) { - return; - } if (($symb ne '') && ($env{'request.course.id'}) && (&Apache::lonnet::allowed('mdc',$env{'request.course.id'}))) { unless (&Apache::lonnet::can_switchserver($env{'user.domain'},$home)) {