Diff for /loncom/xml/lonxml.pm between versions 1.567 and 1.571

version 1.567, 2023/11/28 04:48:14 version 1.571, 2024/04/17 13:37:37
Line 1623  FULLPAGE Line 1623  FULLPAGE
       if ($filetype eq 'html') {        if ($filetype eq 'html') {
           $htmlerror=&verify_html($filecontents);            $htmlerror=&verify_html($filecontents);
           if ($htmlerror) {            if ($htmlerror) {
               $htmlerror='<span class="LC_error">'.$htmlerror.'</span>';                $htmlerror=('&nbsp;'x3).' <span class="LC_error">'.$htmlerror.'</span>';
           }            }
           if (&Apache::lonhtmlcommon::htmlareabrowser()) {            if (&Apache::lonhtmlcommon::htmlareabrowser()) {
               unless ($textareaclass) {                unless ($textareaclass) {
Line 1668  $initialize Line 1668  $initialize
     </div>      </div>
     <div>      <div>
       <input type="button" name="discardview" accesskey="d" value="$lt{'dv'}" $onclick{'discard'} />        <input type="button" name="discardview" accesskey="d" value="$lt{'dv'}" $onclick{'discard'} />
       $undo $htmlerror $deps_button $daxebutton $dragmath_button        $undo $deps_button $daxebutton $dragmath_button $htmlerror
     </div>      </div>
   </div>    </div>
   <textarea $textarea_events style="width:100%" cols="80" rows="44" name="filecont" id="filecont" $textareaclass>$filecontents</textarea><br />$spelllink    <textarea $textarea_events style="width:100%" cols="80" rows="44" name="filecont" id="filecont" $textareaclass>$filecontents</textarea><br />$spelllink
Line 1702  ENDSCRIPT Line 1702  ENDSCRIPT
 }  }
   
 sub seteditor_javascript {  sub seteditor_javascript {
       my ($is_course_doc,$is_supp,$supp_path,$supp_title) = @_;
       my $symb;
       if ($is_course_doc) {
           if (!$is_supp) {
               ($symb) = &Apache::lonnet::whichuser();
               if ($symb) {
                   $symb = &escape($symb);
               }
           }
       }
     return <<"ENDSCRIPT";      return <<"ENDSCRIPT";
 <script type="text/javascript">  <script type="text/javascript">
 // <![CDATA[  // <![CDATA[
 function seteditmode(form,editor) {  function seteditmode(form,editor) {
       var querystr = '';
       var supplemental = '$is_supp';
       var coursedoc = '$is_course_doc';
       if (coursedoc)  {
           if (supplemental) {
               var supppath = '$supp_path';
               var supptitle = '$supp_title';
               if (supppath) {
                   querystr = 'folderpath='+supppath;
               }
               if (supptitle) {
                   if (querystr) {
                       querystr += '&';
                   }
                   querystr += 'title='+supptitle;
               }
           }
       }
     if (editor == 'daxe') {      if (editor == 'daxe') {
         var url = new URL(document.location.href);          var url = new URL(document.location.href);
         window.location = url.protocol+'//'+url.hostname+'/daxepage'+url.pathname;          var newloc = url.protocol+'//'+url.hostname+'/daxepage'+url.pathname;
           if (querystr) {
               if (/\\?/.test(url.pathname)) {
                   newloc += '&';
               } else {
                   newloc += '?';
               }
               newloc += querystr;
           }
           window.location = newloc;
     } else {      } else {
         form.editmode.value = editor;          if (coursedoc) {
               var curraction = form.action;
               var idx = curraction.indexOf('?');
               if (idx !== -1) {
                   form.action = curraction.substring(0,idx);
               }
               form.action += '?forceedit=1&register=1';
               if (querystr) {
                   form.action += '&'+querystr;
               }
           }
           if (editor == 'edit') {
               form.editmode.value = editor;
           } else {
               form.editmode.value = '';
           }
         form.submit();          form.submit();
     }      }
 }  }
Line 1954  ENDNOTFOUND Line 2006  ENDNOTFOUND
     $displayfile=$request->uri;      $displayfile=$request->uri;
             if ($request->uri =~ m{^/uploaded/}) {              if ($request->uri =~ m{^/uploaded/}) {
                 if ($env{'request.course.id'}) {                  if ($env{'request.course.id'}) {
                     if ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/supplemental/\E}) {                      if ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/\E(docs|supplemental)/}) {
                         &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},                          if ($1 eq 'supplemental') { 
                                                                 ['folderpath','title']);                              &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();
                           }
                     } elsif ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/portfolio/syllabus/\E(.+)$}) {                      } elsif ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/portfolio/syllabus/\E(.+)$}) {
                         my $filename = $1;                          my $filename = $1;
                         if ($1 eq 'loncapa.html') {                          if ($1 eq 'loncapa.html') {
Line 2054  sub get_courseupload_hierarchy { Line 2112  sub get_courseupload_hierarchy {
             }              }
             if ($title) {              if ($title) {
                 push(@pathitems,&unescape($title));                  push(@pathitems,&unescape($title));
                   $itemtitle = $title;
             }              }
             $displaypath = join(' &raquo; ',@pathitems);              $displaypath = join(' &raquo; ',@pathitems);
         } else {          } else {

Removed from v.1.567  
changed lines
  Added in v.1.571


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>