Project

General

Profile

Feature #303

Review announcement code (removal doesn't create the correct records in item_property)

Added by Carlos Vargas almost 10 years ago. Updated over 9 years ago.

Status:
Bug resolved
Priority:
High
Category:
-
Target version:
Start date:
03/12/2009
Due date:
% Done:

90%

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

Description

The current announcement code is a complete nightmare. Between many other problems, the fact that it only registers events of type AnnouncementAdded in item_property, and then update these records to change the visibility (changing to 0 when invisible and 2 when deleted) makes it almost impossible to treat in a coherent way.

Clean all that (add AnnouncementDeleted and AnnouncementUpdated or something similar) and make sure all the corresponding statistics code is still working


Files

Report_on_resource.png (31.9 KB) Report_on_resource.png Julio Montoya, 27/05/2010 17:25

Associated revisions

Revision 43943de3 (diff)
Added by Julio Montoya over 9 years ago

Fixing itemproperty when adding an announcement to \"everyone\" see #303

History

#1

Updated by Yannick Warnier over 9 years ago

  • Assignee set to Christian Alberto Fasanando Flores
  • Target version changed from 1.8.7 to 1.8.7 beta
  • SCRUM pts - complexity changed from ? to 3
#2

Updated by Yannick Warnier over 9 years ago

  • Target version changed from 1.8.7 beta to 1.8.7 RC1
#3

Updated by Julio Montoya over 9 years ago

  • Target version changed from 1.8.7 RC1 to 1.8.7
#4

Updated by Yannick Warnier over 9 years ago

  • Status changed from New to Assigned
  • Assignee changed from Christian Alberto Fasanando Flores to Julio Montoya
  • Priority changed from Normal to High
#5

Updated by Julio Montoya over 9 years ago

I added a new Annoucement I have this in item_property: (visibility = 1 )

AnnouncementAdded

 
UPDATE `chamilo187_DESTINATION`.`item_property`
SET lastedit_date='2010-05-21 15:03:15', lastedit_user_id='1' , lastedit_type='AnnouncementAdded' WHERE tool='announcement' AND ref='7' 

If I update the announcement I have 3 of them because there are 3 users in my course

AnnouncementUpdated

string 'UPDATE `chamilo187_DESTINATION`.`item_property`
                    SET lastedit_date='2010-05-21 15:04:06', lastedit_user_id='1' , lastedit_type='AnnouncementUpdated' 
                    WHERE tool='announcement' AND ref='7'   AND to_user_id='1' ' (length=218)

string 'AnnouncementUpdated' (length=19)

string 'UPDATE `chamilo187_DESTINATION`.`item_property`
                    SET lastedit_date='2010-05-21 15:04:06', lastedit_user_id='1' , lastedit_type='AnnouncementUpdated' 
                    WHERE tool='announcement' AND ref='7'   AND to_user_id='3' ' (length=218)

string 'AnnouncementUpdated' (length=19)

string 'UPDATE `chamilo187_DESTINATION`.`item_property`
                    SET lastedit_date='2010-05-21 15:04:06', lastedit_user_id='1' , lastedit_type='AnnouncementUpdated' 
                    WHERE tool='announcement' AND ref='7'   AND to_user_id='4' ' (length=218)

If I change the visibility the 3 records will be updated with visibility = 0 (No change in lastedit_type)
If I delete the announcement the 3 records will be update with visibility = 2 (No change in lastedit_type)

#6

Updated by Julio Montoya over 9 years ago

The course.resource table is used?

#7

Updated by Julio Montoya over 9 years ago

  • % Done changed from 0 to 50

I did some clean in the announcements files.
But I have a question is there a relationship between surveys and announcements???? Because I found some code in the announcement.php that calls some survey variable, etc ...

#9

Updated by Julio Montoya over 9 years ago

  • Status changed from Assigned to Needs more info
  • % Done changed from 50 to 80
#10

Updated by Julio Montoya over 9 years ago

  • Assignee changed from Julio Montoya to Yannick Warnier
#11

Updated by Yannick Warnier over 9 years ago

Corresponding statistics mean the "informe sobre recursos" page in the "informes" tool. If you tell me you can now see the creation/removal/update of announcements there, I'm OK to close the task.

#12

Updated by Yannick Warnier over 9 years ago

  • Assignee changed from Yannick Warnier to Julio Montoya
#13

Updated by Julio Montoya over 9 years ago

I'm going to check the "resource" page

main/tracking/courseLog.php?cidReq=XX&studentlist=resources

#14

Updated by Julio Montoya over 9 years ago

Some updates in order to work the announcements in the "resource page":

http://code.google.com/p/chamilo/source/detail?r=9714aa51b6aa8f54aa788f3a0ceaf49c574350a6&repo=classic

Variables added:

CourseDescriptionUpdated
GlossaryDeleted
AnnouncementInvisible
AnnouncementVisible

#15

Updated by Julio Montoya over 9 years ago

Screenshot

#16

Updated by Yannick Warnier over 9 years ago

  • Status changed from Needs more info to Bug resolved

Good job.

Also available in: Atom PDF