How to automatically assign all users?

Added by Nicola Cestaro 567 days ago

Hi guys!
First of all, sorry for my bad english!
So, I want to know how I can automatically assign all users to my quiz...
Try to explain my problem: if i publish a quiz for all users of my website, I can easy assign all registred users (quiz are available only for registred users).
I publish a quiz today and autorize all users registered before today, but if someone register to my site tomorrow, he is unable to take the quiz!
I can check all new registred users, and authorize it, but it is a little pesky!

So, I wis open my quiz to all registred users: when they register to my site, they can take all published quiz.

It is possible to do it?

Tnx a lot!

Nicola


Replies

RE: How to automatically assign all users? - Added by pasquale pellicani 264 days ago

Anyone? I have the same problem.... At least know in which table is written assign the user ...

RE: How to automatically assign all users? - Added by pasquale pellicani 263 days ago

[SOLVED]

Open file [site]plugins\user\jquarks.php

in onAfterStoreUser function remove WHERE condition from query...

at line n.139 double slash for comment it ...

RE: How to automatically assign all users? - Added by Debbie Welly 261 days ago

What do you mean "double slash for comment it ..."? Thank you.

RE: How to automatically assign all users? - Added by pasquale pellicani 261 days ago

for disable line of code .... delete last condition in query "WHERE field=1" ...

RE: How to automatically assign all users? - Added by Debbie Welly 251 days ago

Thank you. I did that, but the next time I opened it, that line was back again. It will not permanently delete it and it did not automatically assign all users. It almost seems like there may be another place that needs to be changed, but I'm still fairly new at this. Any help would be appreciated, DJ

RE: How to automatically assign all users? - Added by pasquale pellicani 251 days ago

Hi Debbie, what version you have? If you want to pass the file, rename the old one (that you) and try to paste this.

jquarks.php - fiel modified for automatic assign all registered user to quiz (5.3 KB)

RE: How to automatically assign all users? - Added by Debbie Welly 248 days ago

I have Version 0.3.1 and did what you suggested and it still did not automatically assign all users. I renamed the old jquarks.php; downloaded the one you provided; registered someone from another computer--I had to "assign" them. It would be tremendous if we could get this to work and I appreciate your assistance.

RE: How to automatically assign all users? - Added by pasquale pellicani 247 days ago

mmmm....maybe because my quizzes are all kinds of 'private', you use public quiz ?

RE: How to automatically assign all users? - Added by Debbie Welly 247 days ago

OH, NO....do I feel stupid! Let me try changing it to private. As it is, only registered users can access. I will advise as soon as I try it. Thanks so much (especially if that works!)

RE: How to automatically assign all users? - Added by Debbie Welly 247 days ago

I had a feeling it was too good to be true--still doesn't work. Now, IF they were public all the way through so that anyone could take them, there was no problem. But we have the sites set up that you need to be registered to take the course and the tests are at the end of each lesson. If you'd like to look at it, http://www.yaim.org/web/biblestudycourse.html but you'd have to register to see the actual lessons; then the quiz is at the end of each lesson. Some days there are 10 or more new users so we must go through each quiz, grant permission and then re-check on show results in front end--quit time consuming. I wish JQuarks had support for less than 4 hours... I hope I'm making sense, thanks so much for any help you can give--it's tough being a "newbie."

RE: How to automatically assign all users? - Added by Shur Bor 201 days ago

I'm very sorry, but I'm pretty new to mysql so I haven't got even a slightest idea about why this solution doesn't work 4 me.
Moreover, i tried to copy this
@$query = 'INSERT INTO' .
' #__jquarks_users_quizzes' .
' (`quiz_id`, `user_id`)' .
' VALUES (' . $publicQuiz . ', ' . $user['id'] . ')' ;@

To the onLogoutUser function setting $publicQuiz and $user['id'] variables to some predefined values... I was just expecting that it should assign user with id, say, 3, to the quiz with id 66. But nothing happened. Am I missing something? Maybe variable $msg in the onAfterStoreUser function is used somehow I don't know or something... Any help would be highly appreciated.

