From b398c4c28d63695a213f1d75ba3e2620a127af29 Mon Sep 17 00:00:00 2001
From: David Mudrak <david.mudrak@gmail.com>
Date: Mon, 4 Jan 2010 17:54:03 +0000
Subject: [PATCH] Dropping support for Workshop password

Discussed with Petr. Password protection should be sorted out at the
core level (conditionlib maybe).
---
 mod/workshop/db/install.xml            | 5 ++---
 mod/workshop/lang/en_utf8/workshop.php | 1 -
 mod/workshop/mod_form.php              | 5 -----
 3 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/mod/workshop/db/install.xml b/mod/workshop/db/install.xml
index 04716a93b3..fa7a3623a7 100644
--- a/mod/workshop/db/install.xml
+++ b/mod/workshop/db/install.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="mod/workshop/db" VERSION="20090812" COMMENT="XMLDB file for Moodle mod/workshop"
+<XMLDB PATH="mod/workshop/db" VERSION="20090813" COMMENT="XMLDB file for Moodle mod/workshop"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
 >
@@ -31,8 +31,7 @@
         <FIELD NAME="submissionend" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="0 = will be closed manually, greater than 0 the timestamp of the end of the submission phase" PREVIOUS="submissionstart" NEXT="assessmentstart"/>
         <FIELD NAME="assessmentstart" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="0 = will be started manually, greater than 0 the timestamp of the start of the assessment phase" PREVIOUS="submissionend" NEXT="assessmentend"/>
         <FIELD NAME="assessmentend" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="0 = will be closed manually, greater than 0 the timestamp of the end of the assessment phase" PREVIOUS="assessmentstart" NEXT="releasegrades"/>
-        <FIELD NAME="releasegrades" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="0 = will be released manually, greater than 0 the timestamp when final grades are published" PREVIOUS="assessmentend" NEXT="password"/>
-        <FIELD NAME="password" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" COMMENT="The access password" PREVIOUS="releasegrades"/>
+        <FIELD NAME="releasegrades" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="0 = will be released manually, greater than 0 the timestamp when final grades are published" PREVIOUS="assessmentend"/>
       </FIELDS>
       <KEYS>
         <KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="course_fk"/>
diff --git a/mod/workshop/lang/en_utf8/workshop.php b/mod/workshop/lang/en_utf8/workshop.php
index cf75f40514..3397a0f79b 100644
--- a/mod/workshop/lang/en_utf8/workshop.php
+++ b/mod/workshop/lang/en_utf8/workshop.php
@@ -150,7 +150,6 @@ $string['previewassessmentform'] = 'Preview';
 $string['randomallocationdone'] = 'Random allocation done';
 $string['releasegrades'] = 'Push final grades into the gradebook';
 $string['removecurrentallocations'] = 'Remove current allocations';
-$string['requirepassword'] = 'Require password';
 $string['saveandclose'] = 'Save and close';
 $string['saveandcontinue'] = 'Save and continue editing';
 $string['saveandpreview'] = 'Save and preview';
diff --git a/mod/workshop/mod_form.php b/mod/workshop/mod_form.php
index 56c806b250..44a4bc4095 100644
--- a/mod/workshop/mod_form.php
+++ b/mod/workshop/mod_form.php
@@ -186,11 +186,6 @@ class mod_workshop_mod_form extends moodleform_mod {
         $mform->setHelpButton('releasegrades', array('releasegrades', $label, 'workshop'));
         $mform->setAdvanced('releasegrades');
 
-        $label = get_string('requirepassword', 'workshop');
-        $mform->addElement('passwordunmask', 'password', $label);
-        $mform->setType('quizpassword', PARAM_TEXT);
-        $mform->setHelpButton('password', array('requirepassword', $label, 'workshop'));
-
 /// Common module settinga, Restrict availability, Activity completion etc. ----
         $features = array('groups'=>true, 'groupings'=>true, 'groupmembersonly'=>true,
                 'outcomes'=>true, 'gradecat'=>false, 'idnumber'=>false);
-- 
2.39.5