Commit 88d49607 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

List allowed join types for group types on site view edit access screen

parent af362d40
......@@ -113,9 +113,13 @@ if ($institution) {
$createfor = $view->get_autocreate_grouptypes();
foreach (group_get_grouptypes() as $grouptype) {
safe_require('grouptype', $grouptype);
$jointypestrings = array();
foreach (call_static_method('GroupType' . $grouptype, 'allowed_join_types') as $jointype) {
$jointypestrings[] = get_string('membershiptype.'.$jointype, 'group');
}
$form['elements']['copyfornewgroups_'.$grouptype] = array(
'type' => 'checkbox',
'title' => get_string('name', 'grouptype.' . $grouptype),
'title' => get_string('name', 'grouptype.' . $grouptype) . ' (' . join(', ', $jointypestrings) . ')',
'defaultvalue' => in_array($grouptype, $createfor),
);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment