Moodle

frameset linking zip resources

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.8
  • Fix Version/s: 1.8.3, 1.9
  • Component/s: Accessibility
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

Inside a course add a resource "Link to a file or web site" and select a zip file.

Select the "Keep page navigation visible on the same page" checkbox.
Now return to the course and select the link.
The link start the download of the zip file but... at the same time shows the page with the following XHTML code:

<!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>stDan: A zip file</title></head>
<frameset rows="130,*"><frame src="view.php?id=3156&type=file&frameset=top" title="Resource"/><frame src="http://localhost:8888/eduiss/file.php/32/corsoDaFSLite.zip" title="Resource"/></frameset></html>

Frameset are not allowed by xhtml strict.
Why is this page shown?

Activity

Hide
Andrea Bicciolo added a comment -

I would rather consider it a bug. It breaks accessibility.

Show
Andrea Bicciolo added a comment - I would rather consider it a bug. It breaks accessibility.
Hide
Martin Dougiamas added a comment -

Can you look at this as well, Petr?

Show
Martin Dougiamas added a comment - Can you look at this as well, Petr?
Hide
Petr Škoda (skodak) added a comment -

Unfortunately there is no easy way to solve it in an accessible way as far as I know. Full elimination of frames is not IMO solution, because we need some fall back for mime types that are not whitelisted for embedding with object tag.

I think we could add a new option to resource mod "Forced download" and instruct users to use this option for file types that can not be embedded into page - such as zip archives.

I am proposing to defer this till 1.9.

Show
Petr Škoda (skodak) added a comment - Unfortunately there is no easy way to solve it in an accessible way as far as I know. Full elimination of frames is not IMO solution, because we need some fall back for mime types that are not whitelisted for embedding with object tag. I think we could add a new option to resource mod "Forced download" and instruct users to use this option for file types that can not be embedded into page - such as zip archives. I am proposing to defer this till 1.9.
Hide
Petr Škoda (skodak) added a comment -

BTW accessibility is needed, but it is a very tough job to make it right when the most used browser (IE) is buggy and does not respect the web standards.
We can make Moodle 100% accessible in Firefox/Opera/etc. but what should we do with breakage in IE caused by accessibility fixes? Nice examples are the workarounds in MDL-9798 and MDL-9799.

Show
Petr Škoda (skodak) added a comment - BTW accessibility is needed, but it is a very tough job to make it right when the most used browser (IE) is buggy and does not respect the web standards. We can make Moodle 100% accessible in Firefox/Opera/etc. but what should we do with breakage in IE caused by accessibility fixes? Nice examples are the workarounds in MDL-9798 and MDL-9799.
Hide
Daniele Cordella added a comment -

You are riht Petr but why do it works correctly if I try do download a course zip backup from the site file page? All is right if "Keep page navigation visible on the same page" is not selected.

Show
Daniele Cordella added a comment - You are riht Petr but why do it works correctly if I try do download a course zip backup from the site file page? All is right if "Keep page navigation visible on the same page" is not selected.
Hide
Petr Škoda (skodak) added a comment -

Because site files is always opening in new window - it does not try to show it embedded or in frames. In case of Resource mod it is more complex because we do not know if it is possible to embed it using object - if we do so, it is not possible to automatically download the file (I think), in case of frames it is much easier.

Show
Petr Škoda (skodak) added a comment - Because site files is always opening in new window - it does not try to show it embedded or in frames. In case of Resource mod it is more complex because we do not know if it is possible to embed it using object - if we do so, it is not possible to automatically download the file (I think), in case of frames it is much easier.
Hide
Daniele Cordella added a comment -

tahnk you for your answer Pert.
Why do we need to embed all.
Is it not sufficient this

?

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Untitled</title>
</head>
<body>
<p><a href="./myzipfile.zip">download this</a></p>
</body>
</html>

?

Show
Daniele Cordella added a comment - tahnk you for your answer Pert. Why do we need to embed all. Is it not sufficient this ? <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Untitled</title> </head> <body> <p><a href="./myzipfile.zip">download this</a></p> </body> </html> ?
Hide
Petr Škoda (skodak) added a comment -

well, it changes the way zip linking/downloads work in the middle of stable branch which is IMO not good - the "old frames way" works for all, even unknown file types, we have to do extra guessing when dealing with embedding using object.

This is IMO not a major bug, because teachers can use new window linking if they want to have accessible content.

Show
Petr Škoda (skodak) added a comment - well, it changes the way zip linking/downloads work in the middle of stable branch which is IMO not good - the "old frames way" works for all, even unknown file types, we have to do extra guessing when dealing with embedding using object. This is IMO not a major bug, because teachers can use new window linking if they want to have accessible content.
Hide
Daniele Cordella added a comment -

no Petr,
target attribute is not allowed. It is written, if you use it, you have to specify that you are going to open a new window... but only if it doesn't exist any other way to get the same result. In any case, the XHTML code doesn't pass the strict validation if the attribute target for the tag "a" is used.

Show
Daniele Cordella added a comment - no Petr, target attribute is not allowed. It is written, if you use it, you have to specify that you are going to open a new window... but only if it doesn't exist any other way to get the same result. In any case, the XHTML code doesn't pass the strict validation if the attribute target for the tag "a" is used.
Hide
Petr Škoda (skodak) added a comment -

No, I was talking about New window resource activity option.

Show
Petr Škoda (skodak) added a comment - No, I was talking about New window resource activity option.
Hide
Daniele Cordella added a comment -

I am sorry Petr,
but I don't understand you.
You wrote:
> teachers can use new window linking.
> New window resource activity option.
My answre is: no teachers can not use it. This implies the use of the target attribute and it is forbidden as the frameset.

Please explain me what I didn't undestand.

Show
Daniele Cordella added a comment - I am sorry Petr, but I don't understand you. You wrote: > teachers can use new window linking. > New window resource activity option. My answre is: no teachers can not use it. This implies the use of the target attribute and it is forbidden as the frameset. Please explain me what I didn't undestand.
Hide
Petr Škoda (skodak) added a comment -

I did want to say that teacher should use "New window" option in resource mod for zip files.

Show
Petr Škoda (skodak) added a comment - I did want to say that teacher should use "New window" option in resource mod for zip files.
Hide
Martin Dougiamas added a comment -

When you think about it, is a zip file accessible?

Show
Martin Dougiamas added a comment - When you think about it, is a zip file accessible?
Hide
Martin Dougiamas added a comment -

Anyhow, can we make an exception for zip to make it just download with no page?

Show
Martin Dougiamas added a comment - Anyhow, can we make an exception for zip to make it just download with no page?
Hide
Martin Dougiamas added a comment -

Should be working better now in 1.8.3 and 1.9 (it has just a simple link to download).

Show
Martin Dougiamas added a comment - Should be working better now in 1.8.3 and 1.9 (it has just a simple link to download).

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: