Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-29224 navigation Fixed bug caused because in 20 and 21 onclick ev…

…ents get added to extra rather than onclick
  • Loading branch information...
commit 79175f20192ea70eae358c2d1ca4507025baba8d 1 parent f36e320
@samhemelryk samhemelryk authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/navigationlib.php
View
3  lib/navigationlib.php
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.