Jump to content

Quizzes


Adriano Faria

Recommended Posts

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 :D 

Link to comment
Share on other sites

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 :D 

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
Share on other sites

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 :D 

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.

Link to comment
Share on other sites

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
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Adriano Faria
Fix wrong column name
Link to comment
Share on other sites

@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 by xtech
Link to comment
Share on other sites

  • 2 weeks later...
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
Share on other sites

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 by Adriano Faria
Link to comment
Share on other sites

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
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...