[LON-CAPA-cvs] cvs: doc /loncapafiles loncapafiles.lpml loncom/html/adm/help/png pdfsafari.png loncom/html/adm/help/tex PDF_Display_Safari.tex loncom/interface loncommon.pm lonhtmlcommon.pm lonmenu.pm lonnavmaps.pm rat lonwrapper.pm

raeburn raeburn at source.lon-capa.org
Sun Sep 7 00:21:15 EDT 2025


raeburn		Sun Sep  7 04:21:15 2025 EDT

  Added files:                 
    /loncom/html/adm/help/tex	PDF_Display_Safari.tex 
    /loncom/html/adm/help/png	pdfsafari.png 

  Modified files:              
    /loncom/interface	loncommon.pm lonhtmlcommon.pm lonmenu.pm 
                     	lonnavmaps.pm 
    /rat	lonwrapper.pm 
    /doc/loncapafiles	loncapafiles.lpml 
  Log:
  - Help icon to right of last item in breadcrumbs trail above iframe when
    viewing PDF with Safari on iOS in "Desktop Website" mode points at help
    file with instructions on switching to "Mobile Website" mode to support 
    access to all pages of a multi-page PDF.
  
  
-------------- next part --------------
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1480 loncom/interface/loncommon.pm:1.1481
--- loncom/interface/loncommon.pm:1.1480	Thu Jul 31 15:47:23 2025
+++ loncom/interface/loncommon.pm	Sun Sep  7 04:21:13 2025
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1480 2025/07/31 15:47:23 raeburn Exp $
+# $Id: loncommon.pm,v 1.1481 2025/09/07 04:21:13 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7141,11 +7141,12 @@
             if ($env{'request.state'} eq 'construct') {
                 $bodytag .= &Apache::lonmenu::innerregister($forcereg,
                                 $args->{'bread_crumbs'},'','',$hostname,
-                                $ltiscope,$ltiuri,$showncrumbsref);
+                                $ltiscope,$ltiuri,'',$showncrumbsref);
             } elsif ($forcereg) {
                 $bodytag .= &Apache::lonmenu::innerregister($forcereg,undef,
                                 $args->{'group'},$args->{'hide_buttons'},
-                                $hostname,$ltiscope,$ltiuri,$showncrumbsref);
+                                $hostname,$ltiscope,$ltiuri,
+                                $args->{'last_crumb_help'},$showncrumbsref);
             } else {
                 $bodytag .=
                     &Apache::lonmenu::prepare_functions($env{'request.noversionuri'},
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.424 loncom/interface/lonhtmlcommon.pm:1.425
--- loncom/interface/lonhtmlcommon.pm:1.424	Sun Aug 24 21:43:22 2025
+++ loncom/interface/lonhtmlcommon.pm	Sun Sep  7 04:21:13 2025
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.424 2025/08/24 21:43:22 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.425 2025/09/07 04:21:13 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2107,6 +2107,9 @@
         # for course breadcrumbs it's just bold
 
         if ($lasttext ne '') {
+            if ($last->{'help'}) {
+                $lasttext .= ' '.&Apache::loncommon::help_open_topic($last->{'help'});
+            }
             $links .= &htmltag( 'li', htmltag($CourseBreadcrumbs ? 'b' : 'h1',
                     $lasttext));
         }
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.563 loncom/interface/lonmenu.pm:1.564
--- loncom/interface/lonmenu.pm:1.563	Sun Aug 24 21:43:22 2025
+++ loncom/interface/lonmenu.pm	Sun Sep  7 04:21:13 2025
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.563 2025/08/24 21:43:22 raeburn Exp $
+# $Id: lonmenu.pm,v 1.564 2025/09/07 04:21:13 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -912,7 +912,7 @@
 
 sub innerregister {
     my ($forcereg,$bread_crumbs,$group,$pagebuttonshide,$hostname,
-        $ltiscope,$ltiuri,$showncrumbsref) = @_;
+        $ltiscope,$ltiuri,$lastcrumbhelp,$showncrumbsref) = @_;
     my $const_space = ($env{'request.state'} eq 'construct');
     my $in_daxe = 0;
 
@@ -948,7 +948,7 @@
                         !(($ltiscope eq 'map') && (&Apache::lonnet::clutter($resurl) eq $ltiuri))) {
                         $navmap = Apache::lonnavmaps::navmap->new();
                         if (ref($navmap)) {
-                            @mapcrumbs = $navmap->recursed_crumbs($mapurl,$restitle);
+                            @mapcrumbs = $navmap->recursed_crumbs($mapurl,$restitle,$lastcrumbhelp);
                         }
                     }
                 }
