Friday, March 14, 2014

Over spring break...

I felt that our client meeting today with Nikan went well. We were able to successfully demo what we had accomplished and we identified what we needed to get done for the next meeting. I think we have made a lot of progress since our previous client meeting where our demo didn't really work and a lot of the functionality was not complete. 

Over spring break, Fernando and I are going to add a boolean column to the user challenges table that will be true if the user has completed the challenge and false otherwise. Once the challenge completion reaches 100%, the boolean will be set, the user will see a modal dialog that displays a congratulations message, and the user will be given the option to take another challenge. We will also have to mark the challenge as "completed" in the challenges list.

Adding the column to the user challenges table should be as simple as doing

rails g migration AddFinishedToUserChallenge finished:boolean

and then running a "rake db:migrate". Then we just add some extra logic to the progress bar javascript that updates this boolean to true once the challenge has 100% completion. It will probably be a little more difficult to actually mark the challenge as completed and then display the completed challenges in a separate section (called "completed challenges" or something similar) on the challenges page. Obviously the modal that displays the information about the challenge when it is clicked should no longer have the "Take this challenge" button.

We will also have to add a little more logic to make sure that the user is checking in the given number of times per week. Right now, the code is just designed to make sure that the user cannot check-in again until 24 hours after their previous check-in. But, if the user is only supposed to be checking in 3 times per week, we will have to add some code that counts the number of check-ins in a week to make sure the user is staying on track (this information can later be used to send the user "reminder" email messages when they are getting close to missing a check-in). In this case, the first week will start when the user clicks "Take this challenge" (the starting date) and the first week will end seven days from this point. The second week will end 14 days from the starting date and so on. Implementing these checks will be tricky, but the user history table will provide us with timestamps for each check-in so we can use Ruby's handy time features such as 1.minute, 1.day, and 1.week to calculate how much time has elapsed since a given check-in.

No comments:

Post a Comment