Skip to content

Commit

Permalink
MDL-29224 navigation Fixed bug caused because in 20 and 21 onclick ev…
Browse files Browse the repository at this point in the history
…ents get added to extra rather than onclick
  • Loading branch information
Sam Hemelryk committed Oct 12, 2011
1 parent f36e320 commit 79175f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/navigationlib.php
Expand Up @@ -1495,6 +1495,9 @@ protected function generate_sections_and_activities(stdClass $course) {
$activity->modname = $cm->modname;
$activity->nodetype = navigation_node::NODETYPE_LEAF;
$activity->onclick = $cm->get_on_click();
if (empty($activity->onclick) && !empty($cm->extra) && preg_match('/onclick=(\'|")([^\1]+)\1/', $cm->extra, $matches)) {
$activity->onclick = $matches[2];
}
$url = $cm->get_url();
if (!$url) {
$activity->url = null;
Expand Down

0 comments on commit 79175f2

Please sign in to comment.