diff --git a/archetypes/test.md b/archetypes/test.md index c306183..8ae8e3a 100644 --- a/archetypes/test.md +++ b/archetypes/test.md @@ -2,11 +2,64 @@ title: 'test' pass_percentage: 70 # Minimum percentage required to pass the test time_limit: 15 # Duration of the test in minutes +max_attempts: 3 # Maximum number of attempts allowed for the test difficulty: "beginner" # Difficulty level of the test category: "Programming Languages" # Category of the test tags: ["golang", "basics", "syntax", "fundamentals"] # Tags for the test, useful for search and categorization type: "test" # Type of the content, in this case, a test ( required for the test to be recognized by the system ) + +# Table of content covered in the test +# Each domain can have a weightage (percentage) and subdomains (items) +# Weightage should sum up to 100 across all domains ( not strictly enforced, but recommended ) +competencies: + - title: "Domain 1" + percentage: 10 # Weightage of this domain in the test + items: + - "Subdomain 1" + - "Subdomain 2" + + - title: "Domain 2" + percentage: 30 + items: + - "Subdomain 1" + - "Subdomain 2" + + - title: "Domain 3" + percentage: 60 + items: + - "Subdomain 1" + - "Subdomain 2" + + + +# List of resource that are recommended to complete before taking the test +# Not strictly enforced, but recommended +prerequisite_knowledge: + - title: "Learning Path: Cloud Computing Basics" + link: "https://academy-domain.com/learning-paths/cloud-computing-basics" + - title: "Basic Certification: Networking Basics" + link: "https://academy-domain.com/certifications/networking-basics" + - title: "Basic knowledge of Linux command line" + link: "https://linuxcommand.org/" + +# List of additional resources for further reading +related_resources: + - title: "Documentation" + link: "https://docs.example.com/" + - title: "Instructions" + link: "https://instructions.example.com/" + - title: "YouTube Channel" + link: "https://www.youtube.com/c/example" + +# Additional attributes about the test will be displayed in the test details page +additional_attributes: + - title: "Retake Policy" + description: "One Retake allowed after 30 days" + - title: "Labs" + description: "Hands-on labs included" + + questions: # Multiple Choice Question (Single Answer) - id: "q1" diff --git a/layouts/partials/test/single.html b/layouts/partials/test/single.html index dab3dee..4d6119f 100644 --- a/layouts/partials/test/single.html +++ b/layouts/partials/test/single.html @@ -31,8 +31,9 @@ "lastmod" (.Lastmod | time.Format "2006-01-02") "draft" .Draft "file_path" .File.Path + "max_attempts" (or $p.max_attempts 0) "pass_percentage" (or $p.pass_percentage 70) - "time_limit" (or $p.time_limit "infinite") + "time_limit" (or $p.time_limit 0 | string) "questions" $p.questions "total_questions" (len $p.questions) "prerequisites" $prerequisites diff --git a/layouts/test/single.html b/layouts/test/single.html index b1ee66f..94edbcc 100644 --- a/layouts/test/single.html +++ b/layouts/test/single.html @@ -1,4 +1,11 @@ {{ define "main" }} +{{ $title := .Title }} +{{ $build := .Site.Params.build | default "development" }} + + + +{{ if eq $build "development" }} + -{{ $title := .Title }} +
@@ -330,80 +254,8 @@

{{ $title }}

- -
-
-
-

Test details

- -
-
-
QUESTIONS
-
{{ len .Params.questions }}
-
-
-
ATTEMPTS
-
- 0 - of {{ if eq .Params.max_attempts nil }}unlimited{{ else }}{{ - .Params.max_attempts }}{{ end }} -
-
-
-
PASS PERCENTAGE
-
{{ or .Params.pass_percentage 70 }}%
-
-
- - -
- -

- Complete the following prerequisites to take this test: -

- -
- -
- -
- - -
- -
- -
- - - - - - - - -
-
-
-
- -
@@ -445,372 +297,50 @@

Test details

{{ end }} -
-
-

Submitting your answers...

-
- -
+{{ end }} + {{ $test := partial "test/single.html" . }} -{{ $prerequisites := $test.prerequisites | default (slice) }} -{{ $build := .Site.Params.build | default "development" }} +{{ $tesAbsPath := .RelPermalink }} {{ end }}