Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
42131376
Commit
42131376
authored
Oct 15, 2007
by
nfreear
Browse files
Fixes MDL-11430, Flickr & Youtube tag blocks should use list markup.
parent
53420696
Changes
2
Hide whitespace changes
Inline
Side-by-side
blocks/tag_flickr/block_tag_flickr.php
View file @
42131376
...
...
@@ -94,13 +94,13 @@ class block_tag_flickr extends block_base {
if
(
strcmp
(
$search
[
'stat'
],
'ok'
)
!=
0
)
return
;
//if no results were returned, exit...
//render the list of photos
$text
=
''
;
foreach
(
$photos
as
$photo
)
{
$text
.
=
'<a href="http://www.flickr.com/photos/'
.
$photo
[
'owner'
]
.
'/'
.
$photo
[
'id'
]
.
'/">'
;
$text
.
=
'<img
title="'
.
s
(
$photo
[
'title'
])
.
'"
alt="'
.
s
(
$photo
[
'title'
])
.
'" class="flickr-photos" src="'
.
$this
->
build_photo_url
(
$photo
,
'square'
)
.
'
" /></a>
'
;
}
//
Accessibility:
render the list of photos
$text
=
'
<ul class="inline-list">
'
;
foreach
(
$photos
as
$photo
)
{
$text
.
=
'<
li><
a href="http://www.flickr.com/photos/'
.
$photo
[
'owner'
]
.
'/'
.
$photo
[
'id'
]
.
'/"
title="'
.
s
(
$photo
[
'title'
])
.
'"
>'
;
$text
.
=
'<img alt="'
.
s
(
$photo
[
'title'
])
.
'" class="flickr-photos" src="'
.
$this
->
build_photo_url
(
$photo
,
'square'
)
.
"
\
"
/></a>
</li>
\n
"
;
}
$text
.
=
"</ul>
\n
"
;
$this
->
content
=
new
stdClass
;
$this
->
content
->
text
=
$text
;
...
...
blocks/tag_youtube/block_tag_youtube.php
View file @
42131376
...
...
@@ -150,24 +150,19 @@ class block_tag_youtube extends block_base {
function
render_video_list
(
$xmlobj
){
$text
=
''
;
$text
.
=
'<
table
class="yt-video-entry">'
;
$text
.
=
'<
ul
class="yt-video-entry
unlist img-text
">'
;
$videos
=
$xmlobj
[
'ut_response'
][
'video_list'
][
'video'
];
foreach
(
$videos
as
$video
){
$text
.
=
'<tr>'
;
$text
.
=
'<td>'
;
$text
.
=
'<li>'
;
$text
.
=
'<a href="'
.
s
(
$video
[
'url'
])
.
'">'
;
$text
.
=
'<img alt="'
.
s
(
$video
[
'title'
])
.
'" class="youtube-thumb" title="'
.
s
(
$video
[
'title'
])
.
'" style="padding:3px;" src="'
.
$video
[
'thumbnail_url'
]
.
'"/>'
;
$text
.
=
"</a>"
;
$text
.
=
"</td>"
;
$text
.
=
'<td>'
;
$text
.
=
'<a href="'
.
s
(
$video
[
'url'
])
.
'">'
.
s
(
$video
[
'title'
])
.
'</a>'
;
$text
.
=
'<img alt="" class="youtube-thumb" style="padding:3px;" src="'
.
$video
[
'thumbnail_url'
]
.
'" /> <span>'
;
$text
.
=
s
(
$video
[
'title'
])
.
'</span></a>'
;
$text
.
=
'<br/>'
;
$text
.
=
format_time
(
$video
[
'length_seconds'
]);
$text
.
=
'</td>'
;
$text
.
=
'</tr>'
;
$text
.
=
"</li>
\n
"
;
}
$text
.
=
'
</
table>'
;
$text
.
=
"
</
ul>
\n
"
;
return
$text
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment