SOLVED:Points for picking league champion i tipping game

This is the General Board for JoomLeague Questions!
varfjell
.
Posts: 37
Joined: Sun Mar 25, 2007 3:12 pm
Location: Norway
Contact:

SOLVED:Points for picking league champion i tipping game

Postby varfjell » Mon Oct 20, 2008 11:38 pm

I have a predictions game (tippspiel) where the users are given 5 bonus points for picking correct leaguee champion. The season is now over but the points for picking the right champion does not appear. What could be wrong? Maybe this has been discussed and solved already, but I couldn’t find any topic about this (in the English forum that is).
Last edited by timoline on Mon Mar 15, 2010 9:40 pm, edited 1 time in total.

red one
Newbie
Posts: 19
Joined: Sat Feb 02, 2008 7:07 pm

Re: Points for picking league champion i tipping game

Postby red one » Tue Mar 03, 2009 3:12 am

I brought this topic back up because I have encountered an issue with the option of 'pick the champion'.

One of my prediction games has come to an end, and the participating users who correctly picked the champion have not received the allotted points. I am unable to find any option within the admin end for me to select the champion, or to indicate that the particular prediction game has ended.

Any offers of assistance with this please?

I'm using, Joomla 1.015, joomleague 0.93b php5 and mysql 5.0.67

Thanks.
Joomleague 0.93b. Joomla 1.015.

Becks
.
Posts: 87
Joined: Wed May 07, 2008 5:33 pm
Contact:

Re: Points for picking league champion i tipping game

Postby Becks » Sun May 24, 2009 7:36 pm

varfjell wrote:I have a predictions game (tippspiel) where the users are given 5 bonus points for picking correct leaguee champion. The season is now over but the points for picking the right champion does not appear. What could be wrong? Maybe this has been discussed and solved already, but I couldn’t find any topic about this (in the English forum that is).


Its not working for me too.

What is need to do to users get their points for correct tip ?
Joomla 2.5.11
JoomLeague - v2.0.84.f90c771
http://www.premierleaguebg.com

Becks
.
Posts: 87
Joined: Wed May 07, 2008 5:33 pm
Contact:

Re: Points for picking league champion i tipping game

Postby Becks » Mon May 25, 2009 9:29 am

Is this function work ?
Last edited by Becks on Mon May 25, 2009 9:48 am, edited 1 time in total.
Joomla 2.5.11
JoomLeague - v2.0.84.f90c771
http://www.premierleaguebg.com

red one
Newbie
Posts: 19
Joined: Sat Feb 02, 2008 7:07 pm

Re: Points for picking league champion i tipping game

Postby red one » Tue May 26, 2009 1:44 pm

Back again!

I'm a little surprised that this reported issue has not been looked at by any of the dev team. Whilst I realise that they may be all busy with other projects and the dev of Joomleague into 1.5 native etc. It wouldn't do any harm to have a least a reply to a problem that has been posted on here on the forum.  I actually thought that raising my issue when I did earlier in the year, it may of received some attention before the end of the current football season at least.  Hence, my patience in waiting for a response from when I first posted.

Now, I have many, many registered users wanting to do nasty things to me because they have correctly predicted who the Champion would be for at least 2 competitions, with a third to be concluded tomorrow, and yet they have not been awarded the points accordingly. Whilst this may appear to be trivia to some, it leaves me in danger of losing register users to continue using my prediction league for next season, as well as being left open to all sorts of accusations because the final positions of the users are not what they ought to be.

I have spent the last few days going through my database (the tables are there as per the joomleague xml set up file).  I have also attempted to locate any coding in files that maybe causing the error for the "pick the champion" not to function with the awarded points, but I am unable to find anything that will enable me to resolve this. 

Therefore, please could someone from Joomleague offer some advice on this matter, as to how "pick the champion" is supposed to function in order to award the designated points, it would be greatly appreciated.

Thanks.
Joomleague 0.93b. Joomla 1.015.

Tony
.
Posts: 296
Joined: Sun Apr 29, 2007 2:31 pm

Re: Points for picking league champion i tipping game

Postby Tony » Tue May 26, 2009 7:40 pm

Therefore, please could someone from Joomleague offer some advice on this matter


Calm down, please! Here is someone.  :oops:

Would you be so kind and replace your .../administrator/components/com_joomleague/classes/TipRanking.class.php with attached. A query to ascertain the champion tip has been modified slightly.

Hope this could solve your problem so seriously. Nevertheless, I cannot guarantee anything.

Be aware that we are all volunteers, always highly motivated to give answers and support to the JoomLeague community. And - not to forget - won't cost you a dime.
You do not have the required permissions to view the files attached to this post.
Last edited by Tony on Tue May 26, 2009 8:34 pm, edited 1 time in total.

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: Points for picking league champion i tipping game

Postby timoline » Tue May 26, 2009 8:49 pm

tony fyi
I'm still not sure it works.... but I'll wait for the test of red one

Is it somewhere showed if you have the correct champ? (besides counting points)...a little image or text or something?

Kr,
Last edited by timoline on Tue May 26, 2009 9:07 pm, edited 1 time in total.
Joomla 1.5.x
Joomleague 1.5.....latest git version

red one
Newbie
Posts: 19
Joined: Sat Feb 02, 2008 7:07 pm

Re: Points for picking league champion i tipping game

Postby red one » Tue May 26, 2009 10:56 pm

Tony, thank you for the assistance.

To begin with, I have downloaded the attachment and uploaded to the classes directory as per your comments. 

So far, there are no immediate increments for my register users who have correctly chosen the champion in the two competitions that have come to an end. I am unsure whether uploading the attachment would automatically make the necessary points increase, or if there is a need to run a sql command query in the database, so that the points are adjusted accordingly.

