Giter Club home page Giter Club logo

local_read_only's Introduction

Description:

A Moodle local plugin that acts as a read-only database driver where database updates are silently discarded. Some essential tables are still written to to allow things like login, file downloads and new log records. (See list later on). User who have the site_admin role are exempt and updates will work for them as if the standard database driver was enabled. Read more about it here https://github.com/marcusgreen/local_read_only/wiki

Installation:

  1. git clone https://github.com/marcusgreen/local_read_only /pathtomoodle/local/read_only/

  2. Edit your config.php and find the line that reads

require_once(__DIR__ . '/lib/setup.php');

Add the following on the line immediatly before that line

include_once(__DIR__.'/local/read_only/db.php');
  1. Go to yourmoodle.com/admin and go through the standard plugin install and accept defaults

Credits:

Marcus Green & Hittesh Ahuja

local_read_only's People

Contributors

almadog avatar aspark21 avatar cybernotic avatar elearningatbath avatar marcusgreen avatar sorincocorada avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

local_read_only's Issues

Course sections can be deleted in read-only mode

With read-only mode enabled, a course section can be deleted.

Steps to recreate issue:
1 - Have a Moodle course with one or multiple sections
2 - Have a user enrolled onto the course with the permissions to edit or delete sections
3 - Ensure site is in read-only mode
4 - Navigate to Moodle course
5 - Turn editing on
6 - Delete a section from the course
7 - Refresh the page or turn editing off

I expected the course section to be 'deleted' until the page was refreshed, like it does when deleting an activity or resource, but the section has been deleted entirely and the action of deleting is visible within the course logs.

PHPUnit Test Error Privacy Provider

Moodle 3.5.17
Local_read_only - master @ a05707f

The following phpunit tests error has been identified:

provider_testcase::test_all_providers_compliant with data set "local_read_only" ('local_read_only', 'local_read_only\privacy\provider')
Failed asserting that false is true.

/var/www/html/privacy/tests/provider_test.php:178
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
 vendor/bin/phpunit "provider_testcase" privacy/tests/provider_test.php

Question bank not saved

After installing and activating the read only_module our users complained that when they perform a backup of a course the question bank is not saved(questuions.xml from the mbz archive contains no questions).
The same happens if:

  • backup is performed using the administrator account
  • read only is deactivated

The question bank was included again only if the read_only module was deactivated and uninstalled

Unable to achive read-only mode with plugin

Hi there,
Hopefully you will be able to help me with this.
I recently installed the plugin but kept on thinking that there must be something that I am missing?
I was able to enable 'Read Only Mode' within the admin settings and add a simple message then save changes. The alert message appeared but I was able to accomplish standard tasks (uploaded a submission and saved it) which would write to the database logged in as a student so I am assuming it was not in read only mode.
When I visited local_read_only_status, local_read_only_alert_banner or local_read_only_capabilities I received this error message:

Section error! line 494 of /lib/setuplib.php: moodle_exception thrown line 26 of /admin/settings.php: call to print_error()

Are there any step by step instructions you could supply which will insure the correct installation process?
Are there some test cases to show that it is actually working on a version of Moodle?
Thanks for your time.

Regards
David

Issues with total marks in Moodle quiz

Moodle 3.9.8
local_read_only commit @ a05707f

  • The read-only plugin is disabled from the front end.
  • include_once(DIR.'/local/read_only/db.php'); is present in config.php

We have noticed that when updating the marks in a Moodle quiz the total of marks was not updated. In order to get this working we had to comment out the line in config.php above.

image

Error on nonstandard DB port

It seems that the module fails if the database is configured to use other port than 3306 (or dboptions, dbport is ignored)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.