--- loncom/interface/lonhtmlcommon.pm 2021/12/13 22:03:32 1.358.2.19 +++ loncom/interface/lonhtmlcommon.pm 2024/07/02 02:29:13 1.358.2.21 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.358.2.19 2021/12/13 22:03:32 raeburn Exp $ +# $Id: lonhtmlcommon.pm,v 1.358.2.21 2024/07/02 02:29:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1268,9 +1268,9 @@ sub htmlareaheaders { ENDEDITOR } $s.=(< - - + + + @@ -1680,7 +1680,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'}); @@ -1753,6 +1753,54 @@ 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 +} + ############################################################ ############################################################