Note:

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

XML Administrator Settings

From MoodleDocs

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

Needs Assesment

This is a current list of features that have been suggested/requested. This is not the finalized list and will need a community review:

  • Selection of settings to export (grouped in a tree format as displayed in the administrator panel)
  • Naming and saving of XML files as special "templates" to be applied to a new install of Moodle for specific situations.
  • An interface listing the templates (XML exported files with the "template" attribute set)
  • A way to record the registered templates (beyond detecting the filesystem)
  • A view of the settings available for restore in a given XML file
  • Partial export/import

Glossary

Term Definition
Preview The ability to see the contents of a template before applying it (either all the settings, or the settings that will be changed)
Settings tree A tree containing all Moodle settings in the same organization as the site administration page
Template An XML file containing either full or partial Moodle settings.

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