Commit bcc6034b authored by Nigel McNie's avatar Nigel McNie
Browse files

Add site option for whether just admins or all users can create "public" groups.

A public group is one for which many pages are open to the general public - not just site users, but also the public, and search engines.
parent b933f545
......@@ -129,6 +129,17 @@ $siteoptionform = array(
'options' => $yesno,
'help' => true,
),
'createpublicgroups' => array(
'type' => 'select',
'title' => get_string('whocancreatepublicgroups', 'admin'),
'description' => get_string('whocancreatepublicgroupsdescription', 'admin'),
'defaultvalue' => get_config('createpublicgroups'),
'options' => array(
'admins' => get_string('adminsonly', 'admin'),
'all' => get_string('Everyone', 'admin'),
),
'help' => true,
),
'defaultaccountlifetime' => array(
'type' => 'expiry',
'title' => get_string('defaultaccountlifetime', 'admin'),
......@@ -219,7 +230,7 @@ function siteoptions_submit(Pieform $form, $values) {
global $allowedfilters;
$fields = array('sitename','lang','theme', 'pathtoclam',
'defaultaccountlifetime', 'defaultaccountinactiveexpire', 'defaultaccountinactivewarn',
'allowpublicviews', 'allowpublicprofiles', 'searchplugin');
'allowpublicviews', 'allowpublicprofiles', 'createpublicgroups', 'searchplugin');
$oldlanguage = get_config('lang');
$oldtheme = get_config('theme');
foreach ($fields as $field) {
......
......@@ -105,6 +105,7 @@ $string['pluginadmin'] = 'Plugin Administration';
$string['pluginadmindescription'] = 'Install and configure plugins';
// Site options
$string['adminsonly'] = 'Administrators only';
$string['allowpublicviews'] = 'Allow public views';
$string['allowpublicviewsdescription'] = 'If set to yes, users will be able to create portfolio Views that are accessable to the public rather than only to logged in users';
$string['allowpublicprofiles'] = 'Allow public profiles';
......@@ -117,6 +118,7 @@ $string['defaultaccountlifetime'] = 'Default account lifetime';
$string['defaultaccountlifetimedescription'] = 'If set, user accounts will expire after this period of time from when they have been created';
$string['embeddedcontent'] = 'Embedded content';
$string['embeddedcontentdescription'] = 'If you would like users to be able to embed videos or other outside content into their portfolios, you can choose which sites to trust below.';
$string['Everyone'] = 'Everyone';
$string['language'] = 'Language';
$string['pathtoclam'] = 'Path to clam';
$string['pathtoclamdescription'] = 'The filesystem path to clamscan or clamdscan';
......@@ -140,6 +142,8 @@ $string['usersallowedmultipleinstitutionsdescription'] = 'If checked, users can
$string['usersseenewthemeonlogin'] = 'Users will see the new theme the next time they log in.';
$string['viruschecking'] = 'Virus checking';
$string['viruscheckingdescription'] = 'If checked, virus checking will be enabled for all uploaded files using ClamAV';
$string['whocancreatepublicgroups'] = 'Who can create Public Groups';
$string['whocancreatepublicgroupsdescription'] = 'If set to yes, users will be able to make groups that are viewable by the general public';
// Site content
$string['about'] = 'About';
......
<h3>Publicly Viewable Groups</h3>
<p>If you wish to allow all users to create groups that may be viewed by people who are not members of your site, set this option to 'Everyone'.</p>
<p>In a public group, anyone who finds your site (including search engines) will be able to see the group &quot;about&quot; page, the member listing, and see all discussions in the forums. However, people will still have to become a member of the site before they can peform other actions, such as posting to the forums or viewing user profiles.</p>
......@@ -622,6 +622,7 @@ function core_install_firstcoredata_defaults() {
set_config('session_timeout', 1800);
set_config('sitename', 'Mahara');
set_config('defaultaccountinactivewarn', 604800);
set_config('createpublicgroups', 'admins');
// install the applications
$app = new StdClass;
......
Markdown is supported
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