News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SMF Quiz

Started by Diego Andrés, February 18, 2009, 01:08:19 PM

Previous topic - Next topic

Diego Andrés

I'll have a look soon, thanks

SMF Tricks - Free & Premium Responsive Themes for SMF.

Diego Andrés

Hope this fixes it? commit

2.0.1 - 07 November 2022
  • Bug Fix Fixed stats issue when there are no quizzes/questions created.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Dave J

Quote from: Diego Andrés on November 07, 2022, 08:37:35 PMHope this fixes it? commit

2.0.1 - 07 November 2022
  • Bug Fix Fixed stats issue when there are no quizzes/questions created.


Hi Diego,

Thanks for working on it.

It would seem that's not the issue. What I managed to do with v2.0 is install it on the forum, then I went about creating a quiz manually instead of importing one. This actually works and the quiz plays and scores as it should.

Further to that I created another SMF2.1.2 test forum on the same server/host as the main site and installed the quiz there. I installed just the quiz and loaded the questions, answers and categories via the database which is the quickest way to do it and they all work fine with no issues. I also did test for importing quizzes and that works OK with the quizzes imported working fine.

I think there is something with the existing site/files that is causing the null error as I cannot reproduce it anywhere.

I'm going to keep working on it
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

I have now found out what the issue was and have installed the quiz on the site successfully.

When the quiz is first installed the default 'Import Quizzes as User ID' is set to '1' so there I was installing everything thinking that it was fine.

But what I didn't know is that on my friends website they don't have a member with ID 1 his first ID number is 2 so none of the quizzes installed worked as in theory no member had installed them.

Once I found that, after a few hours of messing about in the database, everything installed just fine and it's all working as it should.

So it's something to look out for if anyone else has the same issue. It was probably because the website started many years ago and was initially a phpBB site and has been converted twice on SMF and lost owners/members over the years.

Maybe you can set something up Diego, sometime in the future, so that doesn't happen to anyone else.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Diego Andrés

2.0.2 - 10 November 2022
  • Bug Fix Prevent non creators from managing other users quizzes.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Dave J

There is an issue with some of the quizzes from my site where the question text is to long for the characters in the question.

The reason is that the database only allows for 255 characters in the question text.

What you can do is use the attached database file to replace the one in your current package.

You will need to uninstall the quiz and the tables via your package manager and basically start again.

If you want to retain any categories you have created then instead of ticking the box 'Remove all data associated with this modification' go into your phpMyAdmin and delete all the quiz tables except the categories one.

Now re-install the quiz with the attached database file in the pack.

Hope that helps.

Dave

NOTE: There maybe a way of making the changes via the database by using the SQL but I don't know what it is. If anyone reading this who has knowledge of how to do that would they please share. Thank you

Diego,

Can you replace the current database file with the attached please? Using Notepad++ I have changed all 8 instances, in the newest file, of varchar(255) to varchar(512).
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

Hi Diego,

We have an issue with new quiz creations.

I found this out after creating a new quiz on my main site.

I have also replicated it on the test site, where I have created a post with screenshot and also I have left the error log in tact so you can see that too..

I created a new quiz, this operation works OK. The only issue is that at the end of the quiz creation, having written all thew questions, you click on 'Done' a window pops up and says 'You are not allowed to access the section'.

It happens no matter what type of quiz/questions you're creating.

My best guess here is that it's to do with the new changes you made regarding the user quizzes delete permissions.

The quiz does actually work once it's been approved but for every time you click on the 'Done' it creates 38 errors in the log.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

Hi Diego,

It seems to me that there is a function missing from the quiz.

If someone disputes an answer there is no notification to admin that this has happened.

I think that there should either be an email or notification sent to the admin team to let them know of this so it can be checked and resolved.

What say you?
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

Quote from: Dave J on January 24, 2023, 08:36:57 AMHi Diego,

It seems to me that there is a function missing from the quiz.

If someone disputes an answer there is no notification to admin that this has happened.

I think that there should either be an email or notification sent to the admin team to let them know of this so it can be checked and resolved.

What say you?

Hi Diego,

Did you ever look into this further?

I've had a few reports a month or so ago that I didn't know about, so a fix for this would be good if you could do it please?
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Diego Andrés

I'll try to have a look soon.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Dave J

If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

Quote from: Diego Andrés on May 16, 2023, 09:49:00 AMI'll try to have a look soon.

I know you're busy, this is just a reminder about my request.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

Hi Diego,

More disputes posted and again I didn't know until I remembered to look again today. Would you have a look please?

Dave
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Diego Andrés

Sorry been a bit busy, will try to work on that issue.
If I understand and recall correctly, the disputes work fine. However the issue is that you have to remember to visit this area to check for any disputes, because there's no notification, correct?

SMF Tricks - Free & Premium Responsive Themes for SMF.

Dave J

Quote from: Diego Andrés on August 01, 2023, 08:54:40 PMSorry been a bit busy, will try to work on that issue.
If I understand and recall correctly, the disputes work fine. However the issue is that you have to remember to visit this area to check for any disputes, because there's no notification, correct?

Yes that's exactly it Diego, thanks for the reply
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Diego Andrés

Since I'm not actively developing this MOD at this time, I'll likely provide you some manual instructions for this.
It would seem sending a PM to the admins would make sense and it could be simple, or only sending a PM to the person that created the quiz?
Either way I'll try to post it soon.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Dave J

Thanks very much Diego
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Diego Andrés

This should work for you.

Sources/Quiz/Dispute.php
Code (Search) Select
// Otherwise someone is submitting a dispute
$smcFunc['db_insert']('insert',
'{db_prefix}quiz_dispute',
array(
'id_quiz_question' => 'int',
'id_quiz' => 'int',
'id_user' => 'int',
'reason' => 'string',
'updated' => 'int'
),
array(
$id_quiz_question,
$id_quiz,
$id_user,
$reason,
time()
),
array('id_quiz_dispute')
);
Code (Add After) Select
global $scripturl;

// Get the admins
$adminQuery = $smcFunc['db_query']('', '
SELECT id_member
FROM {db_prefix}members
WHERE id_group = {int:admin}',
array(
'admin' => 1
)
);
$admins = array();
while($row = $smcFunc['db_fetch_assoc']($adminQuery))
$admins[] = $row['id_member'];
$smcFunc['db_free_result']($adminQuery);

require_once($sourcedir . '/Subs-Post.php');

sendpm(
array('to' => $admins, 'bcc' => array()),
'New Quiz Dispute!',
un_htmlspecialchars('There is a new quiz dispute awaiting response.

Link to the dispute: ' . $scripturl . '?action=admin;area=quiz;sa=disputes'),
);

SMF Tricks - Free & Premium Responsive Themes for SMF.

Dave J

Thanks Diego. I'm away on holiday at the moment, I'll look at it when I get back.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

#1099
Hi Diego,

That worked perfectly, thank you very much.

Is it possible to only have it sent to a certain admin? Maybe the code could be changed to have it sent to just one or even 2.

It's not a deal breaker Diego I was just wondering that's all

If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Advertisement: