Permalink
Browse files

MDL-31311 Enhance unhelpful iframe title attributes

  • Loading branch information...
1 parent a49e771 commit d7630cca43eeb2b4c58dc707873d481da1a2d45b Glenn Ansley committed with wdjunaidi Jan 27, 2012
Showing with 4 additions and 2 deletions.
  1. +2 −1 mod/resource/locallib.php
  2. +2 −1 mod/url/locallib.php
@@ -155,6 +155,7 @@ function resource_display_frame($resource, $cm, $course, $file) {
$navurl = "$CFG->wwwroot/mod/resource/view.php?id=$cm->id&frameset=top";
$title = strip_tags(format_string($course->shortname.': '.$resource->name));
$framesize = $config->framesize;
+ $contentframetitle = format_string($resource->name);
$modulename = s(get_string('modulename','resource'));
$dir = get_string('thisdirection', 'langconfig');
@@ -167,7 +168,7 @@ function resource_display_frame($resource, $cm, $course, $file) {
</head>
<frameset rows="$framesize,*">
<frame src="$navurl" title="$modulename" />
- <frame src="$fileurl" title="$modulename" />
+ <frame src="$fileurl" title="$contentframetitle" />
</frameset>
</html>
EOF;
View
@@ -228,6 +228,7 @@ function url_display_frame($url, $cm, $course) {
$title = strip_tags($courseshortname.': '.format_string($url->name));
$framesize = $config->framesize;
$modulename = s(get_string('modulename','url'));
+ $contentframetitle = format_string($url->name);
$dir = get_string('thisdirection', 'langconfig');
$extframe = <<<EOF
@@ -239,7 +240,7 @@ function url_display_frame($url, $cm, $course) {
</head>
<frameset rows="$framesize,*">
<frame src="$navurl" title="$modulename"/>
- <frame src="$exteurl" title="$modulename"/>
+ <frame src="$exteurl" title="$contentframetitle"/>
</frameset>
</html>
EOF;

0 comments on commit d7630cc

Please sign in to comment.