Non-core contributed modules

Maintain group and category settings when navigating through editing grades

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8
  • Fix Version/s: 1.8
  • Component/s: Patch: Gradebook Plus
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

While trying to remove some of the undefined variable notices associated with $group we lost some of the navigational functionality of maintaining groups and categories while editing grades.

Activity

Hide
David Fountain added a comment -

$group was undefined because it is not being passed as a POST. Adding it to line 21xx defines it for use elsewhere:

if ($action == 'edit') {
print '<table align="center" class="grade_edit">';
print '<tr><td><form name="cat_form">';
print '<input type="hidden" name="id" value="'.$course->id.'" />';
print '<input type="hidden" name="action" value="edit" />';
print '<input type="hidden" name="group" value="'.$group.'" />'; //THIS LINE ADDED IN
if ($preferences->use_advanced != 0) {
// Get other cat info and display category select if more than one category present

Show
David Fountain added a comment - $group was undefined because it is not being passed as a POST. Adding it to line 21xx defines it for use elsewhere: if ($action == 'edit') { print '<table align="center" class="grade_edit">'; print '<tr><td><form name="cat_form">'; print '<input type="hidden" name="id" value="'.$course->id.'" />'; print '<input type="hidden" name="action" value="edit" />'; print '<input type="hidden" name="group" value="'.$group.'" />'; //THIS LINE ADDED IN if ($preferences->use_advanced != 0) { // Get other cat info and display category select if more than one category present
Hide
Anthony Borrow added a comment -

David - Actually I think we are able to fix the behavior without this and use the revised way of handling groups. Take a look at the changes I made in CVS (18STABLE) and let me know what you think. Peace - Anthony

Show
Anthony Borrow added a comment - David - Actually I think we are able to fix the behavior without this and use the revised way of handling groups. Take a look at the changes I made in CVS (18STABLE) and let me know what you think. Peace - Anthony
Hide
Anthony Borrow added a comment -

I believe the changes in the 18STABLE branch in CVS for the /grade/index.php and /grade/lib.php files will resolve this issue. Testing would be appreciated.

Show
Anthony Borrow added a comment - I believe the changes in the 18STABLE branch in CVS for the /grade/index.php and /grade/lib.php files will resolve this issue. Testing would be appreciated.
Hide
Anthony Borrow added a comment -

Closing all of my resolved issues. Peace - Anthony

Show
Anthony Borrow added a comment - Closing all of my resolved issues. Peace - Anthony

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: