Module:Class mask: Difference between revisions

Content deleted Content added
new logic for b-class checklist parameters, mask will not autodemote or promote unless the whole checklist is completed
fix logic in b-class checklist
Line 76:
local isExtended = args.b1 or args.b2 or args.b3 or args.b4 or args.b5 or args.b6
if isExtended then
local all_completesome_fail, all_pass = truefalse, true
for i = 1, 6 do
local b_param = args['b'..i] and mask[string.lower(args['b'..i])]
if b_param and b_param~='y' and b_param~='x' then -- criterion in use and is not passed or marked not applicable
all_pass = false
if b_param~=='n' then
all_completesome_fail =false true
end
end
end
ret = all_pass and 'B' -- return B if all criteria are marked passed
or all_completesome_fail and 'C' -- or return C if wholeany checklistof isthe completedcriteria butare notmarked all passedfailed
or grade:upper() -- otherwise defer to entered grade
elseif args[grade]~='no' then