--- loncom/xml/lonxml.pm 2024/04/14 17:12:28 1.570 +++ loncom/xml/lonxml.pm 2024/04/17 13:37:37 1.571 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.570 2024/04/14 17:12:28 raeburn Exp $ +# $Id: lonxml.pm,v 1.571 2024/04/17 13:37:37 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1748,10 +1748,12 @@ function seteditmode(form,editor) { window.location = newloc; } else { if (coursedoc) { - form.action += '?forceedit=1'; - if (!supplemental) { - form.action += '®ister=1'; + var curraction = form.action; + var idx = curraction.indexOf('?'); + if (idx !== -1) { + form.action = curraction.substring(0,idx); } + form.action += '?forceedit=1®ister=1'; if (querystr) { form.action += '&'+querystr; } @@ -2004,9 +2006,11 @@ ENDNOTFOUND $displayfile=$request->uri; if ($request->uri =~ m{^/uploaded/}) { if ($env{'request.course.id'}) { - if ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/supplemental/\E}) { - &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, - ['folderpath','title']); + if ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/\E(docs|supplemental)/}) { + if ($1 eq 'supplemental') { + &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, + ['folderpath','title']); + } if (($env{'request.state'} eq 'edit') && ($env{'form.editmode'} eq 'edit') && ($filetype eq 'html')) { &Apache::lonhtmlcommon::clear_breadcrumbs();