Permalink
Browse files

ForumNG Add participation grading #2119

  • Loading branch information...
AlanFez authored and sammarshallou committed Oct 26, 2012
1 parent aa67f2b commit 8626296a38d6b3ba2e9be70d82a668d44321b075
@@ -45,7 +45,7 @@ protected function define_structure() {
'reportingemail', 'subscription', 'feedtype', 'feeditems',
'maxpostsperiod', 'maxpostsblock', 'postingfrom', 'postinguntil',
'typedata', 'magicnumber', 'completiondiscussions', 'completionreplies',
- 'completionposts', 'removeafter', 'removeto', 'shared', 'originalcmid'));
+ 'completionposts', 'removeafter', 'removeto', 'shared', 'originalcmid', 'gradingscale'));
$discussions = new backup_nested_element('discussions');
View
@@ -37,7 +37,7 @@
)
),
- // Ability to add new forumng to a course
+ // Ability to add new forumng to a course.
'mod/forumng:addinstance' => array(
'riskbitmask' => RISK_XSS,
@@ -305,6 +305,17 @@
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
+ ),
+
+ 'mod/forumng:grade' => array(
+
+ 'captype' => 'write',
+ 'contextlevel' => CONTEXT_MODULE,
+ 'archetypes' => array(
+ 'teacher' => CAP_ALLOW,
+ 'editingteacher' => CAP_ALLOW,
+ 'manager' => CAP_ALLOW
+ )
)
);
View
@@ -38,6 +38,7 @@
<FIELD NAME="removeto" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="This field stores the mod instance id of the target forum. Null means delete old discussions permanently." PREVIOUS="removeafter" NEXT="shared"/>
<FIELD NAME="shared" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="If the forum is available for sharing on other courses, this flag will be set to 1." PREVIOUS="removeto" NEXT="originalcmid"/>
<FIELD NAME="originalcmid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="If this forum is a reference to (clone of) a shared forum, this field is non-null and points to the original forum. (When this is set, other settings in this table are ignored.)" PREVIOUS="shared"/>
+ <FIELD NAME="gradingscale" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" COMMENT="grading scale" PREVIOUS="originalcmid"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="course"/>
@@ -192,4 +193,4 @@
</TABLE>
</TABLES>
-</XMLDB>
+</XMLDB>
View
@@ -25,11 +25,30 @@
function xmldb_forumng_upgrade($oldversion=0) {
global $CFG, $THEME, $DB;
+ $dbman = $DB->get_manager();
+
if ($oldversion < 2012070900) {
// Changed format of modinfo cache, so need to rebuild all courses.
rebuild_course_cache(0, true);
upgrade_mod_savepoint(true, 2012070900, 'forumng');
}
+ if ($oldversion < 2012102601) {
+ // Define field gradingscale to be added to forumng.
+ $table = new xmldb_table('forumng');
+ $field = new xmldb_field('gradingscale', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'grading');
+
+ // Launch add field gradingscale.
+ if (!$dbman->field_exists($table, $field)) {
+ $dbman->add_field($table, $field);
+ }
+
+ // Changed format of modinfo cache, so need to rebuild all courses.
+ rebuild_course_cache(0, true);
+
+ // ForumNG savepoint reached.
+ upgrade_mod_savepoint(true, 2012102601, 'forumng');
+ }
+
return true;
}
@@ -0,0 +1,46 @@
+== OU ForumNG Grading Feature ==
+
+=== Description ===
+
+Display user participation within forumNG.
+
+Participation is defined as:
+
+* discussions created
+* posts replied to
+
+=== Capability requirements ===
+
+A user will be considered as participating in a forum if they have the capability to create a discussion and reply to a post within
+the context of the current forum instance and are not considered an adminstrator
+by standard Moodle legacy roles and capabilities.
+
+A user who has the capability '''mod/forumng:grade''' and has access to the current forum
+can view all user participation, subject to the groupmode settings and their membership of those groups.
+(A user who has the capability '''moodle/site:accessallgroups''' will be able to see all groups regardless of
+personal membership).
+
+=== Grading page display ===
+
+From the foum page the button to access the grading screens is 'view posts by user' which takes you to the user list screen.
+If you have the ability to '''mod/forumng:grade''' you will be presented with a Grade dropdown for each user. This screen will
+allow you to grade each user.
+
+To view an individual user's participation click on the link 'Show all posts by <name>'. This will take you to a screen containing
+that user's posts including replies and any discussion start posts if they started a discussion.
+If you have the ability to '''mod/forumng:grade''' you will see a Grade dropdown for that user.
+
+=== Grading ===
+
+A user with the capability ''mod/forumng:grade'' in relation to the current forum has the ability to add grade values.
+This can either be done as a bulk action on the '''View posts by user''' page or as a single update on the more detailed
+single user page.
+
+Grading will only be available if it has been set for the particular forum instance
+in the '''ForumNG administration''' '''Edit settings''' screen.
+
+To grade on the main 'User posts' list screen - you can change one or more grade dropdowns,
+then you must click the 'Save grades' button.
+
+To grade an individual named user's posts - you need to goto to the bottom of the page, choose a grade from the dropdown box,
+then you must click the 'Save grades' button.
@@ -0,0 +1,110 @@
+This script describes steps to test the participation facility from a user
+perspective. It is intended to cover most of the UI and features.
+
+NOTE: In this test case, the word 'forum' always refers to the OU ForumNG.
+
+The test steps in this script follow on from each other and aren't independent.
+
+Initial setup
+=============
+
+This test case requires:
+
+- a course which has at least two groups defined (G1 and G2).
+- two test student users (U.S1, who is in group G1, and U.S2, in group G2).
+- one editing teacher (U.ET)
+
+The test server must have debugging set to DEVELOPER level and to display
+errors; during all parts of the test script, there should be no debugging
+warnings.
+
+The completion system must be enabled for (a) the site, and (b) the test
+course.
+
+CRE Creating forums and data
+============================
+
+CRE01 / admin
+ In your test course, create a forum called CRE01
+ Edit forum settings so that:
+ Under 'Grade' settings
+ Choose 'Teacher grades student' from Grade dropdown
+ Set 'Grading scale' to 100
+
+ Under 'Common module' settings
+ Choose 'Seperate groups' from Group mode
+ Leave 'Grouping' set to 'None'
+ Leave 'Visible' to 'Show'
+
+ Click on Save and display submit button
+
+CRE02 / admin
+ Go into the forum you have just created and start a seperate discussion for each group
+ For each discussion create a post
+
+CRE03 / U.S1 [change]
+ Go to forum CRE01 (you should be in group G1).
+ Reply to start discussion post created by admin user
+
+CRE04 / U.S2 [change]
+ Go to forum CRE01 (you should be in group G2).
+ Reply to start discussion post created by admin user
+
+CRE04 / U.ET [change]
+ Go to forum CRE01.
+ Click against 'View posts by user'
+
+GRD Grading
+===========
+
+GRD01 / U.ET
+ This should bring up a screen entitled User posts
+ It should show the student user
+ The number of Discussions started by that user
+ The number of Replies to posts
+ Grades per user, this is a dropdown that anybody with 'mod/forumng:grade' can be used to grade a user
+ - currently the only people that can grade a user are admin, teacher, editing teacher, and manager.
+ Check the grade dropdown to see that it contains a 'No grade' option and grades between 0/100 - 100/100
+ Note: 100 should be the value you set the scale at when you edited the forum settings
+ Choose 77 as a grade/score
+ Note: All users if you can grade them will have grade dropdown box even if they have not yet taken part in the forum
+ which will be set to a score of 'No grade'.
+ Click on Save Grades which will save the grades.
+ Click on the link that says 'Show all posts by <name>'
+
+GRD02 / U.ET
+ This takes you to a screen showing all posts by that user (including replies and discussions stated)
+ At the end of the posts is a section entitled 'User grade'
+ The Grade dropdown should be showing a grade of 77/100, which is the grade you set for that user on the previous screen
+ Change the grade to 95/100
+ Click on the Save changes button
+
+ This takes you back to the 'User posts' screen
+ Check to see that the Grade dropdown is showing 95/100 as the score against that user
+
+ GRD03 / U.ET
+ Click against Course administration on the left hand side
+ Click on the Grades icon/link in the now opened Course administration menu
+ This should bring up Grader report which shows all student participants
+ Student 1 should have a score of 95 for them under the forum heading whilst student 2 will have a score of 0
+ Check that the average scores shown for the forum and course are correct
+
+RGD Retest with grading disabled
+================================
+
+ RGD01 / admin[change]
+ Edit forum CRE01 settings so that:
+Under 'Grade' settings
+Choose 'No Grades' from Grade dropdown
+- This should gray out and make the 'Grading scale' dropdown non-active
+
+ RGD02 / U.ET [change]
+ Go to forum CRE01.
+ Click against 'View posts by user'
+
+ RGD03 / U.ET
+ This should bring up a screen entitled User posts
+ It should show the student user
+ The number of Discussions started by that user
+ The number of Replies to posts
+ Under Grades no grading information or dropdown grading list should be shown
@@ -30,3 +30,8 @@
$string['userposts:view'] = 'View list of posts by user';
$string['pluginname'] = 'View posts by user';
$string['action'] = 'Action';
+
+// User participation.
+$string['savegrades'] = 'Save grades';
+$string['usergrade'] = 'User grade';
+$string['gradesupdated'] = 'Grades updated';
Oops, something went wrong.

0 comments on commit 8626296

Please sign in to comment.