Project

General

Profile

Bug #3992

Announcements for groups

Added by Stijn Michels almost 8 years ago. Updated over 7 years ago.

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

100%

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

Description

Using Chamilo 1.8.8.4

When I create an announcement that is visible for one particular group it is visible for the administrator but it's not visible for the students who are in that group.
The get the message that they don't have enough rights. The don't get the notification e-mail either.


Files

Schermafbeelding_2011-10-19_om_23.16.43.jpg (39.1 KB) Schermafbeelding_2011-10-19_om_23.16.43.jpg Adding the announcement as teacher Stijn Michels, 19/10/2011 23:22
Schermafbeelding_2011-10-19_om_23.18.33.jpg (31.6 KB) Schermafbeelding_2011-10-19_om_23.18.33.jpg Consulting the announcement as student Stijn Michels, 19/10/2011 23:22

History

#1

Updated by Jan Derriks almost 8 years ago

Realy weird that this bug hasn't had more attention. Doesn't anyone use group announcements?
You can fix it by changing announceents.inc.php: ==========
--- a/main/announcements/announcements.inc.php Thu Aug 25 19:14:36 2011 0200
++ b/main/announcements/announcements.inc.php Wed Dec 07 13:22:49 2011 0100
@ -135,6 +135,7 @
global $charset;
$tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT);
$tbl_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY);
$tbl_group_user = Database::get_course_table(TABLE_GROUP_USER);

if (api_is_allowed_to_edit(false,true) || (api_get_course_setting('allow_user_edit_announcement') && !api_is_anonymous())) {
$sql_query = " SELECT announcement.*, toolitemproperties.*
@ -145,14 +146,21 @
ORDER BY display_order DESC";
} else {
if (api_get_user_id() != 0) {
$sql_query = " SELECT announcement.*, toolitemproperties.*
- FROM $tbl_announcement announcement, $tbl_item_property toolitemproperties
- WHERE announcement.id = toolitemproperties.ref
- AND announcement.id = '$announcement_id'
- AND toolitemproperties.tool='announcement'
- AND (toolitemproperties.to_user_id='".api_get_user_id()."' OR toolitemproperties.to_group_id='0')
- AND toolitemproperties.visibility='1'
- ORDER BY display_order DESC";
+ FROM $tbl_announcement announcement, $tbl_item_property toolitemproperties
+ WHERE announcement.id = toolitemproperties.ref
+ AND announcement.id = '$announcement_id'
+ AND toolitemproperties.tool='announcement'
+ AND (toolitemproperties.to_user_id='".api_get_user_id()."' OR
+ toolitemproperties.to_group_id='0' OR
+ toolitemproperties.to_group_id IN
+ ( SELECT group_id
+ FROM $tbl_group_user gru
+ WHERE gru.user_id = '".api_get_user_id()."')
+ )
+ AND toolitemproperties.visibility='1'
+ ORDER BY display_order DESC";
#2

Updated by Julio Montoya almost 8 years ago

  • Status changed from New to Needs more info

I think this was already fixed for Chamilo 1.9

You can test it here: http://chamilodev.beeznest.com/

#3

Updated by Jan Derriks almost 8 years ago

http://support.chamilo.org/projects/chamilo-18/repository/revisions/16187/entry/main/announcements/announcements.inc.php

the change looks similar so I guess that will work too.

A pity that this issue wasn't updated after the fix. That would have saved me some time.

#4

Updated by Julio Montoya over 7 years ago

  • Status changed from Needs more info to Bug resolved
  • Target version set to 1.9 Stable
  • % Done changed from 0 to 100

Jan Derriks wrote:

http://support.chamilo.org/projects/chamilo-18/repository/revisions/16187/entry/main/announcements/announcements.inc.php

the change looks similar so I guess that will work too.

A pity that this issue wasn't updated after the fix. That would have saved me some time.

sorry for that

Also available in: Atom PDF