(1) min_severity should be enum('1', '2', '3', '4') to allow for not sending of text messages for example. This affects tables subscriptions and dynamic_subscriptions. The a5.project.sql file has been updated.
(2) the subscriptions.php page should include the dynamic subscriptions as well (both viewing and adding)
(3) it would be best to include navigation links to all pages (e.g., at the bottom of every page)
(4) it would be best to include a logout button, to simplify testing.
I am a little unsure about the dynamic subscription / check-in relationship. Is this the correct interpretation:
-The Dynamic_Subscription table stores a user's notification preference for ALL check-in's. There is only one record per user.
-The Subscriptions table stores a user's notification preference's for each location. These do not apply to check-ins (Dynamic_Subscription table handles preference for all check-ins)
-The Users table keeps track of the user's last check-in.
-The subscriptions.php page allows a user to add/remove/view subscriptions set for specific locations and their ONE subscription for all check-ins.
-The checkin.php page allows a user to check-in. But a notification, in the case of an event, will not be delivered if the user hasn't set up their dynamic subscription preference on the subscriptions.php page, which is stored in the Dynamic_Subscriptions table
Yes, these are all correct. Keep in mind also that a user's location is only valid for 2 hours, when we are checking to see if a dynamic subscription plus checkin would match an event.
If a user registers and immediately checks-in without visiting the subscription table to setup their dynamic subscription, will they receive no notification for an event at the location? That is what I asked above but I am double-checking because I noticed the "default" values in the assignment description for the dynamic subscription table -- 1, 2, and 3. I wasn't sure if that refers to the default set drop-down values when the user establishes their preferences on the Subscriptions page, or just the default values even if the user doesn't bother to set their dynamic subscription. It does not seem correct that a new user could check-in and they still won't get any notification if they didn't explicitly set their dynamic subscriptions.
There has to be a dynamic subscription in place, otherwise no event matches will occur. The defaults apply if you do not assign values for these in the database (i.e., NULL) when inserting a tuple, but a tuple needs to be inserted. You can add them as defaults in the user interface, but that is not necessary.
You should provide for the ability for subscriptions and dynamic subscriptions to be changed. The easiest way is to allow for them to be deleted, if the user wants to (and thus perform an update by delete+add).
For the autocomplete, are we able to implement it in a similar way to the AJAX example -- a list of matches under the text box (but clickable)? Or does the text field itself need to fill with a suggestion as you type (like a Google search).
I did some web searches the more sophisticated approaches seemed to involve JQuery.
Actually, I took the wrong approach previously. I now see that the text box can be updated with the result of the search string without JQuery. I'm all set.
1) Does anything happen if a user checks in to a location and there was a recent event there? (The event occurred before the user checked in, but recently so that the user might want to know about it.)
2) Since event_map.php is supposed to be the same as event_list.php, does the map only show events that apply to the user's web notifications? So if a user had only text notifications and chose not to receive web notifications, there would be no events on their map?
3) I remember you mentioning that the hierarchical selection of check-in locations should be through a dropdown (or multiple dropdowns?). How should this appear to the user?
Is there a static number of drop-downs (e.g. 4 for the number of location levels), or does the checkin begin with one drop-down and more drop-downs appear when you select a location that has child locations?
The drop-downs should be updated as you go from parent to child, I.e., only the children should be shown under a specific selection. Note that you should have a "none specified" option in case someone wants to stay with just the parent and not select a child
It seems with the current setup you will need the current_login time and the last_login time in order to properly do event matching (for the current and future sessions). In other words, if you just update the login time at login, you will not be able to use it in queries.
If you have already found a way around this (there are two), then that is fine.
IF NOT, then I added a special field in the database to record the information. In particular, I added a current_login_ts field in the users table. This is set at login and when a user logs out, then the current_login time becomes last_login time and current_login time becomes NULL.
1) Can we implement autocomplete the same way as the "suggestions" from the posted AJAX examples, or does it need to be more sophisticated (someone mentioned clickable suggestions above)?
2) Should the new_event.php autocomplete only offer locations for which the user has the ability to post an event (they have a subscription or are checked in) or should the autocomplete list all locations as checkin.php does?
1) needs to be clickable, but can be on a list below, does not have to be fancy like google.
2) you can either make the check at the input OR let the input be the generic one and make a check later. Probably a later check is simpler and this is perfectly fine.
1) How are dynamic subscriptions supposed to work with web notifications? event_list.php and event_map.php can't check if a person was checked in to the relevant location at the time of a past event, because only the last checkin is stored. So if the user wants to display all notifications since the beginning, this list will not include events that matched dynamic subscriptions.
2) What information needs to be included on the map? Beyond putting a marker at the site of every event, do we need to somehow represent that there were multiple events at a single site?
1) correct, you cannot visualize dynamic subscriptions with the current database schema. We would need to have kept the list of all locations and I decided to keep it simple.
2) you need to display the event information (i.e., time, location, description, etc). It is up to you to combine events in a single pushpin, or add multiple pushpins.
Is a dynamic subscription global and persistent, or instead created each time a checkin occurs?
Case 1 would be that I can use the subscriptions page to set my dynamic subscription severity preferences, which then apply to every location I check into until I choose to update my subscription from the subscriptions page
Case 2 would be that the checkin page asks me for dynamic subscription severity with every location that I log into
can we use a drop down menu instead of an autocomplete field?
we still would need to use ajax to generate the list, and this would prevent the user from entering an invalid location, so we wouldn't have to check for that.
You need both a drop-down (for the checkin) and an autocomplete (for everything else). If you run out of time, then using a drop-down is an acceptable substitute (but won't be full points).
When computing whether the user receives a message for an event, do dynamic or static subscriptions take priority? In other words, if a user is logged into a location and has a static subscription to that location, which severities are used to compute whether he/she is notified?
You need the union and essentially choose the case where it would lead to more notifications. E.g., if the static only says 3, 4, 4 but the dynamic says 1, 1, 1, then they get a notification email and text if they have checked in there, but only get web notification after 2 hours of checking in, if a new event arrives.
Clarifications (made in class on April 16th):
ReplyDelete(1) min_severity should be enum('1', '2', '3', '4') to allow for not sending of text messages for example. This affects tables subscriptions and dynamic_subscriptions. The a5.project.sql file has been updated.
(2) the subscriptions.php page should include the dynamic subscriptions as well (both viewing and adding)
(3) it would be best to include navigation links to all pages (e.g., at the bottom of every page)
(4) it would be best to include a logout button, to simplify testing.
I am a little unsure about the dynamic subscription / check-in relationship. Is this the correct interpretation:
Delete-The Dynamic_Subscription table stores a user's notification preference for ALL check-in's. There is only one record per user.
-The Subscriptions table stores a user's notification preference's for each location. These do not apply to check-ins (Dynamic_Subscription table handles preference for all check-ins)
-The Users table keeps track of the user's last check-in.
-The subscriptions.php page allows a user to add/remove/view subscriptions set for specific locations and their ONE subscription for all check-ins.
-The checkin.php page allows a user to check-in. But a notification, in the case of an event, will not be delivered if the user hasn't set up their dynamic subscription preference on the subscriptions.php page, which is stored in the Dynamic_Subscriptions table
Yes, these are all correct. Keep in mind also that a user's location is only valid for 2 hours, when we are checking to see if a dynamic subscription plus checkin would match an event.
DeleteGreat - Super-fast response too. Thank you
DeleteIf a user registers and immediately checks-in without visiting the subscription table to setup their dynamic subscription, will they receive no notification for an event at the location? That is what I asked above but I am double-checking because I noticed the "default" values in the assignment description for the dynamic subscription table -- 1, 2, and 3. I wasn't sure if that refers to the default set drop-down values when the user establishes their preferences on the Subscriptions page, or just the default values even if the user doesn't bother to set their dynamic subscription. It does not seem correct that a new user could check-in and they still won't get any notification if they didn't explicitly set their dynamic subscriptions.
DeleteThere has to be a dynamic subscription in place, otherwise no event matches will occur. The defaults apply if you do not assign values for these in the database (i.e., NULL) when inserting a tuple, but a tuple needs to be inserted. You can add them as defaults in the user interface, but that is not necessary.
DeleteOne more clarification:
ReplyDeleteYou should provide for the ability for subscriptions and dynamic subscriptions to be changed. The easiest way is to allow for them to be deleted, if the user wants to (and thus perform an update by delete+add).
For the autocomplete, are we able to implement it in a similar way to the AJAX example -- a list of matches under the text box (but clickable)? Or does the text field itself need to fill with a suggestion as you type (like a Google search).
ReplyDeleteI did some web searches the more sophisticated approaches seemed to involve JQuery.
Actually, I took the wrong approach previously. I now see that the text box can be updated with the result of the search string without JQuery. I'm all set.
DeleteI was going to say that it can be whatever you want. It would be nice to get the google-style one, but a basic one should suffice also.
Delete1) Does anything happen if a user checks in to a location and there was a recent event there? (The event occurred before the user checked in, but recently so that the user might want to know about it.)
ReplyDelete2) Since event_map.php is supposed to be the same as event_list.php, does the map only show events that apply to the user's web notifications? So if a user had only text notifications and chose not to receive web notifications, there would be no events on their map?
3) I remember you mentioning that the hierarchical selection of check-in locations should be through a dropdown (or multiple dropdowns?). How should this appear to the user?
1) no, let's keep things simple
Delete2) yes, if there is no web notification then they should not see the events
3) should be multiple drop-downs, one per line, along the lines of choosing a make and model for a car (e.g., at http://www.edmunds.com/)
Is there a static number of drop-downs (e.g. 4 for the number of location levels), or does the checkin begin with one drop-down and more drop-downs appear when you select a location that has child locations?
DeleteThe drop-downs should be updated as you go from parent to child, I.e., only the children should be shown under a specific selection. Note that you should have a "none specified" option in case someone wants to stay with just the parent and not select a child
DeleteUpdated schema: current_login_ts
ReplyDeleteIt seems with the current setup you will need the current_login time and the last_login time in order to properly do event matching (for the current and future sessions). In other words, if you just update the login time at login, you will not be able to use it in queries.
If you have already found a way around this (there are two), then that is fine.
IF NOT, then I added a special field in the database to record the information. In particular, I added a current_login_ts field in the users table. This is set at login and when a user logs out, then the current_login time becomes last_login time and current_login time becomes NULL.
The updated schema has been posted.
1) Can we implement autocomplete the same way as the "suggestions" from the posted AJAX examples, or does it need to be more sophisticated (someone mentioned clickable suggestions above)?
ReplyDelete2) Should the new_event.php autocomplete only offer locations for which the user has the ability to post an event (they have a subscription or are checked in) or should the autocomplete list all locations as checkin.php does?
1) needs to be clickable, but can be on a list below, does not have to be fancy like google.
Delete2) you can either make the check at the input OR let the input be the generic one and make a check later. Probably a later check is simpler and this is perfectly fine.
If we use JQuery autocomplete to list the suggestions below the text input, can we use JQuery's built-in UI div classes to help with the styling?
DeleteYes.
DeleteThanks for all the answers so far!
ReplyDelete1) How are dynamic subscriptions supposed to work with web notifications? event_list.php and event_map.php can't check if a person was checked in to the relevant location at the time of a past event, because only the last checkin is stored. So if the user wants to display all notifications since the beginning, this list will not include events that matched dynamic subscriptions.
2) What information needs to be included on the map? Beyond putting a marker at the site of every event, do we need to somehow represent that there were multiple events at a single site?
1) correct, you cannot visualize dynamic subscriptions with the current database schema. We would need to have kept the list of all locations and I decided to keep it simple.
Delete2) you need to display the event information (i.e., time, location, description, etc). It is up to you to combine events in a single pushpin, or add multiple pushpins.
So we shouldn't check dynamic subscriptions at all for the web version then?
DeleteYou do have one accurate location, the last checkin.
DeleteWere the google maps powerpoint notes ever posted online?
ReplyDeleteThese have been posted.
DeleteIs a dynamic subscription global and persistent, or instead created each time a checkin occurs?
ReplyDeleteCase 1 would be that I can use the subscriptions page to set my dynamic subscription severity preferences, which then apply to every location I check into until I choose to update my subscription from the subscriptions page
Case 2 would be that the checkin page asks me for dynamic subscription severity with every location that I log into
Case 1, you set dynamic subscriptions once and they are in place until updated.
Deletecan we use a drop down menu instead of an autocomplete field?
ReplyDeletewe still would need to use ajax to generate the list, and this would prevent the user from entering an invalid location, so we wouldn't have to check for that.
You need both a drop-down (for the checkin) and an autocomplete (for everything else). If you run out of time, then using a drop-down is an acceptable substitute (but won't be full points).
DeleteWhen computing whether the user receives a message for an event, do dynamic or static subscriptions take priority? In other words, if a user is logged into a location and has a static subscription to that location, which severities are used to compute whether he/she is notified?
ReplyDeleteYou need the union and essentially choose the case where it would lead to more notifications. E.g., if the static only says 3, 4, 4 but the dynamic says 1, 1, 1, then they get a notification email and text if they have checked in there, but only get web notification after 2 hours of checking in, if a new event arrives.
Delete