@@ -976,7 +976,11 @@
                                href => &Apache::lonnet::clutter($mapurl).'?navmap=1'};
             }
             if ($restitle && !@mapcrumbs) {
-                push(@crumbs,{text => $restitle, no_mt => 1});
+                if ($lastcrumbhelp ne '') {
+                    push(@crumbs,{text => $restitle, no_mt => 1, help => $lastcrumbhelp});
+                } else {
+                    push(@crumbs,{text => $restitle, no_mt => 1});
+                }
             }
             my @tools;
             if ($env{'request.filename'} =~ /\.page$/) {
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.581 loncom/interface/lonnavmaps.pm:1.582
--- loncom/interface/lonnavmaps.pm:1.581	Thu Aug 21 16:21:42 2025
+++ loncom/interface/lonnavmaps.pm	Sun Sep  7 04:21:13 2025
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.581 2025/08/21 16:21:42 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.582 2025/09/07 04:21:13 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3153,7 +3153,7 @@
 }
 
 sub recursed_crumbs {
-    my ($self,$mapurl,$restitle) = @_;
+    my ($self,$mapurl,$restitle,$lastcrumbhelp) = @_;
     my (@revmapinfo, at revmapres);
     my $mapres = $self->getResourceByUrl($mapurl);
     if (ref($mapres)) {
@@ -3206,7 +3206,11 @@
         }
     }
     if ($restitle ne '') {
-        push(@revmapinfo,{'text' => $restitle, 'no_mt' => 1});
+        if ($lastcrumbhelp ne '' ) {
+            push(@revmapinfo,{'text' => $restitle, 'no_mt' => 1, 'help' => $lastcrumbhelp});
+        } else {
+            push(@revmapinfo,{'text' => $restitle, 'no_mt' => 1});
+        }
     }
     return @revmapinfo;
 }
Index: rat/lonwrapper.pm
diff -u rat/lonwrapper.pm:1.87 rat/lonwrapper.pm:1.88
--- rat/lonwrapper.pm:1.87	Sun Aug 24 21:43:23 2025
+++ rat/lonwrapper.pm	Sun Sep  7 04:21:14 2025
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Wrapper for external and binary files as standalone resources
 #
-# $Id: lonwrapper.pm,v 1.87 2025/08/24 21:43:23 raeburn Exp $
+# $Id: lonwrapper.pm,v 1.88 2025/09/07 04:21:14 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -58,7 +58,7 @@
                                           'show' => 'Show content in pop-up window',
                                         );
 
-    (undef,undef,undef,undef,undef,undef,my $clientmobile) =
+    (undef,my $clientbrowser,undef,undef,undef,undef,my $clientmobile) =
         &Apache::loncommon::decode_user_agent($r);
 
     my ($anchor,$uselink);
@@ -167,6 +167,9 @@
         $headjs = &Apache::loncommon::iframe_wrapper_headjs();
     }
 
+    if ((!$clientmobile) && (lc($clientbrowser) eq 'safari')) {
+        $args->{'last_crumb_help'} = 'PDF_Display_Safari';
+    }
     my $startpage = &Apache::loncommon::start_page('Menu',$headjs,$args).$countdown.$donemsg;
     my $endpage = &Apache::loncommon::end_page();
 
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.1079 doc/loncapafiles/loncapafiles.lpml:1.1080
--- doc/loncapafiles/loncapafiles.lpml:1.1079	Thu Aug 21 16:21:42 2025
+++ doc/loncapafiles/loncapafiles.lpml	Sun Sep  7 04:21:15 2025
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.1079 2025/08/21 16:21:42 raeburn Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.1080 2025/09/07 04:21:15 raeburn Exp $ -->
 
 <!--
 
@@ -3223,6 +3223,7 @@
 optionResponseProblem.gif;
 page.gif;
 parm.gif;
+pdfsafari.gif;
 pgrd.gif;
 port.gif;
 pref.gif;
@@ -3445,6 +3446,7 @@
 optionResponseProblem.eps;
 page.eps;
 parm.eps;
+pdfsafari.eps;
 pgrd.eps;
 port.eps;
 preferences-desktop-font.eps;
@@ -3985,6 +3987,7 @@
 Parameter_Overview.tex;
 Parameter_Set_Folder.tex;
 Part_Tag_Edit_Help.tex;
+PDF_Display_Safari.tex;
 Personal_Info_Page.tex;
 Physical_Units.tex;
 Portfolio_About.tex;

Index: loncom/html/adm/help/tex/PDF_Display_Safari.tex
+++ loncom/html/adm/help/tex/PDF_Display_Safari.tex
\label{PDF_Display_Safari}

If you are using the Safari web browser on an iPad or iPhone running iOS 13 or later to access LON-CAPA, and you need to display a multi-page PDF included in a LON-CAPA course you need to be viewing in ``mobile website'' mode. In ``desktop website'' mode Safari will only display the first page of the PDF. To switch mode, tap AA at the left of the address bar, and select the ``Request Mobile Website'' from the list. To switch back, tap AA again and select the ``Request Desktop Website'' option.

\begin{figure}
\begin{center}\includegraphics[width=0.30\paperwidth]{pdfsafari}\end{center}
\caption{Switch Safari to Mobile Website on iOS}
\end{figure}


More information about the LON-CAPA-cvs mailing list