Moodle

Basic groups GUI doesn't seem to work at all

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8
  • Fix Version/s: 1.8
  • Component/s: Groups
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

There is no longer any javascript to show the groups in a grouping or the members of a group when they are clicked. Trying to add members also comes up with no names in the list.

Activity

Hide
Martin Dougiamas added a comment -

At first I thought this was just a few Javascript bugs, but it seems to be just unfinished. What's the status of this, Nick?

Show
Martin Dougiamas added a comment - At first I thought this was just a few Javascript bugs, but it seems to be just unfinished. What's the status of this, Nick?
Hide
Martin Dougiamas added a comment -

Aaahh, took me all this time to figure out how to use this interface :-P

Those buttons really need to be moved!

Show
Martin Dougiamas added a comment - Aaahh, took me all this time to figure out how to use this interface :-P Those buttons really need to be moved!
Hide
Nick Freear added a comment -

Hi Martin

Happy new year!

Yes, the GUI needs Javascript adding again. The buttons you found, [[updategroups]] and [[updatemembers]] will be in <noscript> elements for users with JS disabled - I agree they may need moving anyway.

My priority had to be getting the UI working without Javascript (the old one didn't entirely), before adding it.

Show
Nick Freear added a comment - Hi Martin Happy new year! Yes, the GUI needs Javascript adding again. The buttons you found, [[updategroups]] and [[updatemembers]] will be in <noscript> elements for users with JS disabled - I agree they may need moving anyway. My priority had to be getting the UI working without Javascript (the old one didn't entirely), before adding it.
Hide
Nick Freear added a comment -

Partial fix, applied cleanup patch including hiding unimplemented buttons in GUI, fixing error strings, tidying some functions.

Show
Nick Freear added a comment - Partial fix, applied cleanup patch including hiding unimplemented buttons in GUI, fixing error strings, tidying some functions.
Hide
Mitsuhiro Yoshida added a comment -

I think we need to fix the string 'erroreditgroup' on /lang/en_utf8/group.php as below

[Before]
$string['erroreditgroup'] = 'Error creating/updating grouping $a';

[After]
$string['erroreditgroup'] = 'Error creating/updating group $a';

Show
Mitsuhiro Yoshida added a comment - I think we need to fix the string 'erroreditgroup' on /lang/en_utf8/group.php as below [Before] $string['erroreditgroup'] = 'Error creating/updating grouping $a'; [After] $string['erroreditgroup'] = 'Error creating/updating group $a';
Hide
Nick Freear added a comment -

Thanks Mitsuhiro - I've applied your fix.

Show
Nick Freear added a comment - Thanks Mitsuhiro - I've applied your fix.
Hide
Nick Freear added a comment -

Martin and Vy, would you mind uploadng a patch of your fixes as you commit them? - easier if we want to merge individual changes. Thanks.

Also, you mentioned "perhaps reorganising some of the buttons" on GUI - you may want to toggle the $shownotdone variable to see unimplemented buttons (near a TODO).
Cheers

Show
Nick Freear added a comment - Martin and Vy, would you mind uploadng a patch of your fixes as you commit them? - easier if we want to merge individual changes. Thanks. Also, you mentioned "perhaps reorganising some of the buttons" on GUI - you may want to toggle the $shownotdone variable to see unimplemented buttons (near a TODO). Cheers
Hide
Nick Freear added a comment -

Attached is a patch fixing this bug and MDL-8238, including the files cvs:/lib/json/JSON.php, /group/lib/clientlib.js, and /group/index.php

Show
Nick Freear added a comment - Attached is a patch fixing this bug and MDL-8238, including the files cvs:/lib/json/JSON.php, /group/lib/clientlib.js, and /group/index.php
Hide
Nick Freear added a comment -

I've committed various fixes for Ajax issues:
1. No groups were displayed for [Not in any grouping] pseudo-grouping;
2. Contents of the groups and members select boxes weren't sorted;
2. The groups and members select didn't use displaynames, example 'My Group (2)' - 2 members.

The fixes make straight PHP and AJAX work in the same way, and removes code duplication.

Files affected (5, only in group directory):
cvs:/group/lib/clientlib.js – 1 line only.
cvs:/group/lib/utillib.php
cvs:/group/lib/groupinglib.php
cvs:/group/groupui/printgrouping.php – Woops, was broken - warnings etc.!
cvs:/group/index.php

Show
Nick Freear added a comment - I've committed various fixes for Ajax issues: 1. No groups were displayed for [Not in any grouping] pseudo-grouping; 2. Contents of the groups and members select boxes weren't sorted; 2. The groups and members select didn't use displaynames, example 'My Group (2)' - 2 members. The fixes make straight PHP and AJAX work in the same way, and removes code duplication. Files affected (5, only in group directory): cvs:/group/lib/clientlib.js – 1 line only. cvs:/group/lib/utillib.php cvs:/group/lib/groupinglib.php cvs:/group/groupui/printgrouping.php – Woops, was broken - warnings etc.! cvs:/group/index.php
Hide
Nick Freear added a comment -

Hello Vy. I hope you don't mind me committing these improvements (see patch, comment above) - a colleague reviewed them for safety, they are localised, aren't database-related, and I've checked them in IE and Firefox. Let me know if there are problems.

Is this bug fixed now? Cheers Nick

Show
Nick Freear added a comment - Hello Vy. I hope you don't mind me committing these improvements (see patch, comment above) - a colleague reviewed them for safety, they are localised, aren't database-related, and I've checked them in IE and Firefox. Let me know if there are problems. Is this bug fixed now? Cheers Nick
Hide
Vy-Shane Sin Fat added a comment -

Hi Nick. Thanks for the fixes.

I've noticed that [Not in a grouping] is showing that there's one group in it, but when I click on it, none is displayed in the groups column. Looking at the database records, I don't see any orphaned groups. I'm on PostgreSQL 8.1.

Show
Vy-Shane Sin Fat added a comment - Hi Nick. Thanks for the fixes. I've noticed that [Not in a grouping] is showing that there's one group in it, but when I click on it, none is displayed in the groups column. Looking at the database records, I don't see any orphaned groups. I'm on PostgreSQL 8.1.
Hide
Samuli Karevaara added a comment -

[Not in a grouping] is still showing (1) in an empty course on a freshly installed MOODLE_18_STABLE... No groups or groupings at all.

Show
Samuli Karevaara added a comment - [Not in a grouping] is still showing (1) in an empty course on a freshly installed MOODLE_18_STABLE... No groups or groupings at all.

People

Dates

  • Created:
    Updated:
    Resolved: