Difference between revisions of "Template:Topic"
Jump to navigation
Jump to search
m |
|||
Line 50: | Line 50: | ||
-->{{SetTopicHasAcceptedAnswer|topic={{FULLPAGENAME}}|}}<!-- | -->{{SetTopicHasAcceptedAnswer|topic={{FULLPAGENAME}}|}}<!-- | ||
--><!-- | --><!-- | ||
+ | --><!-- Calculate completion rates for each major property | ||
+ | --><!-- | ||
+ | -->{{#vardefine: varCRDes|{{SetTextPropertyCompletionRate|propertyname=Description|propertyvalue={{{Description|}}}|requiredwordcount=100|returnvalue=true}}|}}<!-- | ||
+ | -->{{#vardefine: varCRPre|{{SetTextPropertyCompletionRate|propertyname=Prehistory|propertyvalue={{{Prehistory|}}}|requiredwordcount=200|returnvalue=true}}|}}<!-- | ||
+ | -->{{#vardefine: varCRHst|{{SetTextPropertyCompletionRate|propertyname=History|propertyvalue={{{History|}}}|requiredwordcount=50|returnvalue=true}}|}}<!-- | ||
+ | -->{{#vardefine: varCRRel|{{SetTextPropertyCompletionRate|propertyname=Related Topics|propertyvalue={{{Related Topics|}}}|requiredwordcount=1|returnvalue=true}}|}}<!-- one related topic is sufficient | ||
+ | --><!-- | ||
+ | --><!-- Now calculate the overall completion rate. 40 35 10 5 | ||
+ | --><!-- | ||
+ | -->{{#ifeq: {{{Page Status|}}}|Editor Approved<!-- | ||
+ | -->|<!-- editor approved: completion rate is always 100% | ||
+ | -->{{#vardefine: varCRtotal|100}}<!-- | ||
+ | --><!-- | ||
+ | -->|<!-- not approved: calculate completion rate (90% max) | ||
+ | -->{{#vardefine: varCRtotal| {{#expr: ((40/100 * {{#var:varCRDes}}) + (35/100 * {{#var:varCRPre}}) + (10/100 * {{#var:varCRHst}}) + (5/100 * {{#var:varCRRel}}) ) round 0}} }}<!-- | ||
+ | --><!-- | ||
+ | -->}}<!-- if page status | ||
+ | --><!-- store the value | ||
+ | -->{{#set: CR_Total={{#var:varCRtotal}} }}<!-- | ||
+ | --><!-- | ||
--> | --> | ||
{{{Question|}}}<!-- | {{{Question|}}}<!-- |
Revision as of 15:49, 15 June 2017
This is the template for all types of Topics - Definitional, Descriptive, or Normative. This template is to be used for all topics/questions the answers to which are definitions, descriptions, or prescriptions (it is used by Form:Topic).
It should be called in the following format:
{{Topic |Topic Type= |Question= |Parent Topic= |Description= |Authors List= |Formulated Year= |Academic Events= |Prehistory= |History= |Current View= |Related Topics= }}
Edit the page to see the template text.