Jump to content

Recommended Posts

Hello,

 

I am trying to develop a merit based competition for students who do online worksheets. I want an incentive for students to do a set of worksheets on as many consecutive days as possible. At the completion of each worksheet set I can easily have the form add points to the database, say 4 points, and if a student does these for 4 days, then they'll have 16 points which would give them a rank, 5 days would give them another 4 points and a higher rank for having 20 total points and so on.

 

But say if on day 5 the student didn't do a worksheet set, I'd like to have 4 points removed from their total score, making them go down a level. If they missed another day, they'd lose another 4. Although it is easy to remove points manually, how can I automate it so that I don't have to check who has done the worksheet set everyday? Is it even possible to do this automatically?

 

Thanks for any help.

Link to comment
https://forums.phpfreaks.com/topic/98581-automatically-removing-points-from-user/
Share on other sites

Alternatively update the points total the next time a query is done? i.e. i want to  know how many points student A has, do the SQL query, and perform a date_sub to find out if they're outside their allotted time. I'd have to think a little about this sort of query because obviously you'll need to work out what happens when a skipped period occurs (i.e. last date was yesterday but before yesterday they missed 3 days).

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.