Code for Changing Confidence Points on bye weeks
Code for Changing Confidence Points on bye weeks
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.
Re: Code for Changing Confidence Points on bye weeks
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
Phil
Re: Code for Changing Confidence Points on bye weeks
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
Thanks
Re: Code for Changing Confidence Points on bye weeks
Glad you heard from him, hopefully someone can help out!!
Phil
Phil
Re: Code for Changing Confidence Points on bye weeks
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.
Charlie J.
Re: Code for Changing Confidence Points on bye weeks
It's been almost a year since my original post, has anybody configured their pool to use the higher confidence points?
Re: Code for Changing Confidence Points on bye weeks
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...
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...