Code for Changing Confidence Points on bye weeks

Post here to discuss topics relate to the 4.x version for the ASP Football Pool software program. All support topics should go here.
Post Reply
twiggm
Posts: 10
Joined: Tue Aug 26, 2014 5:16 pm

Code for Changing Confidence Points on bye weeks

Post by twiggm »

Can anybody figure out the code to change the confidence points on bye weeks from 13-1 to 16-4. This would allow players later in the year who are many points behind the opportunity to catch up. On a bye week that only has 13 games, there are 39 unused points each week (16-14, which adds up to 45 minus the 1-3 which adds up to 6 for 45-6, which is 39). I have players the last couple of years wanted me to look into this change but I haven't had time. I have a few days before the start of this season, any help out there? Since all bye weeks don't always add up to 13 games, the code would have to determine the number of games each week and somehow reverse the confidence points if less than 16 games.
User avatar
philwojo
Posts: 143
Joined: Mon Aug 26, 2013 4:22 pm

Re: Code for Changing Confidence Points on bye weeks

Post by philwojo »

I am not a good enough coder to figure this one out. You could try and PM "mlhall" the creator of the program to see if he can point you in the right direction, he would know the code the best.

Phil
twiggm
Posts: 10
Joined: Tue Aug 26, 2014 5:16 pm

Re: Code for Changing Confidence Points on bye weeks

Post by twiggm »

I did and he did reply via email. Stated it would take a lot of code changes he would think about making changes and suggested I post it here to see if anyone had already done it or were willing to try.
Thanks
User avatar
philwojo
Posts: 143
Joined: Mon Aug 26, 2013 4:22 pm

Re: Code for Changing Confidence Points on bye weeks

Post by philwojo »

Glad you heard from him, hopefully someone can help out!!

Phil
cjbiggs
Posts: 4
Joined: Sat Sep 13, 2014 11:13 pm

Re: Code for Changing Confidence Points on bye weeks

Post by cjbiggs »

I had done it for my pool years ago. I don't think I still have the code, but it was pretty easy to do.

Charlie J.
twiggm
Posts: 10
Joined: Tue Aug 26, 2014 5:16 pm

Re: Code for Changing Confidence Points on bye weeks

Post by twiggm »

It's been almost a year since my original post, has anybody configured their pool to use the higher confidence points?
twiggm
Posts: 10
Joined: Tue Aug 26, 2014 5:16 pm

Re: Code for Changing Confidence Points on bye weeks

Post by twiggm »

I've spent the last few hours playing with the code. I believe I know how to do the calculation, the issues I'm having is where to make the change(s). I've messed with confPtsStatus.js and weeklyEntry.asp. Change things on weeklyentry and the confidence points never change. Make changes to the .js and the confidence points never change. Not sure why the same calculations are in both but they are obviously not the correct places.

Code should look something like this (I think).

var ByeWeekNumGames = 0
If numGames < 16 then
ByeWeeknumGames = 16 - numGames
End if
<% if USE_CONFIDENCE_POINTS then %>
// Get the confidence point fields for each game.
for (var i = ByeWeeknumGames; i <= numGames; i++) {
el = formEl.elements["conf-" + i];
if (el == null)
el = formEl.elements["lockedConf-" + i];
confFields.push(el);
}
<% end if


Anybody that can assist an old programmer that doesn't program anymore...
Post Reply