I'm pretty new to it and 4 me this feature(auto-assigning new users to quizzes) is crucial.

And... Thx a lot 4 the nice software btw =)

RE: How to automatically assign all users? - Added by mikael meshera 197 days ago

I had the same problem, until i figured it out!!!! It is simple as it is! You have to make your quizes PUBLIC, when you point a link trough the MENU, make it for REGISTERED. Thats It! Hope it helped!!!

RE: How to automatically assign all users? - Added by Debbie Welly 197 days ago

I tried that Mikael and it still did not work. I think we'll just tolerate having to go in and assigns new users daily--it is frustrating, though; such a good component!

RE: How to automatically assign all users? - Added by Shur Bor 196 days ago

As a pity, 4 now we just have to... Anyway, I'm going on investigating this issue, and I'll let u know if I would get it finally.

RE: How to automatically assign all users? - Added by Debbie Welly 196 days ago

Thanks, it would be great since we have about 45 quizzes we have to manually assign several times a week! Have a good night.

RE: How to automatically assign all users? - Added by mikael meshera 193 days ago

You right, it only shows Quizes menu.. Why developers, can't fix this?

RE: How to automatically assign all users? - Added by mikael meshera 193 days ago

Another thing is that registred users can not apply to public quizzes....

RE: How to automatically assign all users? - Added by Shur Bor 193 days ago

Hi here again!
I wrote a whole story about fixing this but due to some bug in my browser it haven't posted here... So, I'll be brief.
I have done a full debug using mysqladmin and mysql server logging at my debian lenny test server just to figure out I'm a total dumbass... Since I have upgraded JQuarks, I just forgot to enable this plugin, so Joomla simply wasn't executing it... And it was the matter.
So, all I needed to do were:
1) Go to administrator back-end and re-check User-JQuarks plugin in plugin manager to make it enabled.
2) Fix lines 137-139 in (site_root)/plugins/user/jquarks.php:
@$query = 'SELECT id' .
' FROM #__jquarks_quizzes' ;//.
//' WHERE access_id = 0' ;@

Just as it was said by pasquale pellicani at the top of this topic.

And it worked for me!
Lemme know if it would work 4 u aswell, but remember that if yes, u're just as dumb as I am ;)

And... Dear developers, I'm so very sorry for my stupidity and thanks again alot!

RE: How to automatically assign all users? - Added by Debbie Welly 193 days ago

Uh-uh, I've also been going round and round and checked--sure enough the plugin was disabled!!! I've been working on JQuarks for months with no issues. Anyway, as soon as time permits I am going to try this again! I'll let y'all know.

RE: How to automatically assign all users? - Added by Debbie Welly 192 days ago

YIPPEE, YIPPEE, YIPPEE and thank you, thank you, thank you.....yes I'm as dumb as you :); plugin disabled and after I enabled that and fixed the php file; it works! I did have some trouble getting the coding to stay--it just didn't like it; and then I had to re-link some of the tests, but it was worth every minute since we have a lot of tests!!! www.yaim.org and www.yahwehschildren.org. Again, thank you so much--I wonder what will happen when we upgrade??? Oh, I don't want to think about it right now!

RE: How to automatically assign all users? - Added by pasquale pellicani 192 days ago

Hello guys, I been off for holidays and I've got to follow I went on, unfortunately, as often happens when the project changed course, forget the hacks to the code. If needed, remind me what you need, however, because the collection of hacks to joomla and components all of them write in my blog;) (my personal organizer) happy holidays to all ;)

RE: How to automatically assign all users? - Added by Debbie Welly 192 days ago

First of all, folks must remember to ENABLE the plugin (that's something important); next the changes appeared to be line 137-139,

//getting all public quizzes
$query = 'SELECT id' .
' FROM #__jquarks_quizzes';// .
//' WHERE access_id = 0' ;

Reply