Non-core contributed modules

Duplicate get_current_group($course->id); on line 1396 of lib.php

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 1.8.2
  • Fix Version/s: None
  • Component/s: Patch: Gradebook Plus
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE

Description

On line 1396 and 1398 same action get_current_group($course->id) is run.

1395 /// Check to see if groups are being used in this course
1396 $currentgroup = get_current_group($course->id);
1397
1398 if ($currentgroup = get_current_group($course->id) && groupmode($course) != 0) {

Possibly replace 1398 with
if ($currentgroup && groupmode($course) != 0) {

Activity

Hide
Anthony Borrow added a comment -

Wen - I've commented out the extra call to the get current group function but would appreciate a quick test to make sure that it functions properly. In theory it should be fine but I like to always verify with a little QA. I'm going to resolve this; however, if there is a problem please re-open it. Thanks - Anthony

Show
Anthony Borrow added a comment - Wen - I've commented out the extra call to the get current group function but would appreciate a quick test to make sure that it functions properly. In theory it should be fine but I like to always verify with a little QA. I'm going to resolve this; however, if there is a problem please re-open it. Thanks - Anthony
Hide
Anthony Borrow added a comment -

I resolving since I have commented out the initial assignment and call to get the current group since it is called and assigned in the if statement and committed the change. Peace - Anthony

Show
Anthony Borrow added a comment - I resolving since I have commented out the initial assignment and call to get the current group since it is called and assigned in the if statement and committed the change. Peace - Anthony
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 (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: