? 866780_edit_response.diff
Index: gradebook_responses.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gradebook/gradebook_responses/Attic/gradebook_responses.module,v
retrieving revision 1.1.2.8
diff -u -r1.1.2.8 gradebook_responses.module
--- gradebook_responses.module	28 Jul 2010 14:19:10 -0000	1.1.2.8
+++ gradebook_responses.module	30 Jul 2010 15:34:28 -0000
@@ -423,7 +423,7 @@
   $result = db_query('SELECT DISTINCT t.tid FROM {term_data} t INNER JOIN {term_hierarchy} h ON t.tid = h.tid WHERE h.parent = 0 AND t.vid = %d', $vid);
   while ($tid = db_result($result)) {
     $gradebook = gradebookapi_gradebook_load($tid);
-    if (gradebookapi_is_teacher($gradebook, $viewer)) {
+    if ($teacher = gradebookapi_is_teacher($gradebook, $viewer)) {
       $locked = FALSE;
     }
     if (gradebookapi_is_student($gradebook, $account)) {
@@ -445,7 +445,7 @@
                 $remaining_text = format_plural($remaining, '1 response', '@count responses') . ' ' . t('remaining');
               }
               $grade_result = db_fetch_array(db_query('SELECT earned, redo FROM {gradebookapi_grade} WHERE uid = %d and nid = %d', $account->uid, $assignment->nid));
-              if (is_null($grade_result['earned']) || $grade_result['earned'] == '' || $locked && ($remaining > 0)) {
+              if ($teacher || is_null($grade_result['earned']) || $grade_result['earned'] == '' || $locked && ($remaining > 0)) {
                 // The assignment has not been graded, so add it to the options array.
                 $options[$assignment->nid] = $assignment->title . '(' . $remaining_text . ')';
               } 
@@ -465,6 +465,7 @@
     '#collapsible' => TRUE,
     '#collapsed'   => FALSE,
     '#title'       => t('Assignment Response Settings'),
+    '#description' => t('Choose the assignment and indicate the status of the response. Note that once a grade has been assigned, only the teacher will be able to edit this response or change these values.'),
     '#tree'        => FALSE,
     '#weight'      => 0,
   );
