Project

General

Profile

Bug #3685

Groups inside a session

Added by Cécile Deruy about 8 years ago. Updated almost 8 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
10/07/2011
Due date:
% Done:

90%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

I will explain the problem in French (better for me) if you want an English translation, please ask me !
Lorsqu'on crée des groupes (outil groupes) à l'intérieur d'une session il n'est pas possible d'y affecter des utilisateurs :
- le remplissage automatique ne donne rien
- dans le formulaire d'édition du groupe, les listes "tuteurs" et "membres du groupe" sont vides
Version de Chamilo 1.8.8.2 mais je pense que c'était pareil dans la version précédente, 1 seule base.
J'ai modifié le fichier groupmanager.lib.php et cela semble bien fonctionner.
Je vous indique la modif pour intégration à la prochaine release si c'est correct et surtout pour que vous me disiez si c'est bien la chose à faire !
Fonction modifiée : filter_only_students() ligne 1441 :

    public static function filter_only_students ($user_array_in) {
        $user_array_out = array ();
        foreach ($user_array_in as $this_user) {            
            if (($this_user['status_rel'] == STUDENT || $this_user['status_session']==0) && $this_user['tutor_id'] == 0) {
                $user_array_out[] = $this_user;
            }
        }
        return $user_array_out;
    }

à la place de :

    public static function filter_only_students ($user_array_in) {
        $user_array_out = array ();
        foreach ($user_array_in as $this_user) {            
            if ($this_user['status_rel'] == STUDENT && $this_user['tutor_id'] == 0) {
                $user_array_out[] = $this_user;
            }
        }
        return $user_array_out;
    }

Merci !

Associated revisions

Revision 30a48770 (diff)
Added by Julio Montoya almost 8 years ago

Fixes #3685 when adding users to a group in a session reported by Cécile Deruy

History

#1

Updated by Yannick Warnier almost 8 years ago

  • Target version set to 1.8.8.4
#2

Updated by Julio Montoya almost 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Julio Montoya
#3

Updated by Julio Montoya almost 8 years ago

  • Status changed from Assigned to Needs more info
  • Assignee deleted (Julio Montoya)
  • % Done changed from 0 to 70

Bonjour Cécile,
j'ai envoyé un fix ca doit marcher:

http://code.google.com/p/chamilo/source/detail?r=48ed68a1202e4f3f882242e36c3a860dfe3e8ac8&repo=classic
en fait il faut diferencier une session et un cours voir le code dans:

public static function filter_only_students($user_array_in) {
        $user_array_out = array ();        
        foreach ($user_array_in as $this_user) {                
            //if ($this_user['status_rel'] == STUDENT && $this_user['tutor_id'] == 0) {
            if (api_get_session_id()) {
                if ($this_user['status_session'] == 0) {
                    $user_array_out[] = $this_user;
                }
            } else {
                if ($this_user['status_rel'] == STUDENT) {
                    $user_array_out[] = $this_user;
                }
            }
        }
        return $user_array_out;
    }


#4

Updated by Julio Montoya almost 8 years ago

  • Status changed from Needs more info to Needs testing
  • % Done changed from 70 to 90

Applied in changeset r15118.

#5

Updated by Yannick Warnier almost 8 years ago

  • Status changed from Needs testing to Bug resolved

Assumed fixed (no feedback). Julio, try to be more user-friendly when suggesting a patch (propose a downloadable file and a place where to put it). 'might help getting "some" feedback :-)

#6

Updated by Cécile Deruy almost 8 years ago

OK, ça marche !

Also available in: Atom PDF