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

Read-only mode


    • Icon: New Feature New Feature
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 1.9.3, 2.6
    • General
    • None

      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.

            10 Vote for this issue
            19 Start watching this issue


                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.