reset password
Author Message
calstatelaboy
Posts: 52
Posted 21:13 Jun 06, 2011 |

 

Hi Dr Sun,

Right now, we retrive the events for the user using the query which gives us the result as
-> All public events
-> All section event, if the user is enrolled in it.
-> All private events created by that user.

Based on the above results, the dates on the calendar are highlighted now which satisfy the below requirement.

As per HW7,

Public events can be viewed by any user
Section events can only be viewed by the students and the instructors of the section
Private events can only be viewed by the creator of the event.

Does that mean that to fetch all the events first and then filter user specific events from those events using the method intercepter for perticular user and highlight the calendar dates
or
Highlight the calendar dates using databse queries and the user click on the event name to view the event detail, that click should be available based on the user role?
 
Thanking you and regards,
 
calstatelaboy
Posts: 52
Posted 21:26 Jun 06, 2011 |

 

Hi Dr Sun,
I am sorry I forgot to ask the below question with previous question.

In Hw 7 , The following requirement is still true for section event right?

"The section event still be created when the assignment is
created and that event can only be modified if the assignment
is modified and it will be deleted if the assignement gets deleted"
 
if yes, then security to create , modify and delete assignment is
already in place.
 
Thanks and Regards,
cysun
Posts: 2935
Posted 10:42 Jun 07, 2011 |

1. It's up to you. Obviously the more efficient the better.

2. It depends on whether you allow the users to edit section events in the event editing interface (in addition to the assignment editing interface).

henilpatel
Posts: 18
Posted 11:43 Jun 07, 2011 |

Dear Professor,

As per what Calstatelaboy says, I also have a restricted query in database which retrieves events based on logged in user , his section and all public events. so will I have to change my queries to first generate entire list and then restrict it ? I think fetching a smaller list from the database would be a more efficient approach.

 

Please advice.,

Henil

cysun
Posts: 2935
Posted 12:14 Jun 07, 2011 |
henilpatel wrote:

Dear Professor,

As per what Calstatelaboy says, I also have a restricted query in database which retrieves events based on logged in user , his section and all public events. so will I have to change my queries to first generate entire list and then restrict it ? I think fetching a smaller list from the database would be a more efficient approach.

 

Please advice.,

Henil

I guess I don't quite understand these types of questions. The application requirements determine how you query the database, not the other way around. So you have a query that works, but the requirements changed, which means you need to change the query or write new ones. What's exactly the question here?