Fandom

Infobox Wikia

Module:Mentoring stat

226pages on
this wiki
Add New Page
Talk0
--<nowiki> Gives stats about mentoring 
local p = {}
 
function p.main(frame)
    -- local args = require("Dev:Arguments").getArgs(frame)
    local completed = pagesincat("Completed_requests","all")
    -- local on_hold = pagesincat("Completed_requests","all")
    local totRequests = pagesincat("Mentoring_requests","all")
    local completionRate = round(completed / totRequests, 2 )
 
    return "'''Progress''': " .. (completionRate * 100).. "% of requests done."
end
 
function pagesincat(cat, prop)
    return mw.site.stats.pagesInCategory (cat, prop)
end
 
function round(num, idp)
    return tonumber(string.format("%." .. (idp or 0) .. "f", num))
end
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.