Skip to content

Commit

Permalink
group-javascript MDL-22935 Fixed problematic conversion to Moodle 2 J…
Browse files Browse the repository at this point in the history
…S methods, Thanks Paul for the patch
  • Loading branch information
Sam Hemelryk committed Jul 23, 2010
1 parent 315d497 commit f19497f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion group/members.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,6 @@
$potentialmembersselector->print_user_summaries($course->id);

//this must be after calling display() on the selectors so their setup JS executes first
$PAGE->requires->js_function_call('init_add_remove_members_page');
$PAGE->requires->js_init_call('init_add_remove_members_page', null, false, $potentialmembersselector->get_js_module());

echo $OUTPUT->footer();
8 changes: 8 additions & 0 deletions user/selector/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,14 @@ public function output_user($user) {
return parent::output_user($user) . ' (' . $user->numgroups . ')';
}

/**
* Returns the user selector JavaScript module
* @return array
*/
public function get_js_module() {
return self::$jsmodule;
}

/**
* Outputs a Javascript array containing the other groups non-members are in.
* Used on the add group members page.
Expand Down

0 comments on commit f19497f

Please sign in to comment.