The third competition comes to a close tomorrow evening, and this may give a better indication if the attachment fixes the issue.

That said, I'm still a little puzzled as to how it works. As far as I can see, there is no manual input for such things like total amount of games to be played or a date for when the season is complete, or a field for the admin to complete with the Team Id of who is Champion. Therefore, how and when is the Champion designated and the allocated points awarded to the applicable users?

Thanks.
Joomleague 0.93b. Joomla 1.015.

Tony
.
Posts: 296
Joined: Sun Apr 29, 2007 2:31 pm

Re: Points for picking league champion i tipping game

Postby Tony » Wed May 27, 2009 1:21 am

Strange, sorry.

The most important thing is that you have defined  Prediction Ranking as a Complete season (Half season doesn't work in this case). Further, Pick the champion should be enabled.

The function getTippRanking in TippRanking.Class.php calculates the normal  tipping points for each match. In addition to that, when the season has been finished completely with no more open matches left (!), a final ranking to get the champion team starts. If the number-one-team (the champion) hits the champ tip of a user, the extra points are allocated automatically. This is shown in overall tipp ranking only. The values are included in total points (@timoline: without special hack no image, no text or something like this). That's all.

Last: Project type  Regular league is compulsory. Otherwise the creative counting (compliments to the unknown developer) to pick the champ team fails most probably.
Last edited by Tony on Wed May 27, 2009 2:04 am, edited 1 time in total.

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: Points for picking league champion i tipping game

Postby timoline » Wed May 27, 2009 8:30 am

Hello,

on which line is it calculating: points=totalpoints + champpoints

is it...?

Code: Select all

          if ($champtip==$meister) {
           $tipper_ranking[$userid]->points += $this->project->tip_points_tip_champ;
          }


I think there can be a couple of problems...

-or getting the team is incorrect
-or the champ
-or  team==champ
-or totalpoints=points+champpoints
Last edited by timoline on Wed May 27, 2009 8:50 am, edited 1 time in total.
Joomla 1.5.x
Joomleague 1.5.....latest git version

red one
Newbie
Posts: 19
Joined: Sat Feb 02, 2008 7:07 pm

Re: Points for picking league champion i tipping game

Postby red one » Wed May 27, 2009 11:51 am

I can confirm that I have all the prediction games set as "complete season", + "regular league" and "pick the Champion" is enabled in the Admin side, and users have been able to choose their Champion at the beginning of the season. In addition, the "Results Grid" for each league is showing with no open games. The only change I have made is increasing the points awarded for Champion from 10pts to 30pts. I have checked the Database and in  `jos_joomleague_predictiongame_project`, the "tip_champ" field is showing "1" for the appropriate prediction games.



EDIT: Tony, I can confirm that the "pick the Champion" has worked fine for the prediction league I mentioned which has been completed this evening. I thank you for your help and offering the file attachment on the previous comment.

I'm wondering if it is possible to run a command in the database that will update the competitions that had already completed before I changed the files?
Last edited by red one on Wed May 27, 2009 11:32 pm, edited 1 time in total.
Joomleague 0.93b. Joomla 1.015.

Tony
.
Posts: 296
Joined: Sun Apr 29, 2007 2:31 pm

Re: Points for picking league champion i tipping game

Postby Tony » Thu May 28, 2009 10:17 pm

Was a pleasure to read that everything works fine now. Thank you very much for this feedback.


I'm wondering if it is possible to run a command in the database that will update the competitions that had already completed before I changed the files?

Well, normally it doesn't matter if the competition is still running or not. The calculation is always "on the fly" with no storage in the database. Just give it a new try with the file modified or change it yourself like this:

OLD

Code: Select all

$query = sprintf('SELECT tt.team_id
                              FROM #__joomleague_tip_members AS tu
                         LEFT JOIN #__joomleague_team_joomleague AS tt ON tt.id = tu.champ_tip
                            WHERE (tu.project_id=%s) AND tu.user_id=%s',$this->project->id, $uservar->user_id);


NEW

Code: Select all

$query = sprintf('SELECT champ_tip
                             FROM #__joomleague_tip_members as
                             WHERE (project_id=%s) AND user_id=%s',$this->project->id, $uservar->user_id);


Unfortunately, there are two different id's for each team (teamtool id and team id). The old code compares teamtool id from champ tip with team id from championchip team. That fails in the end.

I once had a problem with an "empty match", see attached. This forgotten and in the frontend not visible "match" blocked counting of the champion tip. I had to delete it finally and the sun rose...
You do not have the required permissions to view the files attached to this post.

red one
Newbie
Posts: 19
Joined: Sat Feb 02, 2008 7:07 pm

Re: Points for picking league champion i tipping game

Postby red one » Fri May 29, 2009 5:15 pm

Good News, it is all fixed for me.

It was as you mentioned Tony, with regard to an outstanding fixture not showing in the frontend (as per image).

I went through each round of predictions and came across a game that had been postponed early on in the season.  I deleted this unpublished fixture, and the points for the Champion have been awarded accordingly.

Once again, many thanks for you patience, understanding and assistance Tony, it is very much appreciated.
Joomleague 0.93b. Joomla 1.015.

Tony
.
Posts: 296
Joined: Sun Apr 29, 2007 2:31 pm

Re: Points for picking league champion i tipping game

Postby Tony » Fri May 29, 2009 9:08 pm

It was my pleasure!  :)

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: Points for picking league champion i tipping game

Postby timoline » Wed Jun 03, 2009 3:05 pm

Yes it works fine now....I also forgot 1 game to enter the results :bash:
:thx:
Joomla 1.5.x
Joomleague 1.5.....latest git version


Return to “JoomLeague Component, Version <= 0.93b”

Who is online

Users browsing this forum: No registered users and 4 guests

cron