# |
Aug 8th 2008, 09:05 |
TommyO |
hiya |
# |
Aug 8th 2008, 09:05 |
FunkyWeasel |
Good afternoon folks. |
# |
Aug 8th 2008, 09:04 |
TommyO |
$this->Model->updateAll() is easier |
# |
Aug 8th 2008, 09:03 |
TommyO |
but if it helps... |
# |
Aug 8th 2008, 09:03 |
TommyO |
yuck |
# |
Aug 8th 2008, 09:03 |
ammadsaleem1 |
guess I will be going for bulk update using simple cakePHP $this->Model->query(); |
# |
Aug 8th 2008, 09:02 |
TommyO |
or am I still missing something? :) |
# |
Aug 8th 2008, 09:02 |
TommyO |
ammadsaleem1: does that make sense? |
# |
Aug 8th 2008, 09:02 |
ammadsaleem1 |
thanks tommy |
# |
Aug 8th 2008, 09:01 |
TommyO |
ammadsaleem1: and those events are easy, the afterSave() callback |
# |
Aug 8th 2008, 08:58 |
TommyO |
ok. let the action being taken touch the pieces it affects. someone answers a question, all scores relative to that question are adjusted. quizmaker changes an answer, all scores relative to that answer are affected. no major mass changes there |
# |
Aug 8th 2008, 08:57 |
ammadsaleem1 |
there is no such restriction |
# |
Aug 8th 2008, 08:55 |
ammadsaleem1 |
and can specify the result at any stage |
# |
Aug 8th 2008, 08:55 |
TommyO |
so what, since it doesn't matter until the event (closing the puzzle) has been triggered |
# |
Aug 8th 2008, 08:54 |
ammadsaleem1 |
quiz maker can change the correct answer any time |
# |
Aug 8th 2008, 08:54 |
TommyO |
so there's no need to do the math |
# |
Aug 8th 2008, 08:54 |
TommyO |
but if noone can see them then its moot |
# |
Aug 8th 2008, 08:54 |
ammadsaleem1 |
scores can change on the fly |
# |
Aug 8th 2008, 08:53 |
TommyO |
*away |
# |
Aug 8th 2008, 08:53 |
TommyO |
now your bottleneck went awat again |
# |
Aug 8th 2008, 08:53 |
TommyO |
well that's easier still, since the scores are no-longer changing on the fly. have the process that 'closes' the quiz calculate the scores |
# |
Aug 8th 2008, 08:52 |
ammadsaleem1 |
now what |
# |
Aug 8th 2008, 08:52 |
ammadsaleem1 |
u cannot see the score card untill All questions have correct answers specified or till the Result announcement date has arrived |
# |
Aug 8th 2008, 08:51 |
ammadsaleem1 |
but there is another catch |
# |
Aug 8th 2008, 08:51 |
TommyO |
get the answers. get the correct answer. calc the scores. cache if possible. display |
# |
Aug 8th 2008, 08:51 |
ammadsaleem1 |
okay so each user must see his scorecard in oder for the leaderboard to be updated |
# |
Aug 8th 2008, 08:50 |
ammadsaleem1 |
can you also see a solution |
# |
Aug 8th 2008, 08:50 |
TommyO |
ammadsaleem1: I would have the score calculated on scoreboard view and not stored anywhere I think |
# |
Aug 8th 2008, 08:50 |
TommyO |
ok. now I see the load problem :) |
# |
Aug 8th 2008, 08:50 |
ammadsaleem1 |
yup |
# |
Aug 8th 2008, 08:50 |
TommyO |
based on the quiz's whim |
# |
Aug 8th 2008, 08:49 |
TommyO |
or up |
# |
Aug 8th 2008, 08:49 |
TommyO |
ammadsaleem1: so the score isn't based on what the answer was when they answered it, but what it is after a change. meaning a player's score could go down? |
# |
Aug 8th 2008, 08:49 |
tbranyen_ |
i'm having trouble understanding where your bottleneck is |
# |
Aug 8th 2008, 08:49 |
ammadsaleem1 |
now what can be done |
# |
Aug 8th 2008, 08:49 |
ammadsaleem1 |
questons |
# |
Aug 8th 2008, 08:48 |
ammadsaleem1 |
yupthats real world quizzes |
# |
Aug 8th 2008, 08:48 |
tbranyen_ |
haha yeah |
# |
Aug 8th 2008, 08:48 |
TommyO |
'change the correct answer' wow, that's a weird quiz. |
# |
Aug 8th 2008, 08:48 |
ammadsaleem1 |
so ... |
# |
Aug 8th 2008, 08:48 |
ammadsaleem1 |
and finally the total score for the Quiz for the user is calculated |