]> git.mjollnir.org Git - moodle.git/commitdiff
workshop: preparing possibility to publish selected submissions
authorDavid Mudrak <david.mudrak@gmail.com>
Mon, 4 Jan 2010 18:29:29 +0000 (18:29 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Mon, 4 Jan 2010 18:29:29 +0000 (18:29 +0000)
mod/workshop/db/access.php
mod/workshop/db/install.xml
mod/workshop/version.php

index 635823356e8e49ea9e1954e2e51003ad44c7d7de..4a678a1c1e0dc91c4cdea832752f9d85bb78242f 100644 (file)
@@ -109,6 +109,17 @@ $mod_workshop_capabilities = array(
         )
     ),
 
+    // Ability to publish submissions, it est make them available when workshop is closed
+    'mod/workshop:publishsubmissions' => array(
+        'captype' => 'write',
+        'contextlevel' => CONTEXT_MODULE,
+        'legacy' => array(
+            'teacher' => CAP_ALLOW,
+            'editingteacher' => CAP_ALLOW,
+            'admin' => CAP_ALLOW
+        )
+    ),
+
     // Ability to identify the author of the work that has been allocated to them for a review
     // Reviewers without this capability will see the author as Anonymous
     'mod/workshop:viewauthornames' => array(
@@ -145,6 +156,19 @@ $mod_workshop_capabilities = array(
         )
     ),
 
+    // Ability to view published submission when the workshop is closed. Applies to the user's group only
+    // or - if the user is allowed to access all groups - applies to any submission
+    'mod/workshop:viewpublishedsubmissions' => array(
+        'captype' => 'read',
+        'contextlevel' => CONTEXT_MODULE,
+        'legacy' => array(
+            'student' => CAP_ALLOW,
+            'teacher' => CAP_ALLOW,
+            'editingteacher' => CAP_ALLOW,
+            'admin' => CAP_ALLOW
+        )
+    ),
+
     // Ability to view the assessments of other users' work. Applies to the user's group only
     // or - if the user is allowed to access all groups - applies to any assessment
     'mod/workshop:viewallassessments' => array(
index 67739b44a77ea3cb103bec8808ca6aeeafa522d7..99a4c959fd2fd3517188be399106d569ef2a6614 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="mod/workshop/db" VERSION="20091029" COMMENT="XMLDB file for Moodle mod/workshop"
+<XMLDB PATH="mod/workshop/db" VERSION="20091218" COMMENT="XMLDB file for Moodle mod/workshop"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
 >
@@ -56,7 +56,8 @@
         <FIELD NAME="gradeoverby" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="The id of the user who has overridden the grade for submission." PREVIOUS="gradeover" NEXT="feedbackauthor"/>
         <FIELD NAME="feedbackauthor" TYPE="text" LENGTH="big" NOTNULL="false" SEQUENCE="false" COMMENT="Teacher comment/feedback for the author of the submission, for example describing the reasons for the grade overriding" PREVIOUS="gradeoverby" NEXT="feedbackauthorformat"/>
         <FIELD NAME="feedbackauthorformat" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="feedbackauthor" NEXT="timegraded"/>
-        <FIELD NAME="timegraded" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="The timestamp when grade or gradeover was recently modified" PREVIOUS="feedbackauthorformat"/>
+        <FIELD NAME="timegraded" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="The timestamp when grade or gradeover was recently modified" PREVIOUS="feedbackauthorformat" NEXT="published"/>
+        <FIELD NAME="published" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Shall the submission be available to other when the workshop is closed" PREVIOUS="timegraded"/>
       </FIELDS>
       <KEYS>
         <KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="workshop_fk"/>
index 4744138104cf176acea0f1d2b0616d51b851b12d..301d2fe61ab4371e42e56eb273c7849f49e8a47d 100644 (file)
@@ -28,6 +28,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$module->version  = 2009103000;
+$module->version  = 2009121800;
 $module->requires = 2009090400;  // Requires this Moodle version
 //$module->cron     = 60;