Template talk:Proposal check
From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
Add check for quorum[edit]
Good job on this template! But currently, it does not check whether the proposal has quorum or not. For example, {{proposal check|3|0|3}}
returns "CONSENSUS REACHED" which is misleading because the leading option has less than 4 votes and thus has no quorum. It would be nice to add a condition like "if {{{1}}} < 4, then display NO QUORUM". Jdtendo(T|C) 02:09, August 31, 2024 (EDT)
I coded it. I also added a check for proposals ending in a tie.
<blockquote>{{#ifexpr:{{{1}}} < 4|The first place option must have at least 4 votes, but it has only '''{{{1}}}''' vote{{#ifexpr:{{{1}}}-{{{2}}}>1|s}}. '''{{color|red|NO QUORUM}}'''| {{#ifexpr:{{{1}}} = {{{2}}}|The proposal ends in a tie. '''{{color|red|CONSENSUS NOT REACHED}}'''| With a margin of '''{{#expr:{{{1}}}-{{{2}}}}}''' vote{{#ifexpr:{{{1}}}-{{{2}}}>1|s}}, {{#ifexpr:{{{1}}} - {{{2}}} >= 3| over 50% support is required. '''{{#expr:{{{1}}}/{{{3}}}*100 round 1}}%''' support achieved. '''{{#ifexpr:{{{1}}}/{{{3}}}>0.5|{{color|green|CONSENSUS REACHED}}|{{color|red|CONSENSUS NOT REACHED}}}}''' | at least 60% support is required. '''{{#expr:{{{1}}}/{{{3}}}*100 round 1}}%''' support achieved. '''{{#ifexpr:{{{1}}}/{{{3}}}>=0.6|{{color|green|CONSENSUS REACHED}}|{{color|red|CONSENSUS NOT REACHED}}}}''' }}}}}}</blockquote>