Moodle
  1. Moodle
  2. MDL-10021

still frameset linking html pages

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.9.3
    • Fix Version/s: 1.8.8, 1.9.4
    • Component/s: Accessibility
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Rank:
      29436

      Description

      create a resource type="Link to a file or web site".
      Select an html file with the button "Choose or update a file ..."
      Confirm and visit you new resource. The code is:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
      <html dir="ltr">
      <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><title>3D-una: presentazione</title></head>
      <frameset rows="130,*"><frame src="view.php?id=189&type=file&frameset=top" title="Resource"/><frame src="http://daniele-ure.local/%7Edaniele/moodle18/file.php/2/Slidy/presentazione.html" title="Resource"/></frameset></html>

      Striongly denied!!!!!!!!!!!!!!!!!!!!!!!
      To include an html is not necessary at all a frameset.

      Please give to this strict break a high relevance.

      1. file.resource.class.patch
        4 kB
        Daniele Cordella
      2. MDL-10021_second.patch
        12 kB
        Jérôme Mouneyrac
      3. MDL-10021.patch
        6 kB
        Jérôme Mouneyrac
      1. JR-screenshot-1.jpg
        120 kB
      2. JR-screenshot-2.jpg
        106 kB
      3. too_small.png
        107 kB

        Issue Links

          Activity

          Hide
          Daniele Cordella added a comment -

          I always forget to add the settings:
          Window = Same window
          Keep page navigation visible on the same page = selected
          Sorry!!!

          Show
          Daniele Cordella added a comment - I always forget to add the settings: Window = Same window Keep page navigation visible on the same page = selected Sorry!!!
          Hide
          Martin Dougiamas added a comment -

          Um, a frameset is necessary because we don't have any control over the HTML in the included file ie it will probably have it's own DOCTYPE etc and will break XHTML.

          Show
          Martin Dougiamas added a comment - Um, a frameset is necessary because we don't have any control over the HTML in the included file ie it will probably have it's own DOCTYPE etc and will break XHTML.
          Hide
          Daniele Cordella added a comment -

          Ciao Martin
          I don't agree with you.
          What you write is 100% correct but in this way you are completely taking off a Moodle feature to user compliant with Italian legislation. I agree that Moodle has to allow also not compliant actions, but at the same time, Moodle should provide an alternative.

          From now on I have no knowledge about what I am going to write.
          Maybe it should be used a filter removing the doctype and putting all the rest inside a div or something equivalent.

          IMO as it is now it is quite incorrect, from my view point.

          Ciao.

          Show
          Daniele Cordella added a comment - Ciao Martin I don't agree with you. What you write is 100% correct but in this way you are completely taking off a Moodle feature to user compliant with Italian legislation. I agree that Moodle has to allow also not compliant actions, but at the same time, Moodle should provide an alternative. From now on I have no knowledge about what I am going to write. Maybe it should be used a filter removing the doctype and putting all the rest inside a div or something equivalent. IMO as it is now it is quite incorrect, from my view point. Ciao.
          Hide
          Daniele Cordella added a comment -

          Ciao Martin
          as far as I am fitting legislation about accessibility I believe I have to know what I am doing and what linking to my course. I mean, I have to know the doctype of the file I am linking.

          On this basis I made the attached modification to moodle/mod/resource/file/resource.class.patch in order to show a linked html file using the "same window" but without framesets.

          What is still missing in my hack is the use of the css of the linked file.

          Let me know your idea, please
          Ciao.

          Show
          Daniele Cordella added a comment - Ciao Martin as far as I am fitting legislation about accessibility I believe I have to know what I am doing and what linking to my course. I mean, I have to know the doctype of the file I am linking. On this basis I made the attached modification to moodle/mod/resource/file/resource.class.patch in order to show a linked html file using the "same window" but without framesets. What is still missing in my hack is the use of the css of the linked file. Let me know your idea, please Ciao.
          Hide
          Daniele Cordella added a comment -

          thanks Martin!

          Show
          Daniele Cordella added a comment - thanks Martin!
          Hide
          Jérôme Mouneyrac added a comment -

          I need some clarifications.

          At this moment on Moodle 1.8 (Note: the issue is reported for 1.8 only) and Moodle 1.9, if you select "Same Window" and "Keep page navigation visible", the linked HTML will be displayed in a frameset.

          For some legal reasons, Daniele does not want the linked HTML having a DOCTYPE. Daniele also says that it doesn't want a frameset. However in the patch. it still generates frameset...

          Moreover this modification would imply a new option when you create/edit this kind of resource (checkbox: do not generate a frameset).

          To be honest, I don't understand exactly what is the problem with the frameset.

          Show
          Jérôme Mouneyrac added a comment - I need some clarifications. At this moment on Moodle 1.8 (Note: the issue is reported for 1.8 only) and Moodle 1.9, if you select "Same Window" and "Keep page navigation visible", the linked HTML will be displayed in a frameset. For some legal reasons, Daniele does not want the linked HTML having a DOCTYPE. Daniele also says that it doesn't want a frameset. However in the patch. it still generates frameset... Moreover this modification would imply a new option when you create/edit this kind of resource (checkbox: do not generate a frameset). To be honest, I don't understand exactly what is the problem with the frameset.
          Hide
          Daniele Cordella added a comment -

          > However in the patch. it still generates frameset...
          No! Where?

          The code today in use in between a: if (false)

          { It ONLY creates the frameset. My new code is in the }

          else {

          Show
          Daniele Cordella added a comment - > However in the patch. it still generates frameset... No! Where? The code today in use in between a: if (false) { It ONLY creates the frameset. My new code is in the } else {
          Hide
          Daniele Cordella added a comment -

          > To be honest, I don't understand exactly what is the problem with the frameset.
          The problem with the frameset is this:
          Read the "Requirement No 2" of the page:
          http://www.pubbliaccesso.gov.it/normative/DM080705-A-en.htm

          Show
          Daniele Cordella added a comment - > To be honest, I don't understand exactly what is the problem with the frameset. The problem with the frameset is this: Read the "Requirement No 2" of the page: http://www.pubbliaccesso.gov.it/normative/DM080705-A-en.htm
          Hide
          Jérôme Mouneyrac added a comment -

          Thanks Daniele for your explanation.

          To summarize:
          you want to display html resource on a page, with the Moodle navigation on the top, without using frame technology (in order to match Italian legislation).
          And this happen when the resource has the settings:
          Window = Same window
          Keep page navigation visible on the same page = selected

          Show
          Jérôme Mouneyrac added a comment - Thanks Daniele for your explanation. To summarize: you want to display html resource on a page, with the Moodle navigation on the top, without using frame technology (in order to match Italian legislation). And this happen when the resource has the settings: Window = Same window Keep page navigation visible on the same page = selected
          Hide
          Daniele Cordella added a comment -

          Thanks to you, Jerome, for your continuous work.
          Yes, you are 100% right.

          Show
          Daniele Cordella added a comment - Thanks to you, Jerome, for your continuous work. Yes, you are 100% right.
          Hide
          Jérôme Mouneyrac added a comment - - edited

          I attached a patch (MDL_10021.patch for Moodle 1.8) that:

          • embedded a html file into an object tag (no frame technology into the page source) - do not display frame anymore for html file.
          • resizes automatically the object tag and displays only one vertical scrollbar for the object tag
          • tested on Firefox, IE (6&7), Opera, Safari

          We need to clarify:

          • do we add a resource option in order to choose between frame/object technology
          • do we want to display no frame at all for any type of file (need another code review)
          Show
          Jérôme Mouneyrac added a comment - - edited I attached a patch (MDL_10021.patch for Moodle 1.8) that: embedded a html file into an object tag (no frame technology into the page source) - do not display frame anymore for html file. resizes automatically the object tag and displays only one vertical scrollbar for the object tag tested on Firefox, IE (6&7), Opera, Safari We need to clarify: do we add a resource option in order to choose between frame/object technology do we want to display no frame at all for any type of file (need another code review)
          Hide
          Daniele Cordella added a comment -

          Fantastic Jerome.
          I believe my answer is not relevant at all but... in any case,
          for both questions it should be: yes, of course!!!

          Ciao and thank you.
          I feel the floor is to MD!!!!

          Show
          Daniele Cordella added a comment - Fantastic Jerome. I believe my answer is not relevant at all but... in any case, for both questions it should be: yes, of course!!! Ciao and thank you. I feel the floor is to MD!!!!
          Hide
          Jérôme Mouneyrac added a comment -

          I come back to this issue
          We could :

          1. change "Keep page navigation visible on the same page" checkbox for a select box with following value:
          No
          Yes - With Frame
          Yes - No Frame

          2. do not change "Keep page navigation visible on the same page" checkbox and embed everything in object tag (when object tag doesn't support the mime type, the user get download the file)

          I'm for the 2.

          Show
          Jérôme Mouneyrac added a comment - I come back to this issue We could : 1. change "Keep page navigation visible on the same page" checkbox for a select box with following value: No Yes - With Frame Yes - No Frame 2. do not change "Keep page navigation visible on the same page" checkbox and embed everything in object tag (when object tag doesn't support the mime type, the user get download the file) I'm for the 2.
          Hide
          Daniele Cordella added a comment -

          Sorry Jerome
          I am quite embarrassed.

          I am for the secont too, but as I already wrote, the last word has to come from others.

          Show
          Daniele Cordella added a comment - Sorry Jerome I am quite embarrassed. I am for the secont too, but as I already wrote, the last word has to come from others.
          Hide
          Jérôme Mouneyrac added a comment -

          No problem Daniele I see with Martin.

          Show
          Jérôme Mouneyrac added a comment - No problem Daniele I see with Martin.
          Hide
          Martin Dougiamas added a comment -

          After looking at http://joliclic.free.fr/html/object-tag/en/object-results.php I think we are quite safe to use OBJECT all the time.

          +10 from me for #2 in 1.9 and 2.0!

          Thanks Jerome and Daniele.

          Show
          Martin Dougiamas added a comment - After looking at http://joliclic.free.fr/html/object-tag/en/object-results.php I think we are quite safe to use OBJECT all the time. +10 from me for #2 in 1.9 and 2.0! Thanks Jerome and Daniele.
          Hide
          Jérôme Mouneyrac added a comment -

          Commited on 1.8, 1.9 and HEAD
          Tested on 1.8 and 1.9 (resource currently broken on HEAD)
          1.9: Firefox and Opera on Linux, Safari and IE5-6-7 on Windows
          1.8: Firefox on Linux, IE5-6-7 on windows
          All using standard theme

          When you retest on QA, try different settings/theme.

          QA Test steps:

          • Connect as admin
          • Select Create a Link resource operation into a course
          • Select an HTML file
          • Select Keep navigation bar visible
          • Save and Display the Link Resource
            =>the HTML file should be embedded into the page
            =>You should be able to resize the page without breaking the design (embedded HTML is automatically resized)
            =>The embedded HTML should always have a minimum readable size
          • Update the Resource and remove the description
            => the HTML file should now be displayed on the entire windows
          • Update the Resource and change the HTML file for a flash, mp3, binary, pdf
            => some should be embedded (flash), some should only display a link (binary)
          Show
          Jérôme Mouneyrac added a comment - Commited on 1.8, 1.9 and HEAD Tested on 1.8 and 1.9 (resource currently broken on HEAD) 1.9: Firefox and Opera on Linux, Safari and IE5-6-7 on Windows 1.8: Firefox on Linux, IE5-6-7 on windows All using standard theme When you retest on QA, try different settings/theme. QA Test steps: Connect as admin Select Create a Link resource operation into a course Select an HTML file Select Keep navigation bar visible Save and Display the Link Resource =>the HTML file should be embedded into the page =>You should be able to resize the page without breaking the design (embedded HTML is automatically resized) =>The embedded HTML should always have a minimum readable size Update the Resource and remove the description => the HTML file should now be displayed on the entire windows Update the Resource and change the HTML file for a flash, mp3, binary, pdf => some should be embedded (flash), some should only display a link (binary)
          Hide
          Daniele Cordella added a comment -

          Thank you both.

          Show
          Daniele Cordella added a comment - Thank you both.
          Hide
          Andrea Bicciolo added a comment -

          Hello,

          tested the update on HEAD using the following settings:

          Link to file or web site: added a generic URL available on the Internet
          Window: same window
          Keep page navigation visible: yes

          Accessing the resource using FF2, FF complains about missing plugin. Clicking "Install misisng plugin button", FF ends up telling "Unknown Plugin (Document/unknown)". The resource is not displayed except the ALT link.

          Using IE7, no complains but no resource displayed as well (except the ALT link).

          Tested same setting on 1.9 stable and the problems described are the same.

          Show
          Andrea Bicciolo added a comment - Hello, tested the update on HEAD using the following settings: Link to file or web site: added a generic URL available on the Internet Window: same window Keep page navigation visible: yes Accessing the resource using FF2, FF complains about missing plugin. Clicking "Install misisng plugin button", FF ends up telling "Unknown Plugin (Document/unknown)". The resource is not displayed except the ALT link. Using IE7, no complains but no resource displayed as well (except the ALT link). Tested same setting on 1.9 stable and the problems described are the same.
          Hide
          Daniele Cordella added a comment -

          Why are you running so fast.
          I planned to wait for tomorrow for the next M19 weekly release but you are already testing it !!!!

          Well, I just replaced the file moodle19/mod/resource/type/file/resource.class.php with the new version 1.71.2.15 and I started my test.
          By making a link to a html resource file all is right.

          By checking the "Keep page navigation visible on the same page" I get the notice: Undefined property: resource_file::$navigation in /Applications/MAMP/htdocs/moodle19/mod/resource/type/file/resource.class.php on line 381

          Show
          Daniele Cordella added a comment - Why are you running so fast. I planned to wait for tomorrow for the next M19 weekly release but you are already testing it !!!! Well, I just replaced the file moodle19/mod/resource/type/file/resource.class.php with the new version 1.71.2.15 and I started my test. By making a link to a html resource file all is right. By checking the "Keep page navigation visible on the same page" I get the notice: Undefined property: resource_ file::$navigation in /Applications/MAMP/htdocs/moodle19/mod/resource/type/file/resource.class.php on line 381
          Hide
          Daniele Cordella added a comment -

          and, no block is shown!!

          Show
          Daniele Cordella added a comment - and, no block is shown!!
          Hide
          Jérôme Mouneyrac added a comment -

          Thanks for the report. Andrea, I confirm that on FF2 (I tested URL on FF3, it worked) and IE6-7, the alternative is displayed for URL resource. I have a look at it.
          Daniele, I'll commit soon a fix for the problem you reported.

          Show
          Jérôme Mouneyrac added a comment - Thanks for the report. Andrea, I confirm that on FF2 (I tested URL on FF3, it worked) and IE6-7, the alternative is displayed for URL resource. I have a look at it. Daniele, I'll commit soon a fix for the problem you reported.
          Hide
          Jérôme Mouneyrac added a comment -

          I commited a fix for the notice problem.

          For the FF2, IE6-7 problem, it's due that Moodle doesn't identify the mime type of a URL.
          I tried to force HTML mime type for URL (which is anyway not a really good solution in case the URL goes to a flash, or other kind of mimetype). In this case, IE6-7 display a blank object. It's caused by the IE default settings of 'Access data source accros domain' set to Disable. We need to set i up to Enable. This is clearly not a solution as some people can neither change the browser, neither IE settings.

          So in the particular case of URL on another domain, we'll use iframe (or frame). I'll come back soon with a patch for that.

          Show
          Jérôme Mouneyrac added a comment - I commited a fix for the notice problem. For the FF2, IE6-7 problem, it's due that Moodle doesn't identify the mime type of a URL. I tried to force HTML mime type for URL (which is anyway not a really good solution in case the URL goes to a flash, or other kind of mimetype). In this case, IE6-7 display a blank object. It's caused by the IE default settings of 'Access data source accros domain' set to Disable. We need to set i up to Enable. This is clearly not a solution as some people can neither change the browser, neither IE settings. So in the particular case of URL on another domain, we'll use iframe (or frame). I'll come back soon with a patch for that.
          Hide
          Jérôme Mouneyrac added a comment -

          I commited the change. Now when you try to display a resource which is not on your Moodle wwwroot, iframe is used instead of the object tag.

          Show
          Jérôme Mouneyrac added a comment - I commited the change. Now when you try to display a resource which is not on your Moodle wwwroot, iframe is used instead of the object tag.
          Hide
          Jérôme Mouneyrac added a comment -

          commited in 1.8, 1.9 and HEAD.

          Show
          Jérôme Mouneyrac added a comment - commited in 1.8, 1.9 and HEAD.
          Hide
          Shane Elliott added a comment -

          The resource summary now appears at the bottom of the page - was this a deliberate decision? It would be good if visual changes like this didn't occur in a stable version

          Show
          Shane Elliott added a comment - The resource summary now appears at the bottom of the page - was this a deliberate decision? It would be good if visual changes like this didn't occur in a stable version
          Hide
          Jérôme Mouneyrac added a comment -

          After talking with Shane and Martin, here is the situation:
          Before the fix, the description was already displayed at the bottom for Flash, PDF, ZIP, MP3, video, image and many other kinds of known file. Only HTML and unknown MIME type files were displayed with a description at the top. In order to be consistent, I put the description at the bottom for HTML/unknown files. When the description is bigger than three/four lines a scrollbar will appear. It sounds a reasonable behavior.
          However if someone writes an issue and that many people require the need to the description to be displayed at the top, we'll of course consider it

          Show
          Jérôme Mouneyrac added a comment - After talking with Shane and Martin, here is the situation: Before the fix, the description was already displayed at the bottom for Flash, PDF, ZIP, MP3, video, image and many other kinds of known file. Only HTML and unknown MIME type files were displayed with a description at the top. In order to be consistent, I put the description at the bottom for HTML/unknown files. When the description is bigger than three/four lines a scrollbar will appear. It sounds a reasonable behavior. However if someone writes an issue and that many people require the need to the description to be displayed at the top, we'll of course consider it
          Hide
          Joseph Rézeau added a comment -

          I am re-opening this issue for a number of reasons explained in my comment message below.

          Show
          Joseph Rézeau added a comment - I am re-opening this issue for a number of reasons explained in my comment message below.
          Hide
          Joseph Rézeau added a comment -

          My reasons for re-opening this issue.

          1- All moodle developers know that Daniele is a strong advocate of "WC3 strict XHTML compliance". I have already expressed the view that such compliance problems cannot be considered as "bugs" and certainly not "critical" bugs, since they do not prevent Moodle from "normal operation". However I do agree that Moodle should be as compliant as possible... as long as it does not break things.

          2- I hope all Moodle developers agree that fixes committed to CVS for stable moodle versions should be considered with care and should not break existing moodle installations. Of course I appreciate that it is very difficult for developers to test bug fixes for all possible existing moodle configurations. It is of course impossible to do such tests for modules, plugins and themes which are not part of moodle regular distribution.

          After all these "hedging" considerations here we go...
          Here are the problems that I can report with the current fix for Moodle 1.8.

          3- If an HTML page ressource is longer than the navigator's viewport , it displays an ugly, confusing and useless double vertical scrollbar (see attached JR01 screenshot). This double scrollbar is displayed with standard themes when in Teacher mode, with Chameleon theme also in Student mode, with CustomCorners themes (in 1.9) in Teacher and Student modes.

          4- The new fix breaks the display of my own orangechoc theme (by adding a vertical bar and a horizontal bar etc.) But I have to find a solution for that by myself, of course. (see attached JR02 screenshot).

          5- Suggestions
          a) please find a solution to problem explained in #3 as soon as possible
          b) in the meantime, please revert to previous "frame display" at least for moodle 1.8
          c) re-consider this solution by Jerome Mouneyrac - 23/Sep/08 02:22 PM
          change "Keep page navigation visible on the same page" checkbox for a select box with following value:
          No
          Yes - With Frame
          Yes - No Frame

          In conclusion, if there is a way to get rid of the "frame" in resource display in Moodle, I am all for it, but only if it does not cause display problems for embedded resource HTML files.

          Many thanks,
          Joseph

          Show
          Joseph Rézeau added a comment - My reasons for re-opening this issue. 1- All moodle developers know that Daniele is a strong advocate of "WC3 strict XHTML compliance". I have already expressed the view that such compliance problems cannot be considered as "bugs" and certainly not "critical" bugs, since they do not prevent Moodle from "normal operation". However I do agree that Moodle should be as compliant as possible... as long as it does not break things. 2- I hope all Moodle developers agree that fixes committed to CVS for stable moodle versions should be considered with care and should not break existing moodle installations. Of course I appreciate that it is very difficult for developers to test bug fixes for all possible existing moodle configurations. It is of course impossible to do such tests for modules, plugins and themes which are not part of moodle regular distribution. After all these "hedging" considerations here we go... Here are the problems that I can report with the current fix for Moodle 1.8. 3- If an HTML page ressource is longer than the navigator's viewport , it displays an ugly, confusing and useless double vertical scrollbar (see attached JR01 screenshot). This double scrollbar is displayed with standard themes when in Teacher mode, with Chameleon theme also in Student mode, with CustomCorners themes (in 1.9) in Teacher and Student modes. 4- The new fix breaks the display of my own orangechoc theme (by adding a vertical bar and a horizontal bar etc.) But I have to find a solution for that by myself, of course. (see attached JR02 screenshot). 5- Suggestions a) please find a solution to problem explained in #3 as soon as possible b) in the meantime, please revert to previous "frame display" at least for moodle 1.8 c) re-consider this solution by Jerome Mouneyrac - 23/Sep/08 02:22 PM change "Keep page navigation visible on the same page" checkbox for a select box with following value: No Yes - With Frame Yes - No Frame In conclusion, if there is a way to get rid of the "frame" in resource display in Moodle, I am all for it, but only if it does not cause display problems for embedded resource HTML files. Many thanks, Joseph
          Hide
          Joseph Rézeau added a comment -

          Answers to points #3 and #4 of my previous comment.

          #3- Upon further investigation, I think I have identified the culprit.
          In file mod/resource/type/file/resource.class.php this line:
          objectheight = YAHOO.util.Dom.getViewportHeight() - 120;
          and further down:
          YAHOO.util.Dom.setStyle("embeddedhtml", "height", objectheight+"px");
          The value of 120 (pixels) pre-supposes that in a "normal" moodle page displaying an embedded HTML file as a resource, the top part of the page, which displays the logo, the breadcrumb and the "Jump to" menu will fit that height of 120 px.
          This is indeed often the case, but not always. If the name of a course or the name of a resource is quite long, or if we are in teacher mode, AND the browser window is sized to a not very wide size (e.g. 800x600) AND the text of the HTML resource file is long, etc. THEN the vertical space taken up by the "top part of the page" is more than 120 pixels, AND THEN **the embedded resource object cannot fit vertically on the page** AND THEN the double scrollbar appears.
          By experimenting with the value of objectheight, I have found that increasing it to 160 makes for a better display (in the cases mentioned above). But of course this adds some extra "blank" space at the bottom of the page, which may not be desired.
          The solution lies in finding a way to better calculate the real height of the top part of the page in order to find a better value than the default 120px given at the moment. This may or may not be feasible.

          #4- As for the problem with fixed width themes (my orangechoc theme) I have found that adding the CSS rule body

          {overflow-x: hidden;}

          to the CSS of my HTML uploaded files solves the problem. Plus a couple of other minor changes. So that's OK for the moment.

          Joseph

          PS.- I'm sorry if I sounded a bit harsh in my previous comment...

          Show
          Joseph Rézeau added a comment - Answers to points #3 and #4 of my previous comment. #3- Upon further investigation, I think I have identified the culprit. In file mod/resource/type/file/resource.class.php this line: objectheight = YAHOO.util.Dom.getViewportHeight() - 120; and further down: YAHOO.util.Dom.setStyle("embeddedhtml", "height", objectheight+"px"); The value of 120 (pixels) pre-supposes that in a "normal" moodle page displaying an embedded HTML file as a resource, the top part of the page, which displays the logo, the breadcrumb and the "Jump to" menu will fit that height of 120 px. This is indeed often the case, but not always. If the name of a course or the name of a resource is quite long, or if we are in teacher mode, AND the browser window is sized to a not very wide size (e.g. 800x600) AND the text of the HTML resource file is long, etc. THEN the vertical space taken up by the "top part of the page" is more than 120 pixels, AND THEN ** the embedded resource object cannot fit vertically on the page ** AND THEN the double scrollbar appears. By experimenting with the value of objectheight, I have found that increasing it to 160 makes for a better display (in the cases mentioned above). But of course this adds some extra "blank" space at the bottom of the page, which may not be desired. The solution lies in finding a way to better calculate the real height of the top part of the page in order to find a better value than the default 120px given at the moment. This may or may not be feasible. #4- As for the problem with fixed width themes (my orangechoc theme) I have found that adding the CSS rule body {overflow-x: hidden;} to the CSS of my HTML uploaded files solves the problem. Plus a couple of other minor changes. So that's OK for the moment. Joseph PS.- I'm sorry if I sounded a bit harsh in my previous comment...
          Hide
          Jérôme Mouneyrac added a comment -

          Hi Joseph, you didn't sound harsh. I understand that it is bad to have a broken theme after an upgrade. We knew that for some people they could have a second scroll bar in low resolution. I didn't find yet a way to know the exact size of the top menu (neither the bottom description) in order to resize correctly the HTML ressource. We don't even speak about the "no javascript" version which needs static size values...

          I agree it's really annoying to navigate into an HTML ressource when there is an horizontal scroll bar. I'll have a look to the horizontal scroll bar on the standard themes 800x600.
          Thanks for the explanation and the time you're spending on this issue. I'll come back with a patch.

          Show
          Jérôme Mouneyrac added a comment - Hi Joseph, you didn't sound harsh. I understand that it is bad to have a broken theme after an upgrade. We knew that for some people they could have a second scroll bar in low resolution. I didn't find yet a way to know the exact size of the top menu (neither the bottom description) in order to resize correctly the HTML ressource. We don't even speak about the "no javascript" version which needs static size values... I agree it's really annoying to navigate into an HTML ressource when there is an horizontal scroll bar. I'll have a look to the horizontal scroll bar on the standard themes 800x600. Thanks for the explanation and the time you're spending on this issue. I'll come back with a patch.
          Hide
          Jérôme Mouneyrac added a comment - - edited

          Hi Joseph,

          • I had a look at this problem. The horizontal scroll is displayed into the embedded HTML object, not for the Moodle page => embedded HTML has to be fixed, not Moodle.
          • We cannot guess the size of the description+navigation menu,a double scrollbar will always be displayed for some theme.

          These issues come with object tag or iframe. The solution would be to come back to the "normal" frame not strict XHTML, as you suggested.
          At this moment the only thing I'm planning to fix is the double scrollbar for all standard themes.

          I'll talk back with Martin about this issue.

          PS: I'll not be available before January, I'm off from tomorrow .

          Show
          Jérôme Mouneyrac added a comment - - edited Hi Joseph, I had a look at this problem. The horizontal scroll is displayed into the embedded HTML object, not for the Moodle page => embedded HTML has to be fixed, not Moodle. We cannot guess the size of the description+navigation menu,a double scrollbar will always be displayed for some theme. These issues come with object tag or iframe. The solution would be to come back to the "normal" frame not strict XHTML, as you suggested. At this moment the only thing I'm planning to fix is the double scrollbar for all standard themes. I'll talk back with Martin about this issue. PS: I'll not be available before January, I'm off from tomorrow .
          Hide
          Jérôme Mouneyrac added a comment -

          Martin: I'll probably not have time to implement the Frame/Object option.
          You'll need to look at the attached patch: MDL-10021.patch
          We just need to put back the removed lines of this patch.
          Then change the user interface: option "Keep navigation on top" should be changed into a select box:
          No
          Yes, Frame (Better display)
          Yes, Object (XHTML strict)

          Thanks

          Show
          Jérôme Mouneyrac added a comment - Martin: I'll probably not have time to implement the Frame/Object option. You'll need to look at the attached patch: MDL-10021 .patch We just need to put back the removed lines of this patch. Then change the user interface: option "Keep navigation on top" should be changed into a select box: No Yes, Frame (Better display) Yes, Object (XHTML strict) Thanks
          Hide
          Jérôme Mouneyrac added a comment -

          Hi, I'm back from holidays. I attached a patch implementing the select box solution (no, frame tag, object tag) for 1.9.

          Show
          Jérôme Mouneyrac added a comment - Hi, I'm back from holidays. I attached a patch implementing the select box solution (no, frame tag, object tag) for 1.9.
          Hide
          Jérôme Mouneyrac added a comment - - edited

          Commited on 1.8, 1.9 and HEAD

          The "keep navigation visible" option is now a select box.

          No: navigation isn't visible
          Yes with frame: navigation is visible, file is embedded in a frame tag (same display as before the first fix for this issue)
          Yes without frame: navigation is visible, file is embedded in a object tag (display similar to pdf file, flash file, ...)

          Show
          Jérôme Mouneyrac added a comment - - edited Commited on 1.8, 1.9 and HEAD The "keep navigation visible" option is now a select box. No: navigation isn't visible Yes with frame: navigation is visible, file is embedded in a frame tag (same display as before the first fix for this issue) Yes without frame: navigation is visible, file is embedded in a object tag (display similar to pdf file, flash file, ...)
          Hide
          Joseph Rézeau added a comment -

          Thank you Jerome,
          The latest change is fine with me (offering the 3 options including the possibility to keep a frame tag).
          However, any uploaded file resource that had previously been embedded in an object tag now defaults to the frame tag, which means that one has to edit them one by one to change from frame to object (if desired).
          Anyway, I think that now we have reached an acceptable solution for all concerned,
          Thanks,
          Joseph

          Show
          Joseph Rézeau added a comment - Thank you Jerome, The latest change is fine with me (offering the 3 options including the possibility to keep a frame tag). However, any uploaded file resource that had previously been embedded in an object tag now defaults to the frame tag, which means that one has to edit them one by one to change from frame to object (if desired). Anyway, I think that now we have reached an acceptable solution for all concerned, Thanks, Joseph
          Hide
          Jérôme Mouneyrac added a comment -

          Hi Joseph,
          I knew you, Daniele and some others would have to change code/settings. I decided to not add some hacky code to manage the two situations (people who updated Moodle in the two last months and people who didn't). So people who updated their Moodle following the first "fix" could have to change the 'keep navigation visible' setting a new time.
          It's annoying, and I apologize for that.
          Thank you for your effort. I stay tuned

          Show
          Jérôme Mouneyrac added a comment - Hi Joseph, I knew you, Daniele and some others would have to change code/settings. I decided to not add some hacky code to manage the two situations (people who updated Moodle in the two last months and people who didn't). So people who updated their Moodle following the first "fix" could have to change the 'keep navigation visible' setting a new time. It's annoying, and I apologize for that. Thank you for your effort. I stay tuned
          Hide
          Helen Foster added a comment -

          Amending fix versions.

          Show
          Helen Foster added a comment - Amending fix versions.
          Hide
          Helen Foster added a comment -
          Show
          Helen Foster added a comment - Daniele, Jerome, Joseph, and everyone else, a big thank you for all your work on this issue Documentation added: http://docs.moodle.org/en/File_or_website_link#Keep_page_navigation_visible_on_the_same_page http://docs.moodle.org/en/Moodle_1.8.8_release_notes http://docs.moodle.org/en/Moodle_1.9.4_release_notes
          Hide
          Helen Foster added a comment -

          PS Just wondering whether we should have a "Keep page navigation visible on the same page" default setting in Administration > Modules > Activities > Resource? If you think so too, please create a new issue for it.

          Show
          Helen Foster added a comment - PS Just wondering whether we should have a "Keep page navigation visible on the same page" default setting in Administration > Modules > Activities > Resource? If you think so too, please create a new issue for it.
          Hide
          Ray Lawrence added a comment -

          Can someone answer this question for me?

          These changes have been added to improve accessibility - presumably for those who use screen readers.

          When a user has Screenreader set to "Yes" in their profile the settings here are ignored ... so what's the point of making the changes if those it's implemented for do get to use it?

          Show
          Ray Lawrence added a comment - Can someone answer this question for me? These changes have been added to improve accessibility - presumably for those who use screen readers. When a user has Screenreader set to "Yes" in their profile the settings here are ignored ... so what's the point of making the changes if those it's implemented for do get to use it?
          Hide
          Ray Lawrence added a comment -

          I'm really not convinced that displaying the summary text at the bottom of the screen is a good idea.

          On a 1024 x 768 screen this makes the viewable area of the web page too small. it's not user friendly to have this small area within the Moodle page.

          IMO this needs to be at the top of the page so that more of the web page can be displayed below. We really need to lessen the likelihood of scroll bars appearing.

          Show
          Ray Lawrence added a comment - I'm really not convinced that displaying the summary text at the bottom of the screen is a good idea. On a 1024 x 768 screen this makes the viewable area of the web page too small. it's not user friendly to have this small area within the Moodle page. IMO this needs to be at the top of the page so that more of the web page can be displayed below. We really need to lessen the likelihood of scroll bars appearing.
          Hide
          Ray Lawrence added a comment -

          I didn't receive alerts for my earlier posts. Re-opening in case that's required to send alerts.

          Show
          Ray Lawrence added a comment - I didn't receive alerts for my earlier posts. Re-opening in case that's required to send alerts.
          Hide
          Ray Lawrence added a comment -

          Sorry to keep on about this but I've been playing around further. I've attached a screen shot at 1024 x 768.

          I don't believe that what is displayed is a useful representation of the site at www.register.co.uk

          Show
          Ray Lawrence added a comment - Sorry to keep on about this but I've been playing around further. I've attached a screen shot at 1024 x 768. I don't believe that what is displayed is a useful representation of the site at www.register.co.uk
          Hide
          Jérôme Mouneyrac added a comment -

          Hi Ray,

          • if screen reader is set to yes, keep navigation visible is ignored. It was the same behavior before this issue fix.
          • if you select "Yes, frameset" => it should behave as before the issue fix (frameset + description on the top). You probably want to revert your "keep navigation visible" setting to this option.
          • when you select "Yes, object" => it should behave as it does for the mp3 file, flash file, ... (description on the bottom)

          If it doesn't work like that, it's a bug.

          Hope it helps

          Show
          Jérôme Mouneyrac added a comment - Hi Ray, if screen reader is set to yes, keep navigation visible is ignored. It was the same behavior before this issue fix. if you select "Yes, frameset" => it should behave as before the issue fix (frameset + description on the top). You probably want to revert your "keep navigation visible" setting to this option. when you select "Yes, object" => it should behave as it does for the mp3 file, flash file, ... (description on the bottom) If it doesn't work like that, it's a bug. Hope it helps
          Hide
          Ray Lawrence added a comment -

          Hi,

          Screen reader: Yes, so there's no accessibility improvement?

          Yes it works like that... and that's the issue.

          The no frame (object?) option is pretty hopeless on a 1024 x 768 res. monitor. See screenshot. Better solution: summary at top of page, longer space for display of web page etc.

          Show
          Ray Lawrence added a comment - Hi, Screen reader: Yes, so there's no accessibility improvement? Yes it works like that... and that's the issue. The no frame (object?) option is pretty hopeless on a 1024 x 768 res. monitor. See screenshot. Better solution: summary at top of page, longer space for display of web page etc.
          Hide
          Martin Dougiamas added a comment -

          There's a lot of issues here in balance, Ray...

          Accessibility is not supposed to totally rely on the screenreader setting ... in fact even having that setting is considered bad form by many people who are interested in Moodle's accessibility (since it's so hard to find, I think). We use it just to force-disable some interfaces in a few places where we could not make things work both ways automatically.

          Moodle is XHTML strict ... frames are not allowed in XHTML strict. They are the best solution for this problem IMHO but they can't be our default solution if we want to be XHTML strict (and we do). They are there as an option if you don't care.

          Objects allow us to be strict but don't work quite like frames, as you see. it's basically impossible to have an arbitrary-length summary at the top (remember this could be pages long for some people) and then have a scrolling object WITHIN the same page ... remember that the scrollbars need to fit in the same page ... if the object is only half on the visible page then it's really difficult to scroll down to the bottom, because you have to scroll the real page first, and then the object. You don't want that, trust me.

          Consistency of an interface is also important. Currently, all the resource types work consistently for all file types and this is a good thing I think.

          We also can't make too radical changes in the stable branch for 1.9.... especially for resources.

          At the moment I think we have the best solution for 1.9 which balances all these things, even if it's not perhaps ideal.

          The resource module is being rewritten in Moodle 2.0 anyway, that would be a good time to perhaps make some radical changes if we can agree exactly what they are.

          Show
          Martin Dougiamas added a comment - There's a lot of issues here in balance, Ray... Accessibility is not supposed to totally rely on the screenreader setting ... in fact even having that setting is considered bad form by many people who are interested in Moodle's accessibility (since it's so hard to find, I think). We use it just to force-disable some interfaces in a few places where we could not make things work both ways automatically. Moodle is XHTML strict ... frames are not allowed in XHTML strict. They are the best solution for this problem IMHO but they can't be our default solution if we want to be XHTML strict (and we do). They are there as an option if you don't care. Objects allow us to be strict but don't work quite like frames, as you see. it's basically impossible to have an arbitrary-length summary at the top (remember this could be pages long for some people) and then have a scrolling object WITHIN the same page ... remember that the scrollbars need to fit in the same page ... if the object is only half on the visible page then it's really difficult to scroll down to the bottom, because you have to scroll the real page first, and then the object. You don't want that, trust me. Consistency of an interface is also important. Currently, all the resource types work consistently for all file types and this is a good thing I think. We also can't make too radical changes in the stable branch for 1.9.... especially for resources. At the moment I think we have the best solution for 1.9 which balances all these things, even if it's not perhaps ideal. The resource module is being rewritten in Moodle 2.0 anyway, that would be a good time to perhaps make some radical changes if we can agree exactly what they are.
          Hide
          Joseph Rézeau added a comment -

          Martin wrote > At the moment I think we have the best solution for 1.9 which balances all these things, even if it's not perhaps ideal.
          ... for 1.9 AND 1.8
          I agree that with choice of display (frame vs. object) we have the best solution at the moment. Since I never ever use a "summary" for resources (I see no use for it) the display of the summary being pushed to the bottom of the screen does not bother me, but I understand it can be a strange place to display a summary for those who do use it.
          Joseph

          Show
          Joseph Rézeau added a comment - Martin wrote > At the moment I think we have the best solution for 1.9 which balances all these things, even if it's not perhaps ideal. ... for 1.9 AND 1.8 I agree that with choice of display (frame vs. object) we have the best solution at the moment. Since I never ever use a "summary" for resources (I see no use for it) the display of the summary being pushed to the bottom of the screen does not bother me, but I understand it can be a strange place to display a summary for those who do use it. Joseph
          Hide
          Ray Lawrence added a comment -

          Thanks for that additional info. that's given me a broader appreciation of the issues involved.

          I think Joseph's comments speak volumes in that he never uses the summary ,whilst others do. So different to please all users and their contexts.

          Interested in the scale of the resource mod rewrite. Could you share a little here, in email or in docs (couldn't find it on the roadmap).

          Cheers.

          Show
          Ray Lawrence added a comment - Thanks for that additional info. that's given me a broader appreciation of the issues involved. I think Joseph's comments speak volumes in that he never uses the summary ,whilst others do. So different to please all users and their contexts. Interested in the scale of the resource mod rewrite. Could you share a little here, in email or in docs (couldn't find it on the roadmap). Cheers.
          Hide
          Helen Foster added a comment -

          Thanks everyone for the additional comments.

          Show
          Helen Foster added a comment - Thanks everyone for the additional comments.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: