Monday, March 10, 2014

Group coding session + some issues

Since we had to get twice as much done before this upcoming client meeting (due to a miscalculation on our timeline), we decided to meet for an informal group coding session yesterday morning. We all coded pretty much straight from 8:30am to 2:30pm and were able to get the action items mostly completed for this week's client meeting. I think it was good that we all got together and coded up our parts because 1) some parts were dependent on others so you could test them out and get them working without having to wait too long and 2) it gave us all motivation to get as much done as we could. Fernando and I collaborated on updating the progress bar so that it would be able to access the user's current progress on the challenge that they are taking (as stored in the database). There is a table in the database where the user's current challenge is stored as well as table that stores a history of the current challenge. This means that every time the user presses the Success button (to check-in) in order increment their progress in the challenge, a new row is created in the History table with the updated progress value. This allows us to keep track of the user's past check-in times so that we can determine if the user is checking in when they are supposed to.

Currently, the code stores the progress when it is updated and displays the current progress. However, there is an issue with dynamically access the values after the user clicks the Success button once for a page load. After the user clicks Success, the updated progress will get stored in the database and the progress bar will update. However, after the first click, it appears that the instance variables stored in the controller do not get refreshed (since the page is not reloaded) and therefore any additional button clicks will not update the database. Thus, we need to figure out a way (probably using ajax in some form) to call a method in the controller that will reload the updated values from the database for the next click of the Success button.

Additionally, Fernando and I will need to implement code that checks if the user has been checking in regularly as well as checks that they do not check in more than once in a 24 hour period. This should be fairly straightforward since the database date stamps each history row so that you exactly when the user last checked in and can then determine in what time range their next check-in should occur so that they can stay on track.

No comments:

Post a Comment