Issue Details (XML | Word | Printable)

Key: CONTRIB-121
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Anthony Borrow
Reporter: James Rudd
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Non-core contributed modules

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

Created: 28/Oct/07 03:49 PM   Updated: 27/Nov/07 02:53 PM
Component/s: Patch: Gradebook Plus
Affects Version/s: 1.8.2
Fix Version/s: None

File Attachments: 1. File gbpv2_lib.php_c121.diff (0.8 kB)


Participants: Anthony Borrow and James Rudd
Security Level: None
QA Assignee: Wen Hao Chuang
Resolved date: 27/Nov/07
Affected Branches: MOODLE_18_STABLE


 Description  « Hide
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) {



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Anthony Borrow added a comment - 27/Nov/07 02:52 PM
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

Anthony Borrow added a comment - 27/Nov/07 02:53 PM
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