Content deleted Content added
No edit summary |
m Izno moved page Module:WikiProject Higher education task force test2 to Module:Higher education task force/sandbox without leaving a redirect: somewhat of a bold close of Wikipedia:Templates for discussion/Log/2025 August 17#Module:WikiProject Higher education task force test2 |
||
(14 intermediate revisions by one other user not shown) | |||
Line 335:
if article or args.QUALITY_CRITERIA=='custom' then -- no fallbacks for articles or projects with custom quality scales
return class
else -- check fallbacks for non-article classes
local new_class = class
local category_exists = function(class)
local cat = mw.title.new(cfg.quality.assessment_category:format(class, category .. ' ' .. (article and 'articles' or 'pages')))
return cat.exists and #cat:getContent()>0
end
if class=='FM' and not category_exists('FM') then
new_class = 'File' -- fall back to File-class if FM category does not exist
end
if not category_exists(new_class) then
new_class = 'NA' -- use NA for non-article pages if category does not exist
end
return new_class
end
end
local check_defallbacks = function(class, category)
if article or args.QUALITY_CRITERIA=='custom' then -- no fallbacks for articles or projects with custom quality scales
return class .. category
else -- check fallbacks for non-article classes
local new_class = class
Line 388 ⟶ 406:
end
class = check_fallbacks(class, assessment_cat)
mclass=class
local show = false -- hide quality class in project banner by default
if article_class then -- banner shell exists
if class=='' then -- local class is blank
class = check_fallbacks(article_class, assessment_cat)
check_redundant()
elseif class==article_class then -- local class matches article class
Line 415 ⟶ 434:
show = true
end
local category = (class=='' and 'Unassessed' or
if show then -- quality rating shown in banner
local rating
Line 913 ⟶ 932:
local raw_args = args_module.getArgs(frame, {frameOnly = true, removeBlanks = false})
local i=initialise(args, raw_args)
-- local a=p.printargs(frame)
return i
end
|