]> git.mjollnir.org Git - moodle.git/commitdiff
Fix frames accessibility on Hotpot MDL-7468
authorskodak <skodak>
Tue, 28 Nov 2006 10:43:27 +0000 (10:43 +0000)
committerskodak <skodak>
Tue, 28 Nov 2006 10:43:27 +0000 (10:43 +0000)
lang/en_utf8/moodle.php
mod/hotpot/view.php

index 36c01abe0005eb3044e034475c6e815bdcc0ff19..d19790eb769554c7ebbb3067d14f00c72476e042 100644 (file)
@@ -583,6 +583,7 @@ $string['formattopicsajax'] = 'Topics format - AJAX';
 $string['formatweeks'] = 'Weekly format';
 $string['formatweekscss'] = 'Weekly format - CSS/No tables';
 $string['formatwiki'] = 'Wiki-like format';
+$string['framesetinfo'] = 'This frameset document contains:';
 $string['from'] = 'From';
 $string['frontpagecategorycombo'] = 'Combo list';
 $string['frontpagecategorynames'] = 'List of categories';
index 713b8d3b1d4c17d00c93fb92ef43a8a5165cf133..e6e6c719761ba3e27f050747b0c064daf0f0c457 100644 (file)
                     print $hp->html;
                 break;
                 default:
+                    $txtframesetinfo = get_string('framesetinfo');
+                    $txttoptitle     = get_string('navigation', 'hotpot');
+                    $txtmaintitle    = get_string('modulename', 'hotpot');
+
                     $rows = empty($CFG->resource_framesize) ? 85 : $CFG->resource_framesize;
+
+                    @header('Content-Type: text/html; charset=utf-8');
+                    print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\" \"http://www.w3.org/TR/html4/frameset.dtd\">\n";
                     print "<html>\n";
+                    print "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n";
                     print "<head><title>$title</title></head>\n";
                     print "<frameset rows=$rows,*>\n";
-                    print "<frame src=\"view.php?id=$cm->id&framename=top\">\n";
-                    print "<frame src=\"view.php?id=$cm->id&framename=main\">\n";
+                    print "<frame title=\"$txttoptitle\" src=\"view.php?id=$cm->id&framename=top\">\n";
+                    print "<frame title=\"$txtmaintitle\" src=\"view.php?id=$cm->id&framename=main\">\n";
+                    print "<noframes>\n";
+                    print "<p>$txtframesetinfo</p>\n";
+                    print "<ul><li><a href=\"view.php?id=$cm->id&framename=top\">$txttoptitle</a></li>\n";
+                    print "<li><a href=\"view.php?id=$cm->id&framename=main\">$txtmaintitle</a></li></ul>\n";
+                    print "</noframes>\n";
                     print "</frameset>\n";
                     print "</html>\n";
                 break;