Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-15776

Read-only mode

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.9.3, 2.6
    • Fix Version/s: None
    • Component/s: General
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_26_STABLE

      Description

      It would be nice to have a "read-only" mode in Moodle, probably set with a $CFG variable like $CFG->readonly=true;

      Its principal benefit would be for a second server (perhaps located off-site) that is the slave of a Master-Slave SQL database. Users could access the second machine with an address like backup.moodle.org

      When $CFG-readyonly was set to true, no changes could be written to the database. For my own test purposes, I have given the database user only SELECT privileges.

      It should also write something to the page header that says to the effect: "This server is in Read-Only mode. You may use it for reference, but your work should be done off-line and added to Moodle when it is available for writing".

      In this mode, form elements that would lead to writing would be grayed out.

      It would be anticipated that something like rsync or other file sync technology would be used to keep datafiles fairly up-to-date.

      This would address the issue of students not being able to continue with their work or get access to their assignments and resources when the Moodle server has gone down. Potentially, if the primary server has more permanent problems, this slave server could be brought online as the primary server by turning off read-only mode.

      In my preliminary testing of this concept, there are only about 6 or 7 places where conditional statements need to be put in the database code to keep warnings from happening in the case of attempted writes.

      This new feature, however, would be a good mechanism to make Moodle available during a server or in some cases, network failure situation.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                7 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated: