Moderative status over authors' own quizzes

All web design discussion, including Ultimate Quiz MOD support.

Moderator: CricketMX Forum Moderators

User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

In quiz_cp.php

FIND

Code: Select all

	for( $o = 0; $o < count($users); $o++ )
	{
		if( $userdata['user_id'] == intval($users[$o]) )
		{
			$quiz_moderator = ON;
		}
	}

	if( $quiz_moderator != ON && $userdata['user_level'] != ADMIN )
	{
		message_die(GENERAL_ERROR, $lang['Quiz_cp_not_moderator']);
	}
Firstly, try replacing it with:

Code: Select all

	for( $o = 0; $o < count($users); $o++ )
	{
		if( $userdata['user_id'] == intval($users[$o]) )
		{
			$quiz_moderator = ON;
		}
	}

echo 'MOD STATUS: ' . $quiz_moderator;

	if( $quiz_moderator != ON && $userdata['user_level'] != ADMIN )
	{
		message_die(GENERAL_ERROR, $lang['Quiz_cp_not_moderator']);
	}
If it says MOD STATS: 1, replace it with this:

Code: Select all

	for( $o = 0; $o < count($users); $o++ )
	{
		if( $userdata['user_id'] == intval($users[$o]) )
		{
			$quiz_moderator = ON;
		}
	}

	if( $quiz_moderator != ON )
	{
		message_die(GENERAL_ERROR, $lang['Quiz_cp_not_moderator']);
	}
Otherwise, I'll need to look into it some more. It looks like I didn't finish this moderator part too well, but if that's the case I'm surprised it has never been reported before :?
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
ABTOP
Greenhorn
Greenhorn
Posts: 24
Joined: Tue Jul 24, 2007 7:49 pm
Contact:

There is nothing showing.
Here's what I get at the very top of the page

Code: Select all

MOD STATUS:
Warning: Cannot modify header information - headers already sent by (output started at /home/newrus06/public_html/forum/quiz_cp.php:54) in /home/newrus06/public_html/forum/includes/page_header.php on line 943

Warning: Cannot modify header information - headers already sent by (output started at /home/newrus06/public_html/forum/quiz_cp.php:54) in /home/newrus06/public_html/forum/includes/page_header.php on line 947

Warning: Cannot modify header information - headers already sent by (output started at /home/newrus06/public_html/forum/quiz_cp.php:54) in /home/newrus06/public_html/forum/includes/page_header.php on line 949
It should produce either 1 or 2, right?
Why on earth is it giving me nothing?
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Hmm, that is a very good question.

I'm expecting the number 1... I'll have a look back through functions_quiz.php and use that code, that seemed to produce the right number.

Should have a reply for you in a few hours :?
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
ABTOP
Greenhorn
Greenhorn
Posts: 24
Joined: Tue Jul 24, 2007 7:49 pm
Contact:

So, do you think there is any hope for me?
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

What happens if you try using the quiz.php/quiz_cp.php from v1.2.0 out of interest?

DL from http://www.phpbb.com/community/viewtopic.php?t=362280
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
ABTOP
Greenhorn
Greenhorn
Posts: 24
Joined: Tue Jul 24, 2007 7:49 pm
Contact:

battye wrote:What happens if you try using the quiz.php/quiz_cp.php from v1.2.0 out of interest?...
1. I don't get the moderator's buttons for my quizzes.

2. if I play somebody else's quiz, I do get the moderator's button, although I'm not a moderator, and when I hit any of those I get "You are not a moderator" error.

I tried adding the line

Code: Select all

echo "MOD STATUS: " . $quiz_moderator;
in quiz_cp.php like before and I still get nothing for the status

Code: Select all

MOD STATUS: 
ABTOP
Greenhorn
Greenhorn
Posts: 24
Joined: Tue Jul 24, 2007 7:49 pm
Contact:

Have you given up?
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Unfortunately I have been quite busy. As soon as I find time for UQM I will make finding a solution to this a priority.
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
ABTOP
Greenhorn
Greenhorn
Posts: 24
Joined: Tue Jul 24, 2007 7:49 pm
Contact:

battye wrote:... As soon as I find time for UQM I will make finding a solution to this a priority.
http://youtube.com/watch?v=9mcZdDCOeuE
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

:oops: :oops: :oops:

As nobody else has ever reported this problem, perhaps it could be part of server configuration? Or maybe not all of the v1.3.3 files have been uploaded fully?
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
ABTOP
Greenhorn
Greenhorn
Posts: 24
Joined: Tue Jul 24, 2007 7:49 pm
Contact:

So it should be working even without this correction?

This may be a server configuration. Except it gives me the same problem on my localhost test server as on the main forum. Don't you have a test/development installation?

I have checked the installation many times, but I will install it from the original distribution again.
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Hmm, good point.

I used to have this installed about 2 or 3 years ago, I don't remember having any problems.

Could you post quiz_cp.php in this forum (within

Code: Select all

 tags though)

Thanks
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
Post Reply