From 7d4dfc481e65a2548d32723a4726ddc833cdd1f5 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Wed, 30 Sep 2009 10:57:57 +0000 Subject: [PATCH] quiz: MDL-19145 Safe Exam Browser integration. This is a better alternative to 'secure' mode. It needs to be enabled by the administrator. --- admin/settings/development.php | 1 + lang/en_utf8/admin.php | 2 + lang/en_utf8/help/quiz/browsersecurity.html | 56 +++++++++++++++++++++ lang/en_utf8/quiz.php | 5 ++ mod/quiz/accessrules.php | 34 ++++++++++++- mod/quiz/attempt.php | 3 ++ mod/quiz/locallib.php | 9 ++++ mod/quiz/mod_form.php | 10 +++- mod/quiz/review.php | 2 + mod/quiz/summary.php | 3 ++ 10 files changed, 121 insertions(+), 4 deletions(-) create mode 100644 lang/en_utf8/help/quiz/browsersecurity.html diff --git a/admin/settings/development.php b/admin/settings/development.php index a0914e7f70..e1a37cccdb 100644 --- a/admin/settings/development.php +++ b/admin/settings/development.php @@ -14,6 +14,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page $item->set_updatedcallback('reset_text_filters_cache'); $temp->add($item); $temp->add(new admin_setting_configcheckbox('experimentalsplitrestore', get_string('experimentalsplitrestore', 'admin'), get_string('configexperimentalsplitrestore', 'admin'), 0)); + $temp->add(new admin_setting_configcheckbox('enablesafebrowserintegration', get_string('enablesafebrowserintegration', 'admin'), get_string('configenablesafebrowserintegration', 'admin'), 0)); $ADMIN->add('experimental', $temp); diff --git a/lang/en_utf8/admin.php b/lang/en_utf8/admin.php index 2e9dd367ac..d5057b854c 100644 --- a/lang/en_utf8/admin.php +++ b/lang/en_utf8/admin.php @@ -145,6 +145,7 @@ $string['configenablehtmlpurifier'] = 'Use HTML Purifier instead of KSES for cle $string['configenablerssfeeds'] = 'This switch will enable RSS feeds from across the site. To actually see any change you will need to enable RSS feeds in the individual modules too - go to the Modules settings under Admin Configuration.'; $string['configenablerssfeedsdisabled'] = 'It is not available because RSS feeds are disabled in all the Site. To enable them, go to the Variables settings under Admin Configuration.'; $string['configenablerssfeedsdisabled2'] = 'RSS feeds are disabled at the server level. You need to enable them first in Server/RSS.'; +$string['configenablesafebrowserintegration'] = 'This adds the choice \'Require Safe Exam Browser\' to the \'Browser security\' field on the quiz settings form. See http://www.safeexambrowser.org/ for more information.'; $string['configenablestats'] = 'If you choose \'yes\' here, Moodle\'s cronjob will process the logs and gather some statistics. Depending on the amount of traffic on your site, this can take awhile. If you enable this, you will be able to see some interesting graphs and statistics about each of your courses, or on a sitewide basis.'; $string['configenabletrusttext'] = 'By default Moodle will always thoroughly clean text that comes from users to remove any possible bad scripts, media etc that could be a security risk. The Trusted Content system is a way of giving particular users that you trust the ability to include these advanced features in their content without interference. To enable this system, you need to first enable this setting, and then grant the Trusted Content permission to a specific Moodle role. Texts created or uploaded by such users will be marked as trusted and will not be cleaned before display.'; $string['configenablewebservices'] = 'Web services enable other systems to log in to this Moodle and perform operations. For extra security this feature should be disabled unless you are really using it.'; @@ -406,6 +407,7 @@ $string['enablegroupings'] = 'Enable groupings'; $string['enablehtmlpurifier'] = 'Enable HTML Purifier'; $string['enablerecordcache'] = 'Enable Record Cache'; $string['enablerssfeeds'] = 'Enable RSS feeds'; +$string['enablesafebrowserintegration'] = 'Enable Safe Exam Browser integration'; $string['enablestats'] = 'Enable statistics'; $string['enabletrusttext'] = 'Enable Trusted Content'; $string['enablewebservices'] = 'Enable web services'; diff --git a/lang/en_utf8/help/quiz/browsersecurity.html b/lang/en_utf8/help/quiz/browsersecurity.html new file mode 100644 index 0000000000..61573dc4f5 --- /dev/null +++ b/lang/en_utf8/help/quiz/browsersecurity.html @@ -0,0 +1,56 @@ +

Browser security

+ +

This option offers various ways to try to restrict how students may try to 'cheat' +while attempting a quiz. However, this is not a simple issue, and what in one situation +is considered 'cheating' may, in another situation, just be effective use of information +technology. (For example, the ability to quickly find answers using a search engine.)

+ +

Note also that this is not just at problem of technology with a technical solution. +Cheating has been going on since long before computers, and while computers make certain +actions, like copy and paste, easier, they also make it easier for teachers to detect +cheating - for example using the quiz reports. The options provided here are not fool-proof, +and while they do make some forms of cheating harder for students, they also make it more +inconvenient for students to attempt the quizzes, and they are not fool-proof.

+ +

You should alos consider other ways to make it harder for students to cheat at your quiz:

+