serverman Posted June 16, 2008 Share Posted June 16, 2008 first i want to say i know this is a stupid question im working on a script that has grades in it ...in the database you start out with 100 i want the quiz grade to average with the master grade mathematical how is that done? im sorry lol im just not sure how Quote Link to comment https://forums.phpfreaks.com/topic/110378-solved-ok-i-have-no-common-sense/ Share on other sites More sharing options...
Daniel0 Posted June 16, 2008 Share Posted June 16, 2008 That kind of depends on the scoring algorithm... Quote Link to comment https://forums.phpfreaks.com/topic/110378-solved-ok-i-have-no-common-sense/#findComment-566297 Share on other sites More sharing options...
serverman Posted June 16, 2008 Author Share Posted June 16, 2008 all quizzes are worth 100 points Quote Link to comment https://forums.phpfreaks.com/topic/110378-solved-ok-i-have-no-common-sense/#findComment-566299 Share on other sites More sharing options...
Daniel0 Posted June 16, 2008 Share Posted June 16, 2008 Yes, but how does the scoring work? Like do you get X amount of points per correct, for instance? Quote Link to comment https://forums.phpfreaks.com/topic/110378-solved-ok-i-have-no-common-sense/#findComment-566304 Share on other sites More sharing options...
serverman Posted June 16, 2008 Author Share Posted June 16, 2008 its -10 for each wrong here is an example how it works if ($q9 == "d"){ echo "9)".$q9." <font color='#33FF66'>Right</font> <br>"; } else{ echo "9)".$q9." <font color='#FF0000'>wrong</font> <br>"; $w = $w - $v ;} oh and v = 10 and w= 100 Quote Link to comment https://forums.phpfreaks.com/topic/110378-solved-ok-i-have-no-common-sense/#findComment-566308 Share on other sites More sharing options...
serverman Posted June 16, 2008 Author Share Posted June 16, 2008 ok i figured it out here is how for anyone who reads this later on here is database layout username|id|emal|ect...|numofquiz|quizgrade numofquiz is the number of quizzes taken and all quiz are worth 100 points so at the end of each quiz it adds points earned to what was already there in points and add +1 to quizgrade now to get the grade you do this numofquiz*100= mostpoint mostpoints/quizegrade=x x*100= grade Quote Link to comment https://forums.phpfreaks.com/topic/110378-solved-ok-i-have-no-common-sense/#findComment-566339 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.