Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9, 1.9.1, 1.9.2
    • Fix Version/s: None
    • Component/s: Patch: LSU gradebook
    • Labels:
      None
    • Environment:
      Requires php5
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      Latest documentation can be found at: http://docs.moodle.org/en/grade/report/simple_grader/index

      Please let us know what we can do to make this system better.
      Install instructions follow.

      A full featured simple grader report requires the simple tree, anonymous grade block, a slight modification to the existing theme's header.html, and a slight modification to lib/grade/grade_item.php.

      • Once the simple grader has been installed, editing the header.html should consist of adding the following lines in the 'head' element:

      <?php $filenamejs = "$CFG->dirroot/grade/report/simple_grader/lib/menufixer.php";
      if (file_exists($filenamejs))

      { include($filenamejs); }

      ?>

      • The modification in grade_item.php is simply changing:

      var $aggregationcoef = 0;

      to:

      var $aggregationcoef = 1;

      • Add a check for Simple Grader report to gradelib, located in {MOODLE_ROOT}/lib/gradelib.php:

        At the very beginning of the function grade_regrade_final_grade, you must add code that calculates core modules correctly. So, the code below must be added right under the function declaration line which looks something like:

        function grade_regrade_final_grades($courseid, $userid=null, $updated_item=null) {
        // Check for Simple Grader Report
        global $CFG;

        $exists = file_exists($CFG->dirroot. '/grade/report/simple_grader/lib/simple_gradelib.php');
        if ($exists) { require_once($CFG->dirroot . '/grade/report/simple_grader/lib/simple_gradelib.php'); return simple_grade_regrade_final_grades($courseid, $userid, $updated_item); }

        * Add a similar check in {MOODLE_ROOT}

        /grade/import/lib.php around line 55 in function grade_import_commit add the following:

      $use_function = false;
      $file = $CFG->dirroot . '/grade/report/simple_grader/lib/simple_gradelib.php';
      if (file_exists($file))

      { require_once($file); $use_function = true; }

      Then jump to around line 82:

      ....
      // insert each individual grade to this new grade item
      foreach ($grades as $grade) {
      if ($use_function){
      if(!simple_update_final_grade($grade->userid, $gradeitem, 2, $grade->finalgrade, 'import', $grade->feedback, FORMAT_MOODLE))

      { $failed = true; break 2; }


      } else if (!$gradeitem->update_final_grade($grade->userid, $grade->finalgrade, 'import', $grade->feedback, FORMAT_MOODLE))

      { $failed = true; break 2; }


      }

      And lastly around line 125:

      ....
      // make the grades array for update_grade
      foreach ($grades as $grade) {
      if (!$importfeedback)

      { $grade->feedback = false; // ignore it }


      if ($use_function){
      if(!simple_update_final_grade($grade->userid, $gradeitem, 2, $grade->finalgrade, 'import', $grade->feedback))

      { $failed = true; break 2; }


      } else if (!$gradeitem->update_final_grade($grade->userid, $grade->finalgrade, 'import', $grade->feedback))

      { $failed = 1; break 2; }


      }

      • Denying access to the original grader report. Fortunately, this can be done in Moodle, defining capabilities.

      With the Site Administration block navigate to Users->Permissions->Define Roles. For every role, change the gradereport/grader:view to "Not Set"

      This will deny access to the original gradebook.

      Note: in order to get help files to make sense in the simple tree, make sure that the help files location in simple_tree/lang/en_utf8/help/grade/ are moved into core.

        Gliffy Diagrams

          Attachments

          1. quick_edit.png
            quick_edit.png
            178 kB
          2. LSU gradebook.zip
            395 kB
          3. LSUgradebook_prepatched.zip
            177 kB
          4. LSUgradebook_prepatched_10_30_08.zip
            629 kB
          5. LSUgradebook_prepatched_10_27_08.zip
            543 kB
          6. LSUgradebook_prepatched_10_18_08.zip
            543 kB
          7. LSUgradebook_prepatched_10_08_08.zip
            173 kB
          8. LSU_gradebook.diff
            527 kB
          9. LSU_gradebook.diff
            527 kB
          10. import_mymathlab.png
            import_mymathlab.png
            109 kB
          11. CONTRIB-738.diff
            542 kB

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: