Adriano Faria Posted July 17, 2017 Author Share Posted July 17, 2017 12 hours ago, Adriano Faria said: If you allow play more than once, it will preserve the highest score for the member. @xtech, just a correction here: it will store only the first attempt; not the highest. It doesn't make sense to keep storing several attempts until the user gets a higher score, so only the first is stored. Link to comment
xtech Posted July 17, 2017 Share Posted July 17, 2017 2 hours ago, Adriano Faria said: @xtech, just a correction here: it will store only the first attempt; not the highest. It doesn't make sense to keep storing several attempts until the user gets a higher score, so only the first is stored. I understand your point of view. But for a community who uses quizzes to improve interaction, it would be nice that when quizzes can be taken more than once, the score gets updated with the last one, otherwise there is no point in repeating the quizz. Repeating the quizz is highly desirable as you keep people interacting with the site and with each other so i think storing the last classification when quizzes are allowed to be taken more than once would be advantageous. For me it's good and desirable that the users could repeat the test over and over trying to improve their scores. This way i can keep users within the site, competing with each other, which is very good from the site owner point of view. Some of my users are getting frustrated as they try to improve their score and the ranking doesn't get updated... they want their own bragging rights kmk 1 Link to comment
Adriano Faria Posted July 17, 2017 Author Share Posted July 17, 2017 3 minutes ago, xtech said: I understand your point of view. But for a community who uses quizzes to improve interaction, it would be nice that when quizzes can be taken more than once, the score gets updated with the last one, otherwise there is no point in repeating the quizz. Repeating the quizz is highly desirable as you keep people interacting with the site and with each other so i think storing the last classification when quizzes are allowed to be taken more than once would be advantageous. For me it's good and desirable that the users could repeat the test over and over trying to improve their scores. This way i can keep users within the site, competing with each other, which is very good from the site owner point of view. Some of my users are getting frustrated as they try to improve their score and the ranking doesn't get updated... they want their own bragging rights So everyone will have 100% at some point. Is that what you want? If I play and get 10%, I'll play again and take note of the right answers.. then I'll get 100%. Where's the sense in that? Link to comment
xtech Posted July 17, 2017 Share Posted July 17, 2017 1 minute ago, Adriano Faria said: I'll play again and take note of the right answers.. That is if you show them the correct answers, which i never do I want them to study and improve to get better in between taking the quizzes. If they prepare well themselves, eventually some of them may have 100%, but that's fine and motivates others to try quizzes again. kmk 1 Link to comment
Adriano Faria Posted July 17, 2017 Author Share Posted July 17, 2017 7 minutes ago, xtech said: Some of my users are getting frustrated as they try to improve their score and the ranking doesn't get updated... You need to understand that this is not custom app; I'm not sure the others 68 purchases will want me to change that because of your users. Just now, xtech said: That is if you show them the correct answers, which i never do Again: everyone must NOT use it so? Sorry, that won't change. Let me know if you want to edit the file in your install. Link to comment
xtech Posted July 17, 2017 Share Posted July 17, 2017 Adriano, sorry but you don't need to be over agressive, i am not asking you to customize this to suit my particular needs nor i will ever do it in an implicit way. I am just giving you feedback about usage: you take it or not, do it as you wish. If you find it valuable you can reflect it (or not) in the next releases. You are free to make your development choices and i recognize you that freedom, as i recognize people freedom to buy and renew you app. Although i am not an IPS nor web dev, i am a computer engineer so i understand that support can be sometimes a pain for developers. I don't want to add to that pain, so from now on i will refrain to post usage feedback and will only post any bug as strictly as necessary. Fandel 1 Link to comment
Adriano Faria Posted July 17, 2017 Author Share Posted July 17, 2017 Just now, xtech said: Adriano, sorry but you don't need to be over agressive I'm not being. You showed your point of view, I showed you mine. So far, it is a change that matters only to you and will change the whole LEADERBOAD for others 68 purchases. This is NOT something I can do based only in one feedback, so if you want to make it in your install, that's fine; I'll show you how. xtech 1 Link to comment
xtech Posted July 17, 2017 Share Posted July 17, 2017 Well, sorry if i misunderstood. I don't want to impose any of my views, honestly. Yes if you can show me what i can do, i would be thankful. Link to comment
Adriano Faria Posted July 17, 2017 Author Share Posted July 17, 2017 22 minutes ago, xtech said: Yes if you can show me what i can do, i would be thankful. Ok. I'll show you as soon as I reach my PC again. Mobile device now. xtech 1 Link to comment
Adriano Faria Posted July 17, 2017 Author Share Posted July 17, 2017 (edited) On 17/07/2017 at 0:03 PM, xtech said: Yes if you can show me what i can do, i would be thankful. Open applications\quizzes\sources\Quiz\Quiz.php and find: /** * Save the Quiz (Leaderboard) */ public function saveGame( $score, $time ) { /* Save the Quiz results in the Leaderboard. Only the first attempt will be recorded */ if( \IPS\Db::i()->select( 'COUNT(*) as count', 'quizzes_leaders', array( 'q_lquiz_id=? AND q_lmid=?', $this->id, \IPS\Member::loggedIn()->member_id ) )->first() == 0 ) { $toInsert = array( 'q_lquiz_id' => $this->id, 'q_lmid' => \IPS\Member::loggedIn()->member_id, 'q_lscore' => $score, 'q_ldate' => time(), 'q_lipaddress' => \IPS\Request::i()->ipAddress(), 'q_ltime' => $time ); \IPS\Db::i()->insert( 'quizzes_leaders', $toInsert, TRUE ); } } Change to: /** * Save the Quiz (Leaderboard) */ public function saveGame( $score, $time ) { /* Save the Quiz results in the Leaderboard. Only the first attempt will be recorded */ if( \IPS\Db::i()->select( 'COUNT(*) as count', 'quizzes_leaders', array( 'q_lquiz_id=? AND q_lmid=?', $this->id, \IPS\Member::loggedIn()->member_id ) )->first() == 0 ) { $toInsert = array( 'q_lquiz_id' => $this->id, 'q_lmid' => \IPS\Member::loggedIn()->member_id, 'q_lscore' => $score, 'q_ldate' => time(), 'q_lipaddress' => \IPS\Request::i()->ipAddress(), 'q_ltime' => $time ); \IPS\Db::i()->insert( 'quizzes_leaders', $toInsert, TRUE ); } else { $toUpdate = array( 'q_lscore' => $score, 'q_ldate' => time(), 'q_lipaddress' => \IPS\Request::i()->ipAddress(), 'q_ltime' => $time ); \IPS\Db::i()->update( 'quizzes_leaders', $toUpdate, array( 'q_lquiz_id=? AND q_lmid=?', $this->id, \IPS\Member::loggedIn()->member_id ) ); } } This will add a new record if the user hasn't played yet and will update that record if already played. I probably will add it as a setting in the next version. Edited July 18, 2017 by Adriano Faria Fix wrong column name Square Wheels, xtech and kmk 1 2 Link to comment
xtech Posted July 17, 2017 Share Posted July 17, 2017 Thank you a lot for your help. This will be very good for the community dynamics. Link to comment
xtech Posted July 18, 2017 Share Posted July 18, 2017 (edited) @Adriano Faria just to avoid a potential bug if anyone uses the solution above. There was a typo in the update query: instead of: \IPS\Db::i()->update( 'quizzes_leaders', $toUpdate, array( 'quizz_id=? AND q_lmid=?', $this->id, \IPS\Member::loggedIn()->member_id ) ); should be \IPS\Db::i()->update( 'quizzes_leaders', $toUpdate, array( 'q_lquiz_id=? AND q_lmid=?', $this->id, \IPS\Member::loggedIn()->member_id ) ); It was throwning an error as the column quizz_id didn't exist in that table. Edited July 18, 2017 by xtech Adriano Faria 1 Link to comment
Adriano Faria Posted July 18, 2017 Author Share Posted July 18, 2017 6 minutes ago, xtech said: @Adriano Faria just to avoid a potential bug if anyone uses the solution above. There was a typo in the update query: It was throwning an error as the column quizz_id didn't exist in that table. Tks, just edited the post. Link to comment
Fandel Posted August 2, 2017 Share Posted August 2, 2017 It is possible that i change the code for multiple right anwsers? Which files need a change? Did you have a workaround? Link to comment
CP_User Posted August 2, 2017 Share Posted August 2, 2017 10 minutes ago, Fandel said: It is possible that i change the code for multiple right anwsers? Which files need a change? Did you have a workaround? I'll 2nd this too, be another great option to add. On 29/06/2017 at 2:53 PM, CP_User said: Adriano, Is there a way that these quizzes could be also used to take a quiz and it could tell you things? For an example, you set questions to traits, and by the end of the questions it would give you the answer that you are a happy person or we guessed that you're a Capricorn. Another example could be something like Which Famous Person Are You Most Like? And we'd set the questions. On 29/06/2017 at 2:55 PM, Adriano Faria said: This would be a new type of quiz. It's on my radar something like that... I didn't add it now because I have a bunch of resources to upgrade so I couldn't be stuck in one app only for much time. On 29/06/2017 at 2:58 PM, CP_User said: That makes sense, I wouldn't even want to imagine the amount of time these things take. I think personality quizzes or guessing quizzes (I'm not sure what they're actually called) would be a great add-on indeed. I'll certainly be interested if something could be implemented to this app at a later date. Looking to see if this is still possible to do? Will be looking to buy this soon Link to comment
Adriano Faria Posted August 2, 2017 Author Share Posted August 2, 2017 (edited) 16 minutes ago, Fandel said: It is possible that i change the code for multiple right anwsers? I don't support code changes. You're on your own if you do. If ANYTHING goes wrong, you will only havr support again if UNINSTALL your version and install mine. 6 minutes ago, CP_User said: I'll 2nd this too, be another great option to add. Looking to see if this is still possible to do? Will be looking to buy this soon As I already said, I have absolutely no plans to add new type of quizzes in this app so soon. Edited August 2, 2017 by Adriano Faria Link to comment
CP_User Posted August 2, 2017 Share Posted August 2, 2017 That's fair enough. What about the other quotes from a couple weeks ago, or are they off the radar too? Link to comment
Adriano Faria Posted August 2, 2017 Author Share Posted August 2, 2017 I have no plans for this app for this year, at least. . Link to comment
CP_User Posted August 2, 2017 Share Posted August 2, 2017 2 minutes ago, Adriano Faria said: I have no plans for this app for this year, at least. . That's a shame but I understand, cheers! Link to comment
Fandel Posted August 2, 2017 Share Posted August 2, 2017 (edited) Can a financial incentive change something. I would be willing to invest. 100?, 200?, 500? Edited August 2, 2017 by Fandel Link to comment
BradTBP Posted August 5, 2017 Share Posted August 5, 2017 On quiz, what happens if I use option to "export quiz"? It says "Are you Sure"? So I was worried something else other than an export of data happens. Does exporting do anything else? Thanks. Link to comment
Adriano Faria Posted August 5, 2017 Author Share Posted August 5, 2017 (edited) It exports the quiz data: title, questions and replies, time, type. That's all. Edited August 5, 2017 by Adriano Faria Link to comment
Disruption Posted August 7, 2017 Share Posted August 7, 2017 Is there anyway to track grades of those who take quizzes? Maybe make something that allows us to set weights of certain quizzes. Then give an average grade? Essentially a school system. kmk 1 Link to comment
Adriano Faria Posted August 8, 2017 Author Share Posted August 8, 2017 12 hours ago, Agent Shark said: Is there anyway to track grades of those who take quizzes? Maybe make something that allows us to set weights of certain quizzes. Then give an average grade? Essentially a school system. No. Link to comment
Bendensin Posted August 13, 2017 Share Posted August 13, 2017 I created a member named "Test Quiz Master" and added him to the Quiz Masters group which has full permissions to create quizzes. Next, in the member groups section at Members => Quiz Masters => Content I made "Can Hide Own Content?" customized to allow the member to hide his own content in Quizzes. So any member of that group should be able to hide and unhide their own content in Quizzes. However... Using that member name, I created a test quiz and added questions. Everything looked okay. I didn't click the "ALLOW PLAYS" button. Now I would like to hide that quiz, so it doesn't display in the quizzes section or the "View New Content" section to other members until I am finished with it. But when I click on "Quiz Actions" => "Hide" I get this error: Quote Sorry, there is a problem We could not locate the item you are trying to view. Error code: QUIZ-VIEW/2 Not only that, but when I go back to work on my quiz again, it's gone, that is, it's also hidden from me. What setting would I need to make, or change, so that a member in the Quiz Masters group can hide their quizzes from others, without hiding their quizzes from themselves as well? Link to comment
Recommended Posts