Commit a6cfa223 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Remove owner format drop-down when creating/editing group views

parent f020757e
...@@ -498,7 +498,7 @@ ...@@ -498,7 +498,7 @@
<FIELD NAME="title" TYPE="text" NOTNULL="true" /> <FIELD NAME="title" TYPE="text" NOTNULL="true" />
<FIELD NAME="description" TYPE="text" NOTNULL="false" /> <FIELD NAME="description" TYPE="text" NOTNULL="false" />
<FIELD NAME="owner" TYPE="int" LENGTH="10" NOTNULL="false" /> <FIELD NAME="owner" TYPE="int" LENGTH="10" NOTNULL="false" />
<FIELD NAME="ownerformat" TYPE="text" NOTNULL="true" /> <FIELD NAME="ownerformat" TYPE="text" NOTNULL="false" />
<FIELD NAME="group" TYPE="int" LENGTH="10" NOTNULL="false" /> <FIELD NAME="group" TYPE="int" LENGTH="10" NOTNULL="false" />
<FIELD NAME="startdate" TYPE="datetime" /> <FIELD NAME="startdate" TYPE="datetime" />
<FIELD NAME="stopdate" TYPE="datetime" /> <FIELD NAME="stopdate" TYPE="datetime" />
......
...@@ -1197,6 +1197,10 @@ function xmldb_core_upgrade($oldversion=0) { ...@@ -1197,6 +1197,10 @@ function xmldb_core_upgrade($oldversion=0) {
execute_sql('ALTER TABLE {group_member_invite} ADD COLUMN role VARCHAR(255)'); execute_sql('ALTER TABLE {group_member_invite} ADD COLUMN role VARCHAR(255)');
} }
if ($oldversion < 2008062310) {
execute_sql('ALTER TABLE {view} ALTER COLUMN ownerformat DROP NOT NULL');
}
return $status; return $status;
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
defined('INTERNAL') || die(); defined('INTERNAL') || die();
$config = new StdClass; $config = new StdClass;
$config->version = 2008062309; $config->version = 2008062310;
$config->release = '1.1.0alpha'; $config->release = '1.1.0alpha';
$config->minupgradefrom = 2007080700; $config->minupgradefrom = 2007080700;
$config->minupgraderelease = '0.8.0 (release tag 0.8.0_RELEASE)'; $config->minupgraderelease = '0.8.0 (release tag 0.8.0_RELEASE)';
......
...@@ -124,14 +124,6 @@ $editview = array( ...@@ -124,14 +124,6 @@ $editview = array(
'defaultvalue' => isset($view) ? $view->get('tags') : null, 'defaultvalue' => isset($view) ? $view->get('tags') : null,
'help' => true, 'help' => true,
), ),
'ownerformat' => array(
'type' => 'select',
'title' => get_string('ownerformat','view'),
'description' => get_string('ownerformatdescription','view'),
'options' => $ownerformatoptions,
'defaultvalue' => isset($view) ? $view->get('ownerformat') : FORMAT_NAME_DISPLAYNAME,
'rules' => array('required' => true),
),
'submit' => array( 'submit' => array(
'type' => 'submitcancel', 'type' => 'submitcancel',
'value' => array(empty($new) ? get_string('save') : get_string('next'), get_string('cancel')), 'value' => array(empty($new) ? get_string('save') : get_string('next'), get_string('cancel')),
...@@ -146,6 +138,16 @@ if ($group) { ...@@ -146,6 +138,16 @@ if ($group) {
'value' => $group 'value' => $group
); );
} }
else {
$editview['elements']['ownerformat'] = array(
'type' => 'select',
'title' => get_string('ownerformat','view'),
'description' => get_string('ownerformatdescription','view'),
'options' => $ownerformatoptions,
'defaultvalue' => isset($view) ? $view->get('ownerformat') : FORMAT_NAME_DISPLAYNAME,
'rules' => array('required' => true),
);
}
$editview = pieform($editview); $editview = pieform($editview);
......
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