### Eclipse Workspace Patch 1.0
#P facetoface
Index: db/access.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/mod/facetoface/db/access.php,v
retrieving revision 1.4
diff -u -r1.4 access.php
--- db/access.php 30 Oct 2008 23:59:43 -0000 1.4
+++ db/access.php 27 Aug 2009 01:10:04 -0000
@@ -95,8 +95,20 @@
)
),
- // Ability to add/remove attendees from a session
- 'mod/facetoface:editattendees' => array(
+ // Ability to add attendees to a session
+ 'mod/facetoface:addattendees' => array(
+ 'captype' => 'write',
+ 'contextlevel' => CONTEXT_COURSE,
+ 'legacy' => array(
+ 'teacher' => CAP_ALLOW,
+ 'editingteacher' => CAP_ALLOW,
+ 'coursecreator' => CAP_ALLOW,
+ 'admin' => CAP_ALLOW
+ )
+ ),
+
+ // Ability to remove attendees from a session
+ 'mod/facetoface:removeattendees' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'legacy' => array(
Index: lang/nl_utf8/facetoface.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/mod/facetoface/lang/nl_utf8/facetoface.php,v
retrieving revision 1.16
diff -u -r1.16 facetoface.php
--- lang/nl_utf8/facetoface.php 27 Jan 2009 03:30:25 -0000 1.16
+++ lang/nl_utf8/facetoface.php 27 Aug 2009 01:10:05 -0000
@@ -110,7 +110,6 @@
$string['export'] = 'Exporteer';
$string['exportattendanceexcel'] = 'Export gegevens naar Excel';
$string['facetoface'] = 'Afspraak';
-$string['facetoface:editattendees'] = 'Aanwezigen toevoegen/verwijderen';
$string['facetoface:editsessions'] = 'Bewerk, kopieer, verwijder of voeg afspraken toe';
$string['facetoface:signup'] = 'Teken in voor een afspraak';
$string['facetoface:takeattendance'] = 'Neem aanwezigheid op';
Index: lang/fr_utf8/facetoface.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/mod/facetoface/lang/fr_utf8/facetoface.php,v
retrieving revision 1.17
diff -u -r1.17 facetoface.php
--- lang/fr_utf8/facetoface.php 16 Jan 2009 01:19:45 -0000 1.17
+++ lang/fr_utf8/facetoface.php 27 Aug 2009 01:10:05 -0000
@@ -112,7 +112,6 @@
$string['exporttofile'] = 'Exporter vers un fichier';
$string['exportattendance'] = 'Exporter la présence';
$string['facetoface'] = 'Inscriptions';
-$string['facetoface:editattendees'] = 'Ajouter et enlever des étudiants d\'une session de formation';
$string['facetoface:editsessions'] = 'Ajouter, copier et supprimer des sessions de formation';
$string['facetoface:signup'] = 'S\'inscrire à une session';
$string['facetoface:takeattendance'] = 'Noter la présence';
Index: lang/en_utf8/facetoface.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/mod/facetoface/lang/en_utf8/facetoface.php,v
retrieving revision 1.19
diff -u -r1.19 facetoface.php
--- lang/en_utf8/facetoface.php 7 Aug 2009 02:51:24 -0000 1.19
+++ lang/en_utf8/facetoface.php 27 Aug 2009 01:10:04 -0000
@@ -109,8 +109,9 @@
$string['exporttofile'] = 'Export to file';
$string['exportattendance'] = 'Export attendance';
$string['facetoface'] = 'Face-to-face';
-$string['facetoface:editattendees'] = 'Add and remove attendees from a face-to-face session';
+$string['facetoface:addattendees'] = 'Add attendees to a face-to-face session';
$string['facetoface:editsessions'] = 'Add, edit, copy and delete face-to-face sessions';
+$string['facetoface:removeattendees'] = 'Remove attendees from a face-to-face session';
$string['facetoface:signup'] = 'Sign-up for a session';
$string['facetoface:takeattendance'] = 'Take attendance';
$string['facetoface:view'] = 'View face-to-face activities and sessions';
Index: attendees.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/mod/facetoface/attendees.php,v
retrieving revision 1.14
diff -u -r1.14 attendees.php
--- attendees.php 30 Jan 2009 02:49:39 -0000 1.14
+++ attendees.php 27 Aug 2009 01:10:04 -0000
@@ -203,7 +203,8 @@
echo ''.get_string('takeattendance', 'facetoface').' - ';
}
}
- if (has_capability('mod/facetoface:editattendees', $context)) {
+ if (has_capability('mod/facetoface:addattendees', $context) ||
+ has_capability('mod/facetoface:removeattendees', $context)) {
// Add/remove attendees
echo ''.get_string('addremoveattendees', 'facetoface').' - ';
}
Index: version.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/mod/facetoface/version.php,v
retrieving revision 1.7
diff -u -r1.7 version.php
--- version.php 30 Oct 2008 23:59:43 -0000 1.7
+++ version.php 27 Aug 2009 01:10:04 -0000
@@ -5,7 +5,7 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2008100300;
+$module->version = 2008100301;
$module->requires = 2007021500; // Requires this Moodle version
$module->cron = 60;
Index: editattendees.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/mod/facetoface/editattendees.php,v
retrieving revision 1.6
diff -u -r1.6 editattendees.php
--- editattendees.php 22 Mar 2009 22:26:44 -0000 1.6
+++ editattendees.php 27 Aug 2009 01:10:04 -0000
@@ -45,7 +45,7 @@
// Add button
if ($add and !empty($frm->addselect) and confirm_sesskey()) {
- require_capability('mod/facetoface:editattendees', $context);
+ require_capability('mod/facetoface:addattendees', $context);
foreach ($frm->addselect as $adduser) {
if (!$adduser = clean_param($adduser, PARAM_INT)) {
@@ -76,7 +76,7 @@
}
// Remove button
else if ($remove and !empty($frm->removeselect) and confirm_sesskey()) {
- require_capability('mod/facetoface:editattendees', $context);
+ require_capability('mod/facetoface:removeattendees', $context);
foreach ($frm->removeselect as $removeuser) {
if (!$removeuser = clean_param($removeuser, PARAM_INT)) {