Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

XML Administrator Settings: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 4: Line 4:
I want to create a new administrative interface for importing and exporting site-wide configuration (tracker issue MDL-18548). At the basic level, it would allow administrators to save their site settings in an XML file, as well as import other saved configurations. Administrators will be able to select a subset of all settings to create a template. They can then apply templates to their site settings, either individually or with specified priorities. Moodle will then adjust change setting to the value in the highest-priority template, and then use either the current or default settings for whatever remains.
I want to create a new administrative interface for importing and exporting site-wide configuration (tracker issue MDL-18548). At the basic level, it would allow administrators to save their site settings in an XML file, as well as import other saved configurations. Administrators will be able to select a subset of all settings to create a template. They can then apply templates to their site settings, either individually or with specified priorities. Moodle will then adjust change setting to the value in the highest-priority template, and then use either the current or default settings for whatever remains.


I looked at the initially suggested features at https://docs.moodle.org/en/Talk:Projects_for_new_developers#XML_templates_for_admin_settings, and read through the discussion http://moodle.org/mod/forum/discuss.php?d=118494#p528195. I started creating some mock UIs.
== Other Discussion
*[[https://docs.moodle.org/en/Talk:Projects_for_new_developers#XML_templates_for_admin_settings Projects for new developers" XML templates for admin settings]]
*[[http://moodle.org/mod/forum/discuss.php?d=118494#p528195 Forum discussion]]


== UI Mockups ==
== UI Mockups ==
=Settings Template Creation=


[[Image:Settingsmockup1.png]]
[[Image:Settingsmockup1.png]]
All settings are available in the tree, organized in a similar fashion as the admin navbar. Checking a setting includes it in your template. The checkbox at the bottom allows you to automatically exclude sensitive settings (like passwords). Saving a template creates the XML file, and adds the file to the list of available templates.


This is an example of creating a configuration/template. All settings are available in the tree, organized in a similar fashion as the admin navbar. Checking a setting includes it in your template. The checkbox at the bottom allows you to automatically exclude sensitive settings (like passwords). Saving a template creates the XML file, and adds the file to the list of available templates.
=Applying Settings Templates=
 
[[Image:Settingsmockup2.png]]
[[Image:Settingsmockup2.png]]
The debug window at the top only appears when templates have been applied. It shows which setting was taken from which template, as well as any possible errors. Beneath it is a list of available templates (with an option to import from file). There is a checkbox that determines whether to use the default or current value for unspecified settings, but we will probably end up with more user-controlled parameters for importing. You can preview a template, bringing up the screen below. The "Use Multiple" button is an advanced feature, allowing you to choose multiple templates and sort them by priority. You can also create a new template from multiple separate templates.


This mockup shows some of the ways that admins can apply templates. The debug window at the top only appears when templates have been applied. It shows which setting was taken from which template, as well as any possible errors. Beneath it is a list of available templates (with an option to import from file). There is a checkbox that determines whether to use the default or current value for unspecified settings, but we will probably end up with more user-controlled parameters for importing. You can preview a template, bringing up the screen below. The "Use Multiple" button is an advanced feature, allowing you to choose multiple templates and sort them by priority. You can also create a new template from multiple separate templates.
=Settings Template Preview=
 
[[Image:Settingsmockup3.png]]
[[Image:Settingsmockup3.png]]


This mockup demonstrates previewing a template. It allows users to collapse and expand the sub categories, view the values that are specified, as well as seeing setting descriptions. I hope to include an editor that looks similar to this, except with the ability to change the specified value (this would edit the XML file, not the site settings).
It allows users to collapse and expand the sub categories, view the values that are specified, as well as seeing setting descriptions. I hope to include an editor that looks similar to this, except with the ability to change the specified value (this would edit the XML file, not the site settings).


I began to look around at some existing PHP code that deals with exporting site settings to xml:


== Timeline ==
== Timeline ==


    * Needs Assesment
=Needs Assesment=
           o Deadline: May 16th
           o Deadline: May 16th
           o Use the forums and tracker to find out what further features are desired (so far only around 2 people have given specifics).
           o Use the forums and tracker to find out what further features are desired (so far only around 2 people have given specifics).
           o Set up a wiki page listing the features to be implemented.
           o Set up a wiki page listing the features to be implemented.
    * UI Mockup  
=UI Mockup=
           o Deadline: May 28th
           o Deadline: May 28th
           o Create a detailed UI mockup that accounts for all features. Put this mockup on the tracker so that other users can critique and revise it.
           o Create a detailed UI mockup that accounts for all features. Put this mockup on the tracker so that other users can critique and revise it.
           o Mockup will be signed off on by mentor before continuing.
           o Mockup will be signed off on by mentor before continuing.
    * Project Design
=Project Design=
           o Deadline: June 5st
           o Deadline: June 5st
           o Specify an XML schema for managing settings.
           o Specify an XML schema for managing settings.
Line 38: Line 40:
           o Create a code outline and DO NOT start coding until the entire outline is finished.
           o Create a code outline and DO NOT start coding until the entire outline is finished.
           o Plan will be added to the wiki for comments and approved by mentor before continuing.
           o Plan will be added to the wiki for comments and approved by mentor before continuing.
    * Code features one at a time
=Code features one at a time=
           o Each feature will be listed as a task in the tracker. Code will be submitted as patches for user testing. The deadlines listed below will be when I want to have a patch submitted that fixed all the bugs found in the first round of testing for that feature.
           o Each feature will be listed as a task in the tracker. Code will be submitted as patches for user testing. The deadlines listed below will be when I want to have a patch submitted that fixed all the bugs found in the first round of testing for that feature.
           o An estimate of feature deadlines (subject to change):
           o An estimate of feature deadlines (subject to change):
Line 48: Line 50:
                 + Import multiple templates: July 25th
                 + Import multiple templates: July 25th
                 + XML/template editor: August 10th
                 + XML/template editor: August 10th
    * Create a 1.0 version
          o Deadline: August 16th
          o Decide which features are stable enough for the 1.0 release.
          o Release a beta of the code, fix any reported bugs
          o Write up suitable documentation and final evaluation

Revision as of 02:53, 12 May 2009

Motivation

I want to create a new administrative interface for importing and exporting site-wide configuration (tracker issue MDL-18548). At the basic level, it would allow administrators to save their site settings in an XML file, as well as import other saved configurations. Administrators will be able to select a subset of all settings to create a template. They can then apply templates to their site settings, either individually or with specified priorities. Moodle will then adjust change setting to the value in the highest-priority template, and then use either the current or default settings for whatever remains.

== Other Discussion

UI Mockups

Settings Template Creation

Settingsmockup1.png All settings are available in the tree, organized in a similar fashion as the admin navbar. Checking a setting includes it in your template. The checkbox at the bottom allows you to automatically exclude sensitive settings (like passwords). Saving a template creates the XML file, and adds the file to the list of available templates.

Applying Settings Templates

Settingsmockup2.png The debug window at the top only appears when templates have been applied. It shows which setting was taken from which template, as well as any possible errors. Beneath it is a list of available templates (with an option to import from file). There is a checkbox that determines whether to use the default or current value for unspecified settings, but we will probably end up with more user-controlled parameters for importing. You can preview a template, bringing up the screen below. The "Use Multiple" button is an advanced feature, allowing you to choose multiple templates and sort them by priority. You can also create a new template from multiple separate templates.

Settings Template Preview

Settingsmockup3.png

It allows users to collapse and expand the sub categories, view the values that are specified, as well as seeing setting descriptions. I hope to include an editor that looks similar to this, except with the ability to change the specified value (this would edit the XML file, not the site settings).


Timeline

Needs Assesment

         o Deadline: May 16th
         o Use the forums and tracker to find out what further features are desired (so far only around 2 people have given specifics).
         o Set up a wiki page listing the features to be implemented.

UI Mockup

         o Deadline: May 28th
         o Create a detailed UI mockup that accounts for all features. Put this mockup on the tracker so that other users can critique and revise it.
         o Mockup will be signed off on by mentor before continuing.

Project Design

         o Deadline: June 5st
         o Specify an XML schema for managing settings.
         o Create flowchart listing explicit steps for settings import and export.
         o Create a code outline and DO NOT start coding until the entire outline is finished.
         o Plan will be added to the wiki for comments and approved by mentor before continuing.

Code features one at a time

         o Each feature will be listed as a task in the tracker. Code will be submitted as patches for user testing. The deadlines listed below will be when I want to have a patch submitted that fixed all the bugs found in the first round of testing for that feature.
         o An estimate of feature deadlines (subject to change):
               + Basic export of all settings: June 13th
               + Basic import of all settings: June 24th
               + Select settings to export: July 6th
               + Import partial configuration: July 10th
               + Settings preview: July 20th
               + Import multiple templates: July 25th
               + XML/template editor: August 10th