fixed a few typos preventing JS execution :-D
authorPetr Skoda <skodak@moodle.org>
Mon, 19 Jul 2010 13:55:50 +0000 (13:55 +0000)
committerPetr Skoda <skodak@moodle.org>
Mon, 19 Jul 2010 13:55:50 +0000 (13:55 +0000)
user/files.php
user/renderer.php

index 5092d59..1cab68e 100644 (file)
@@ -42,9 +42,6 @@ $PAGE->set_heading($title);
 $PAGE->set_pagelayout('mydashboard');
 $PAGE->set_pagetype('user-files');
 
-$module = array('name'=>'core_user', 'fullpath'=>'/user/module.js');
-$PAGE->requires->js_init_call('M.core_user.init_tree', null, false, $module);
-
 echo $OUTPUT->header();
 echo $OUTPUT->box_start('generalbox');
 
index a7f9842..1a4c7ff 100644 (file)
@@ -39,7 +39,9 @@ class core_user_renderer extends plugin_renderer_base {
 
     public function render_user_files_tree(user_files_tree $tree) {
         $htmlid = 'user_files_tree_'.uniqid();
-        $this->page->requires->js_init_call('M.user_core.init_tree', array(false, $htmlid));
+        $module = array('name'=>'core_user', 'fullpath'=>'/user/module.js');
+        $this->page->requires->js_init_call('M.core_user.init_tree', array(false, $htmlid), false, $module);
+
         $html = '<div id="'.$htmlid.'">';
         $html .= $this->htmllize_tree($tree, $tree->dir);
         $html .= '</div>';