From 163da32ed65298ec95eb20530e618bb95bc4db06 Mon Sep 17 00:00:00 2001 From: Jack Morgan Date: Fri, 18 May 2018 09:16:51 +1200 Subject: [PATCH 1/9] =?UTF-8?q?Fix=20typo=20in=20p=C4=ABkau=20docs=20(fixe?= =?UTF-8?q?s=20#29)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/pikau/documentation.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/pikau/documentation.html b/templates/pikau/documentation.html index cdc7402..9a33819 100644 --- a/templates/pikau/documentation.html +++ b/templates/pikau/documentation.html @@ -47,7 +47,7 @@

Understanding the Pīkau creation pipeline

Pīkau need to be created quickly and collaboratively, and therefore we are using Google Drive to create Pīkau. - Pīkau moves through the following status stages while being created on Google Drive. + Pīkau move through the following status stages while being created on Google Drive. During this time the Pīkau can also be listed on this website, which provides an easy link for authors to the Pīkau Google Drive file.

From f5da246ba9bd6221c61dac6f34a37b62a77ba4c3 Mon Sep 17 00:00:00 2001 From: Jack Morgan Date: Fri, 18 May 2018 09:22:49 +1200 Subject: [PATCH 2/9] =?UTF-8?q?Change=20'P=C4=ABkau'=20to=20'p=C4=ABkau'?= =?UTF-8?q?=20(fixes=20#30)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- .../example-pikau-course/metadata.yaml | 2 +- .../example-pikau-course/reflection.md | 2 +- pikau/management/commands/loadpikau.py | 2 +- templates/faq.html | 22 +++---- templates/index.html | 2 +- templates/pikau/documentation.html | 66 +++++++++---------- templates/pikau/index.html | 6 +- templates/pikau/pikaucourse_detail.html | 4 +- templates/pikau/pikaucourse_list.html | 2 +- templates/pikau/progressoutcome_list.html | 2 +- templates/pikau/readiness_level_list.html | 2 +- templates/pikau/tag_list.html | 2 +- templates/pikau/topic_list.html | 2 +- 14 files changed, 59 insertions(+), 59 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03e4c12..40b0ef7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## 0.2.0 (Pre-release) - Readiness level is now optional. (fixes #24) -- Add tags to connect Pīkau to Self Review Tool (SRT). (fixes #21) +- Add tags to connect pīkau to Self Review Tool (SRT). (fixes #21) - Explain website and pipeline with documentation. (fixes #14) - Add link to Google Doc template. (fixes #13) - Add contact page (further plans to add email form to page). diff --git a/pikau/content/pikau-courses/example-pikau-course/metadata.yaml b/pikau/content/pikau-courses/example-pikau-course/metadata.yaml index 9f08395..53a9973 100644 --- a/pikau/content/pikau-courses/example-pikau-course/metadata.yaml +++ b/pikau/content/pikau-courses/example-pikau-course/metadata.yaml @@ -1,4 +1,4 @@ -name: Example Pīkau course +name: Example pīkau course status: 6 overview: overview.md language: en diff --git a/pikau/content/pikau-courses/example-pikau-course/reflection.md b/pikau/content/pikau-courses/example-pikau-course/reflection.md index fcd0f4d..5197eff 100644 --- a/pikau/content/pikau-courses/example-pikau-course/reflection.md +++ b/pikau/content/pikau-courses/example-pikau-course/reflection.md @@ -1,6 +1,6 @@ # Reflection -Conclude and make any links to related Pīkau. +Conclude and make any links to related pīkau. Each module needs to end with a fully referenced list citing all the resources that you have referred to during your writing. Use the APA 6th edition format for this. diff --git a/pikau/management/commands/loadpikau.py b/pikau/management/commands/loadpikau.py index e30ca2a..cfaafc5 100644 --- a/pikau/management/commands/loadpikau.py +++ b/pikau/management/commands/loadpikau.py @@ -14,7 +14,7 @@ class Command(management.base.BaseCommand): """Required command class for the custom Django loadpikau command.""" - help = "Loads Pīkau into the website" + help = "Loads pīkau into the website" def handle(self, *args, **options): """Automatically called when the loadpikau command is given.""" diff --git a/templates/faq.html b/templates/faq.html index 66e4baa..096e9e7 100644 --- a/templates/faq.html +++ b/templates/faq.html @@ -27,35 +27,35 @@
Why was this website built?
-
How do I understand the different stages of Pīkau development?
+
How do I understand the different stages of pīkau development?

- Have a read of "Understanding the Pīkau creation pipeline". + Have a read of "Understanding the pīkau creation pipeline".

-
Where is a template file for a blank Pīkau?
+
Where is a template file for a blank pīkau?

- The template file is linked for the "Creating a Pīkau on Google Drive" section. + The template file is linked for the "Creating a pīkau on Google Drive" section.

Which tags relate to the outcomes of the Self Review Tool?

- The tags relating to the Self Review Tool (SRT) are listed in the "Planning a Pīkau" section. + The tags relating to the Self Review Tool (SRT) are listed in the "Planning a pīkau" section.

-
Where can I view an flowchart or diagram of all Pīkau and how they are connected?
+
Where can I view an flowchart or diagram of all pīkau and how they are connected?

- This is available on the Pīkau Pathways page. + This is available on the pīkau pathways page.

-
How can I see coverage of Pīkau against progress outcomes?
+
How can I see coverage of pīkau against progress outcomes?

A heatmap of this data is available on the progress outcomes page.

@@ -63,11 +63,11 @@
How can I see coverage of Pīkau against progress outcomes?
- How do I write Pīkau content on Google Drive?
+ How do I write pīkau content on Google Drive?
What formatting styles are available on iQualify?

- Information on formatting (on both Google Drive and iQualify) can be found in the "Writing Pīkau content on Google Drive" section. + Information on formatting (on both Google Drive and iQualify) can be found in the "Writing pīkau content on Google Drive" section.

@@ -75,7 +75,7 @@
Is the content open source?

Yes, for completed content. - When content is completed and ready for release, the raw content is stored within the open source repository for this website on GitHub. The Pīkau content is stored within pikau/content/. + When content is completed and ready for release, the raw content is stored within the open source repository for this website on GitHub. The pīkau content is stored within pikau/content/.

diff --git a/templates/index.html b/templates/index.html index 807c0ec..381de23 100644 --- a/templates/index.html +++ b/templates/index.html @@ -54,7 +54,7 @@

Content Pipeline Assistant

Pīkau

These are bite sized courses preparing teachers to be ready for the new content within the Technology curriculum.

- View Pīkau content + View pīkau content diff --git a/templates/pikau/documentation.html b/templates/pikau/documentation.html index 9a33819..3b427c4 100644 --- a/templates/pikau/documentation.html +++ b/templates/pikau/documentation.html @@ -24,16 +24,16 @@
Table of Contents
@@ -41,14 +41,14 @@
Table of Contents
-

Understanding the Pīkau creation pipeline

+

Understanding the pīkau creation pipeline

- Pīkau need to be created quickly and collaboratively, and therefore we are using Google Drive to create Pīkau. + Pīkau need to be created quickly and collaboratively, and therefore we are using Google Drive to create pīkau. Pīkau move through the following status stages while being created on Google Drive. - During this time the Pīkau can also be listed on this website, which provides an easy link for authors to the Pīkau Google Drive file. + During this time the pīkau can also be listed on this website, which provides an easy link for authors to the pīkau Google Drive file.

@@ -64,8 +64,8 @@

Understanding the Pīkau creation pipeline

- Once a Pīkau is completed, the Google Drive file is locked and the Pīkau is added to iQualify. - The Pīkau is then marked as the completed status. + Once a pīkau is completed, the Google Drive file is locked and the pīkau is added to iQualify. + The pīkau is then marked as the completed status.

@@ -75,12 +75,12 @@

Understanding the Pīkau creation pipeline

- When a Pīkau is completed, the source files are then copied into this website's repository. + When a pīkau is completed, the source files are then copied into this website's repository. This is to allow authors to easily view the content rendered as it would on iQualify on this website, and also makes the content source files publically available (as written in our contract agreement).

- Once a Pīkau is then published to the public, the status is updated to the following: + Once a pīkau is then published to the public, the status is updated to the following:

@@ -91,38 +91,38 @@

Understanding the Pīkau creation pipeline

-

Creating a Pīkau on Google Drive

+

Creating a pīkau on Google Drive

- When creating a Pīkau, follow the following steps: + When creating a pīkau, follow the following steps:

  1. - Create a folder for the Pīkau within the Google Drive folder (link to English Medium folder). + Create a folder for the pīkau within the Google Drive folder (link to English Medium folder).
  2. - Create a copy of the Pīkau tempate document in your newly created Pīkau folder. + Create a copy of the pīkau tempate document in your newly created pīkau folder.
  3. - Follow the steps at the top of the template document, with the guidance of the section below on 'Planning a Pīkau'. - Once you have filled in the first 2 pages of the template (positioning and planning information), you can create a Pīkau on this website and link it to the Google document. - This allows you to track the progress of the Pīkau development easily, and see the connections to other Pīkau. + Follow the steps at the top of the template document, with the guidance of the section below on 'Planning a pīkau'. + Once you have filled in the first 2 pages of the template (positioning and planning information), you can create a pīkau on this website and link it to the Google document. + This allows you to track the progress of the pīkau development easily, and see the connections to other pīkau.
-

Planning a Pīkau

+

Planning a pīkau

When planning a pīkau, the first step is to plan out the high level positioning of the pīkau. - Ask yourself the following questions to help ensure the Pīkau is positioned correctly: + Ask yourself the following questions to help ensure the pīkau is positioned correctly:

  • - Level of readiness this Pīkau contributes to? + Level of readiness this pīkau contributes to?
    • Use the Readiness Levels page to see existing level coverage. @@ -130,7 +130,7 @@

      Planning a Pīkau

  • - What outcome/path from the Self Review Tool (SRT) does this Pīkau relate to? + What outcome/path from the Self Review Tool (SRT) does this pīkau relate to?
    • The following outcomes are stored within this website relating to the Self Review Tool:
      @@ -141,10 +141,10 @@

      Planning a Pīkau

  • - How does this Pīkau move the learner closer to readiness? + How does this pīkau move the learner closer to readiness?
    • - Which readiness level is the Pīkau primarily aimed at?:
      + Which readiness level is the pīkau primarily aimed at?:
      {% for num,level in readiness_levels.items %}
      @@ -163,10 +163,10 @@

      Planning a Pīkau

  • - Links to other Pīkau? + Links to other pīkau?
  • @@ -175,7 +175,7 @@

    Planning a Pīkau

    Adding course metadata

    - After establishing positioning, more details can be planned for the Pīkau on page 2 of the template document. + After establishing positioning, more details can be planned for the pīkau on page 2 of the template document. The following metadata can be optionally tied to each pīkau, however the more data that is attached to each pīkau allows this tool to display the connectionss and coverage effectively.

    @@ -184,7 +184,7 @@

    Adding course metadata

    @@ -214,7 +214,7 @@

    Adding course metadata

    Select zero or more - View list of all Pīkau and also the Pathways diagram, and list all Pīkau that are a prerequisite to this Pīkau. + View list of all pīkau and also the Pathways diagram, and list all pīkau that are a prerequisite to this pīkau. @@ -238,7 +238,7 @@

    Adding course metadata

- The following fields are currently not explicitly required on the template document, but we highly recommend also selecting these fields for your Pīkau and noting them in your template document. + The following fields are currently not explicitly required on the template document, but we highly recommend also selecting these fields for your pīkau and noting them in your template document.

@@ -286,13 +286,13 @@

Adding course metadata

- Once you have filled in the first 2 pages of the template (positioning and planning information), you can create a Pīkau on this website and link it to the Google document. - This allows you to track the progress of the Pīkau development easily, and see the connections to other Pīkau. + Once you have filled in the first 2 pages of the template (positioning and planning information), you can create a pīkau on this website and link it to the Google document. + This allows you to track the progress of the pīkau development easily, and see the connections to other pīkau.

-

Writing Pīkau content on Google Drive

+

Writing pīkau content on Google Drive

When writing content for a pīkau, be sure to take advantage of the formatting options available on iQualify. diff --git a/templates/pikau/index.html b/templates/pikau/index.html index 609363d..70ce9b2 100644 --- a/templates/pikau/index.html +++ b/templates/pikau/index.html @@ -17,14 +17,14 @@ {% url 'pikau:docs' as docs_url %}

{% blocktrans trimmed %} - This page details the content pipeline for used for developing Pīkau content for Kia Takatū ā-Matihiko. - We recommend reading the Pīkau documentation to start. + This page details the content pipeline for used for developing pīkau content for Kia Takatū ā-Matihiko. + We recommend reading the pīkau documentation to start. {% endblocktrans %}

View metadata

diff --git a/templates/pikau/pikaucourse_detail.html b/templates/pikau/pikaucourse_detail.html index a926ab8..7dc97cf 100644 --- a/templates/pikau/pikaucourse_detail.html +++ b/templates/pikau/pikaucourse_detail.html @@ -149,7 +149,7 @@

Metadata

- Prerequisite Pīkau Courses + Prerequisite pīkau Courses
    {% for course in pikau_course.prerequisites.all %} @@ -162,7 +162,7 @@

    Metadata

    - Postrequisite Pīkau Courses + Postrequisite pīkau Courses
      {% for course in pikau_course.postrequisites.all %} diff --git a/templates/pikau/pikaucourse_list.html b/templates/pikau/pikaucourse_list.html index f2ad207..bcc8989 100644 --- a/templates/pikau/pikaucourse_list.html +++ b/templates/pikau/pikaucourse_list.html @@ -13,7 +13,7 @@ {% endblock page_heading %} {% block content %} -

      This page lists all the Pīkau courses available, ordered by milestone and name.

      +

      This page lists all the pīkau courses available, ordered by milestone and name.

      {% for pikau_course in pikau_courses %} diff --git a/templates/pikau/progressoutcome_list.html b/templates/pikau/progressoutcome_list.html index f0fba14..403a4da 100644 --- a/templates/pikau/progressoutcome_list.html +++ b/templates/pikau/progressoutcome_list.html @@ -14,7 +14,7 @@ {% endblock page_heading %} {% block content %} -

      This page lists all the progress outcomes available within Pīkau, ordered by name.

      +

      This page lists all the progress outcomes available within pīkau, ordered by name.

      diff --git a/templates/pikau/readiness_level_list.html b/templates/pikau/readiness_level_list.html index 9019cf2..bfc1820 100644 --- a/templates/pikau/readiness_level_list.html +++ b/templates/pikau/readiness_level_list.html @@ -14,7 +14,7 @@ {% endblock page_heading %} {% block content %} -

      This page lists all the readiness levels available within Pīkau.

      +

      This page lists all the readiness levels available within pīkau.

      diff --git a/templates/pikau/tag_list.html b/templates/pikau/tag_list.html index b6228ed..e7b0e08 100644 --- a/templates/pikau/tag_list.html +++ b/templates/pikau/tag_list.html @@ -13,7 +13,7 @@ {% endblock page_heading %} {% block content %} -

      This page lists all the tags available within Pīkau, ordered by name.

      +

      This page lists all the tags available within pīkau, ordered by name.

      diff --git a/templates/pikau/topic_list.html b/templates/pikau/topic_list.html index ad84c83..0b529e7 100644 --- a/templates/pikau/topic_list.html +++ b/templates/pikau/topic_list.html @@ -13,7 +13,7 @@ {% endblock page_heading %} {% block content %} -

      This page lists all the topics available within Pīkau, ordered by name.

      +

      This page lists all the topics available within pīkau, ordered by name.

      From e4a9ba0befe2f36e82c109b5d699d9eeb533f733 Mon Sep 17 00:00:00 2001 From: Jack Morgan Date: Fri, 18 May 2018 11:48:31 +1200 Subject: [PATCH 3/9] Add basic searching for FAQ page --- static/js/faq.js | 59 ++++++++++++++++ static/js/fuse.min.js | 9 +++ templates/faq.html | 161 +++++++++++++++++++++++------------------- 3 files changed, 158 insertions(+), 71 deletions(-) create mode 100644 static/js/faq.js create mode 100644 static/js/fuse.min.js diff --git a/static/js/faq.js b/static/js/faq.js new file mode 100644 index 0000000..028e868 --- /dev/null +++ b/static/js/faq.js @@ -0,0 +1,59 @@ +var faq = []; +var fuze; +var faq_search_results; +var faq_all; + +$(document).ready(function() { + faq_search_results = $('#faq-search-results'); + faq_all = $('#faq-all'); + + // Load FAQ into array + load_faq(); + // Create fuse search function + fuse = new Fuse(faq, { + shouldSort: true, + threshold: 0.6, + location: 0, + distance: 100, + maxPatternLength: 32, + minMatchCharLength: 1, + keys: [ + 'question', + 'answer' + ] + }); + // // Change on each input + $('#faq-search').on('input', function(event){ + display_results(event.target.value); + }); + // // Call display function on load + display_results(''); +}); + +function load_faq() { + $('#faq-all .faq').each(function() { + var item = {}; + item.question = $('h5', this).text().trim(); + item.answer = $('p', this).text().trim(); + item.html = $(this).html(); + faq.push(item); + }); +} + +function display_results(query) { + // Empty questions + faq_search_results.empty(); + + // If no query, show all QA's, otherwise filter by search + if (query.length == 0) { + faq_search_results.hide(); + faq_all.show(); + + } else { + faq_all.hide(); + faq_search_results.show(); + $.each(fuse.search(query), function(i, item) { + faq_search_results.append($(item.html)); + }); + } +} diff --git a/static/js/fuse.min.js b/static/js/fuse.min.js new file mode 100644 index 0000000..3a81d83 --- /dev/null +++ b/static/js/fuse.min.js @@ -0,0 +1,9 @@ +/*! + * Fuse.js v3.0.4 - Lightweight fuzzy-search (http://fusejs.io) + * + * Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me) + * All Rights Reserved. Apache Software License 2.0 + * + * http://www.apache.org/licenses/LICENSE-2.0 + */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Fuse",[],t):"object"==typeof exports?exports.Fuse=t():e.Fuse=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=8)}([function(e,t,n){"use strict";e.exports=function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;nn)return i(e,this.pattern,r);var o=this.options,a=o.location,c=o.distance,h=o.threshold,l=o.findAllMatches,u=o.minMatchCharLength;return s(e,this.pattern,this.patternAlphabet,{location:a,distance:c,threshold:h,findAllMatches:l,minMatchCharLength:u})}}]),e}();e.exports=c},function(e,t,n){"use strict";var r=n(0),o=function e(t,n,o){if(n){var i=n.indexOf("."),s=n,a=null;-1!==i&&(s=n.slice(0,i),a=n.slice(i+1));var c=t[s];if(null!==c&&void 0!==c)if(a||"string"!=typeof c&&"number"!=typeof c)if(r(c))for(var h=0,l=c.length;h0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=-1,o=-1,i=0,s=e.length;i=t&&n.push([r,o]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}},function(e,t,n){"use strict";e.exports=function(e){for(var t={},n=e.length,r=0;r2&&void 0!==arguments[2]?arguments[2]:/ +/g,r=e.match(new RegExp(t.replace(n,"|"))),o=!!r,i=[];if(o)for(var s=0,a=r.length;s=j;T-=1){var E=T-1,K=n[e.charAt(E)];if(K&&(S[E]=1),I[T]=(I[T+1]<<1|1)&K,0!==F&&(I[T]|=(L[T+1]|L[T])<<1|1|L[T+1]),I[T]&A&&(w=r(t,{errors:F,currentLocation:E,expectedLocation:g,distance:h}))<=y){if(y=w,(k=E)<=g)break;j=Math.max(1,2*g-k)}}if(r(t,{errors:F+1,currentLocation:g,expectedLocation:g,distance:h})>y)break;L=I}return{isMatch:k>=0,score:0===w?.001:w,matchedIndices:o(S,p)}}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(this.options.tokenize)for(var n=e.split(this.options.tokenSeparator),r=0,o=n.length;r0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1],n=this.list,r={},o=[];if("string"==typeof n[0]){for(var i=0,s=n.length;i1)throw new Error("Key weight has to be > 0 and <= 1");v=v.name}else a[v]={weight:1};this._analyze({key:v,value:this.options.getFn(l,v),record:l,index:c},{resultMap:r,results:o,tokenSearchers:e,fullSearcher:t})}return{weights:a,results:o}}},{key:"_analyze",value:function(e,t){var n=e.key,r=e.value,o=e.record,i=e.index,s=t.tokenSearchers,c=void 0===s?[]:s,h=t.fullSearcher,l=void 0===h?[]:h,u=t.resultMap,f=void 0===u?{}:u,v=t.results,d=void 0===v?[]:v;if(void 0!==r&&null!==r){var p=!1,g=-1,m=0;if("string"==typeof r){this._log("\nKey: "+(""===n?"-":n));var y=l.search(r);if(this._log('Full text: "'+r+'", score: '+y.score),this.options.tokenize){for(var k=r.split(this.options.tokenSeparator),x=[],S=0;S-1&&(O=(O+g)/2),this._log("Score average:",O);var P=!this.options.tokenize||!this.options.matchAllTokens||m>=c.length;if(this._log("\nCheck Matches: "+P),(p||y.isMatch)&&P){var j=f[i];j?j.output.push({key:n,score:O,matchedIndices:y.matchedIndices}):(f[i]={item:o,output:[{key:n,score:O,matchedIndices:y.matchedIndices}]},d.push(f[i]))}}else if(a(r))for(var z=0,I=r.length;zjack.morgan@kiatakatu.ac.nz with your question so I can add to this page.

      -
      -
      Why was this website built?
      -

      - This website was built as a supporting tool for authors of the Kia Takatū ā-Matihiko content. - It incorporates features and practices that we have found useful over our many years of developing content, especially on projects with large amounts of content produced on short time frames. -

      +
      +
      + +
      +
      + +
      -
      -
      How do I understand the different stages of pīkau development?
      -

      - Have a read of "Understanding the pīkau creation pipeline". -

      +
      -
      -
      Where is a template file for a blank pīkau?
      -

      - The template file is linked for the "Creating a pīkau on Google Drive" section. -

      -
      +
      +
      +
      Why was this website built?
      +

      + This website was built as a supporting tool for authors of the Kia Takatū ā-Matihiko content. + It incorporates features and practices that we have found useful over our many years of developing content, especially on projects with large amounts of content produced on short time frames. +

      +
      -
      -
      Which tags relate to the outcomes of the Self Review Tool?
      -

      - The tags relating to the Self Review Tool (SRT) are listed in the "Planning a pīkau" section. -

      -
      +
      +
      How do I understand the different stages of pīkau development?
      +

      + Have a read of "Understanding the pīkau creation pipeline". +

      +
      -
      -
      Where can I view an flowchart or diagram of all pīkau and how they are connected?
      -

      - This is available on the pīkau pathways page. -

      -
      +
      +
      Where is a template file for a blank pīkau?
      +

      + The template file is linked for the "Creating a pīkau on Google Drive" section. +

      +
      -
      -
      How can I see coverage of pīkau against progress outcomes?
      -

      - A heatmap of this data is available on the progress outcomes page. -

      -
      +
      +
      Which tags relate to the outcomes of the Self Review Tool?
      +

      + The tags relating to the Self Review Tool (SRT) are listed in the "Planning a pīkau" section. +

      +
      -
      -
      - How do I write pīkau content on Google Drive?
      - What formatting styles are available on iQualify? -
      -

      - Information on formatting (on both Google Drive and iQualify) can be found in the "Writing pīkau content on Google Drive" section. -

      -
      +
      +
      Where can I view an flowchart or diagram of all pīkau and how they are connected?
      +

      + This is available on the pīkau pathways page. +

      +
      -
      -
      Is the content open source?
      -

      - Yes, for completed content. - When content is completed and ready for release, the raw content is stored within the open source repository for this website on GitHub. The pīkau content is stored within pikau/content/. -

      -
      +
      +
      How can I see coverage of pīkau against progress outcomes?
      +

      + A heatmap of this data is available on the progress outcomes page. +

      +
      -
      -
      The website requires a login?
      -

      - At the moment we are restricting access to specific pages to project authors, though raw data for completed content can still be accessed (see question above). - Access to pages may be changed once the project is completed. -

      -
      +
      +
      + How do I write pīkau content on Google Drive?
      + What formatting styles are available on iQualify? +
      +

      + Information on formatting (on both Google Drive and iQualify) can be found in the "Writing pīkau content on Google Drive" section. +

      +
      -
      -
      It would be great if you could add a feature to the website that...
      -

      - Please let me know any ideas or feature requests you have at jack.morgan@kiatakatu.ac.nz. - This website is built to assist you, so I would love to improve it in any way possible. -

      -
      +
      +
      Is the content open source?
      +

      + Yes, for completed content. + When content is completed and ready for release, the raw content is stored within the open source repository for this website on GitHub. The pīkau content is stored within pikau/content/. +

      +
      + +
      +
      The website requires a login?
      +

      + At the moment we are restricting access to specific pages to project authors, though raw data for completed content can still be accessed (see question above). + Access to pages may be changed once the project is completed. +

      +
      -
      -
      I have found a bug on the website!
      -

      - Please send an email to jack.morgan@kiatakatu.ac.nz explaining the bug you found. - If it's an interface issue then please attach a screenshot. -

      +
      +
      It would be great if you could add a feature to the website that...
      +

      + Please let me know any ideas or feature requests you have at jack.morgan@kiatakatu.ac.nz. + This website is built to assist you, so I would love to improve it in any way possible. +

      +
      + +
      +
      I have found a bug on the website!
      +

      + Please send an email to jack.morgan@kiatakatu.ac.nz explaining the bug you found. + If it's an interface issue then please attach a screenshot. +

      +
      {% endblock content %} + +{% block scripts %} + + +{% endblock scripts %} From f95197f37951989be81f836ad8070d709bbe38e9 Mon Sep 17 00:00:00 2001 From: Jack Morgan Date: Fri, 18 May 2018 12:36:27 +1200 Subject: [PATCH 4/9] Add logic for clear search button on FAQ --- static/js/faq.js | 5 +++++ templates/faq.html | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/static/js/faq.js b/static/js/faq.js index 028e868..ea336ee 100644 --- a/static/js/faq.js +++ b/static/js/faq.js @@ -28,6 +28,11 @@ $(document).ready(function() { }); // // Call display function on load display_results(''); + + $('#clear-search').click(function() { + $('#faq-search').val(''); + display_results(''); + }); }); function load_faq() { diff --git a/templates/faq.html b/templates/faq.html index 8848f23..52dce5a 100644 --- a/templates/faq.html +++ b/templates/faq.html @@ -23,7 +23,9 @@
      - +
      From 46c6bc15a5bf5961a05b76d047e2d7efeed9f9e4 Mon Sep 17 00:00:00 2001 From: Jack Morgan Date: Fri, 18 May 2018 13:19:41 +1200 Subject: [PATCH 5/9] Update documentation formatting --- templates/pikau/documentation.html | 122 ++++++++++++++++------------- 1 file changed, 66 insertions(+), 56 deletions(-) diff --git a/templates/pikau/documentation.html b/templates/pikau/documentation.html index 3b427c4..7a50a67 100644 --- a/templates/pikau/documentation.html +++ b/templates/pikau/documentation.html @@ -117,60 +117,70 @@

      Planning a pīkau

      When planning a pīkau, the first step is to plan out the high level positioning of the pīkau. - Ask yourself the following questions to help ensure the pīkau is positioned correctly: + The following questions are asked on page 1 of the template, and the table below lists possible values or areas of this website that can assist you in answering each question.

      -
        -
      • - Level of readiness this pīkau contributes to? - -
      • -
      • - What outcome/path from the Self Review Tool (SRT) does this pīkau relate to? -
          -
        • - The following outcomes are stored within this website relating to the Self Review Tool:
          - {% for tag in srt_tags %} - {% include "pikau/snippets/tag_badge.html" %} - {{ tag.description }}
          - {% endfor %} -
        • -
        -
      • -
      • - How does this pīkau move the learner closer to readiness? -
          -
        • - Which readiness level is the pīkau primarily aimed at?:
          -
          - {% for num,level in readiness_levels.items %} -
          - {% with num|stringformat:"s" as readiness_level %} - {% with "images/flame-stage-"|add:readiness_level|add:".png" as flame_image %} - - {% endwith %} - {% endwith %} - - {{ level.name }} - -
          +
          +
      + + + + + + + + + + + + + + + + + + + + + + + + +
      Question in templateContent Pipeline Assistant
      + Level of readiness this pīkau contributes to? + + Use the Readiness Levels page to see existing level coverage. +
      + What outcome/path from the Self Review Tool (SRT) does this pīkau relate to? + + The following outcomes are stored within this website relating to the Self Review Tool:
      + {% for tag in srt_tags %} + {% include "pikau/snippets/tag_badge.html" %} - {{ tag.description }}
      {% endfor %} - - - - -
    • - Links to other pīkau? - -
    • - +
      + How does this pīkau move the learner closer to readiness? + + Which readiness level is the pīkau primarily aimed at?:
      +
      + {% for num,level in readiness_levels.items %} +
      + {% with num|stringformat:"s" as readiness_level %} + {% with "images/flame-stage-"|add:readiness_level|add:".png" as flame_image %} + + {% endwith %} + {% endwith %} + + {{ level.name }} + +
      + {% endfor %} +
      +
      + Links to other pīkau? + + Use the Pathways diagram page to see pīkau connections. +
      +

      Adding course metadata

      @@ -189,8 +199,8 @@

      Adding course metadata

      - - +
      + @@ -242,8 +252,8 @@

      Adding course metadata

      -
      Template Field Available Options
      - +
      + @@ -324,7 +334,7 @@

      Writing pīkau content on Google Drive

      Field Available Options
      - + From ee52e582201e1c95c4f77233ef1c4747530005f3 Mon Sep 17 00:00:00 2001 From: Jack Morgan Date: Fri, 18 May 2018 16:06:45 +1200 Subject: [PATCH 6/9] Add milestone list and detail views Fixes #9 Created #31 --- pikau/models.py | 10 ++--- pikau/urls.py | 24 ++++++++--- pikau/views.py | 40 +++++++++++++++++++ templates/pikau/index.html | 1 + templates/pikau/milestone_detail.html | 36 +++++++++++++++++ templates/pikau/milestone_list.html | 53 +++++++++++++++++++++++++ templates/pikau/pikaucourse_detail.html | 2 +- templates/pikau/pikaucourse_list.html | 2 +- 8 files changed, 155 insertions(+), 13 deletions(-) create mode 100644 templates/pikau/milestone_detail.html create mode 100644 templates/pikau/milestone_list.html diff --git a/pikau/models.py b/pikau/models.py index 40f7c1a..d53063c 100644 --- a/pikau/models.py +++ b/pikau/models.py @@ -70,6 +70,11 @@ class Meta: ordering = ["date", "name"] + @property + def is_upcoming(self): + """Return true if milestone is in future.""" + return self.date > date.today() + def __str__(self): """Text representation of Milestone object. @@ -242,11 +247,6 @@ class PikauCourse(models.Model): null=True, ) - @property - def is_upcoming_milestone(self): - """Return true if milestone is in future.""" - return self.milestone.date > date.today() - @property def is_overdue_milestone(self): """Return true if not completed and past milestone.""" diff --git a/pikau/urls.py b/pikau/urls.py index d401377..221e23d 100644 --- a/pikau/urls.py +++ b/pikau/urls.py @@ -38,12 +38,6 @@ views.GlossaryList.as_view(), name="glossary" ), - # eg: /pikau/pathways/ - path( - "pathways/", - views.PathwaysView.as_view(), - name="pathways" - ), # eg: /pikau/goals/ path( "goals/", @@ -62,6 +56,24 @@ views.LevelDetail.as_view(), name="level" ), + # eg: /pikau/milestones/ + path( + "milestones/", + views.MilestoneList.as_view(), + name="milestone_list" + ), + # eg: /pikau/milestones/1/ + path( + "milestones//", + views.MilestoneDetail.as_view(), + name="milestone" + ), + # eg: /pikau/pathways/ + path( + "pathways/", + views.PathwaysView.as_view(), + name="pathways" + ), # eg: /pikau/pikau-courses/ path( "pikau-courses/", diff --git a/pikau/views.py b/pikau/views.py index 353b674..372e6af 100644 --- a/pikau/views.py +++ b/pikau/views.py @@ -1,5 +1,6 @@ """Views for the pikau application.""" +from re import sub from django.views import generic from django.db.models import F from django.shortcuts import get_object_or_404 @@ -10,6 +11,7 @@ GlossaryTerm, Goal, Level, + Milestone, PikauCourse, PikauUnit, ProgressOutcome, @@ -82,6 +84,44 @@ class LevelDetail(LoginRequiredMixin, generic.DetailView): model = Level +class MilestoneList(LoginRequiredMixin, generic.ListView): + """View for the level list page.""" + + context_object_name = "milestones" + + def get_queryset(self, **kwargs): + return Milestone.objects.order_by("date") + + def get_context_data(self, **kwargs): + """Provide the context data for the view. + + Returns: + Dictionary of context data. + """ + context = super(MilestoneList, self).get_context_data(**kwargs) + line_broken_status_stages = [] + for status_num, status_name in STATUS_CHOICES: + line_broken_status_stages.append( + (status_num, *sub(" - ", "\n", status_name.strip()).split(": ")) + ) + context["status_stages"] = line_broken_status_stages + for milestone in self.object_list: + milestone.status = {} + for status_num, status_name in STATUS_CHOICES: + milestone.status[status_num] = PikauCourse.objects.filter( + status=status_num, + milestone=milestone + ).count() + return context + + +class MilestoneDetail(LoginRequiredMixin, generic.DetailView): + """View for a level.""" + + context_object_name = "milestone" + model = Milestone + + class PathwaysView(LoginRequiredMixin, generic.TemplateView): """View for the pikau pathway that renders from a template.""" diff --git a/templates/pikau/index.html b/templates/pikau/index.html index 70ce9b2..d724049 100644 --- a/templates/pikau/index.html +++ b/templates/pikau/index.html @@ -32,6 +32,7 @@

      View metadata

      Glossary Goals Levels + Milestones Pathways Progress Outcomes Readiness Levels diff --git a/templates/pikau/milestone_detail.html b/templates/pikau/milestone_detail.html new file mode 100644 index 0000000..e368d6e --- /dev/null +++ b/templates/pikau/milestone_detail.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} + +{% load django_bootstrap_breadcrumbs %} + +{% block breadcrumbs %} + {% breadcrumb "Home" "/" %} + {% breadcrumb "Pīkau" "pikau:index" %} + {% breadcrumb "Milestones" "pikau:milestone_list" %} + {% breadcrumb milestone.name "" %} +{% endblock breadcrumbs %} + +{% block page_heading %} + Milestone: {{ milestone.name }} +{% endblock page_heading %} + +{% block content %} +

      + + {{ milestone.date }} + + + {% if milestone.is_upcoming %} + Due in {{ milestone.date|timeuntil }} + {% else %} + Due {{ milestone.date|timesince }} ago + {% endif %} + +

      + +

      Pikau Courses: {{ milestone.pikau_courses.count }}

      +
      + {% for pikau_course in milestone.pikau_courses.all %} + {% include "pikau/snippets/pikau_course_card.html" %} + {% endfor %} +
      +{% endblock content %} diff --git a/templates/pikau/milestone_list.html b/templates/pikau/milestone_list.html new file mode 100644 index 0000000..d38c12c --- /dev/null +++ b/templates/pikau/milestone_list.html @@ -0,0 +1,53 @@ +{% extends "base.html" %} + +{% load get_item %} +{% load django_bootstrap_breadcrumbs %} + +{% block breadcrumbs %} + {% breadcrumb "Home" "/" %} + {% breadcrumb "Pīkau" "pikau:index" %} + {% breadcrumb "Milestones" "" %} +{% endblock breadcrumbs %} + +{% block page_heading %} + Milestones +{% endblock page_heading %} + +{% block content %} +

      This page lists all the milestones, ordered by date.

      + +
      How it appears on iQualify How to write it on Google Drive
      + + + + {% for stage_num, stage_name, stage_subtitle in status_stages %} + + {% endfor %} + + + + {% for milestone in milestones %} + + + {% for stage_num, stage_name, stage_subtitle in status_stages %} + + {% endfor %} + + {% endfor %} + +
      + {{ stage_name }}
      +

      {{ stage_subtitle|linebreaksbr }}

      +
      +

      + + {{ milestone.name }}
      + + {{ milestone.date }} + +
      +

      +
      + {{ milestone.status|get_item:stage_num }} +
      +{% endblock content %} diff --git a/templates/pikau/pikaucourse_detail.html b/templates/pikau/pikaucourse_detail.html index 7dc97cf..e274997 100644 --- a/templates/pikau/pikaucourse_detail.html +++ b/templates/pikau/pikaucourse_detail.html @@ -46,7 +46,7 @@

      Development Information

      Milestone
      {{ pikau_course.milestone }} - {% if pikau_course.is_upcoming_milestone %} + {% if pikau_course.milestone.is_upcoming %}
      Due in {{ pikau_course.milestone.date|timeuntil }} {% endif %} diff --git a/templates/pikau/pikaucourse_list.html b/templates/pikau/pikaucourse_list.html index bcc8989..89357f4 100644 --- a/templates/pikau/pikaucourse_list.html +++ b/templates/pikau/pikaucourse_list.html @@ -28,7 +28,7 @@

      {{ pikau_course.milestone.date }} - {% if pikau_course.is_upcoming_milestone %} + {% if pikau_course.milestone.is_upcoming %}
      Due in {{ pikau_course.milestone.date|timeuntil }} {% endif %} From 01603ad0a85c43ad9896d2d3594d0b4c70f34660 Mon Sep 17 00:00:00 2001 From: Jack Morgan Date: Fri, 18 May 2018 16:09:19 +1200 Subject: [PATCH 7/9] Increment version number to 0.3.0 --- config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/__init__.py b/config/__init__.py index 2617cad..9535603 100644 --- a/config/__init__.py +++ b/config/__init__.py @@ -1,3 +1,3 @@ """Module for Django system configuration.""" -__version__ = "0.2.0" +__version__ = "0.3.0" From 0cf433a4b253900312bfa65925075898aad604c4 Mon Sep 17 00:00:00 2001 From: Jack Morgan Date: Fri, 18 May 2018 16:16:01 +1200 Subject: [PATCH 8/9] Update CHANGELOG for 0.3.0 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40b0ef7..423a444 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.3.0 (Pre-release) + +- Add milestone list and detail pages, with table showing milestone statuses. (fixes #9) +- Add basic searching for FAQ page. (fixes #26) +- Improve formatting of pīkau documentation. +- Fix typo in pīkau docs. (fixes #29) +- Change 'Pīkau' to 'pīkau'. (fixes #30) + ## 0.2.0 (Pre-release) - Readiness level is now optional. (fixes #24) From 3a0fd7f7533af991fe2e6c25b734139c4b71644d Mon Sep 17 00:00:00 2001 From: Jack Morgan Date: Fri, 18 May 2018 16:17:19 +1200 Subject: [PATCH 9/9] Add missing docstring --- pikau/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pikau/views.py b/pikau/views.py index 372e6af..1145dff 100644 --- a/pikau/views.py +++ b/pikau/views.py @@ -90,6 +90,11 @@ class MilestoneList(LoginRequiredMixin, generic.ListView): context_object_name = "milestones" def get_queryset(self, **kwargs): + """Get queryset of all milestones. + + Returns: + Queryset of ordered Milestone objects. + """ return Milestone.objects.order_by("date") def get_context_data(self, **kwargs):