The Curriculum Review Tool is an interactive tool that allows a teacher to assess the merits of a financial education curriculum. It is an alternative to the existing paper-based tool. The assessment is made across four dimensions: content, quality, utility, and efficacy. After responding to questions in each of those dimensions, users can print or save a PDF of the assessment results.
The content dimension has three different views based on the grade range (elementary, middle, or high school) selected when beginning a review. The other dimensions are the same for each grade range.
localStorage
is used to save a user's progress across multiple sessions.The CR Tool will only work fully in the context of consumerfinance.gov.
./setup.sh
to install front-end dependencies and do an initial build.If this page doesn't come up, you may need to set the TDP_CRTOOL
flag to True
in the Flags section of your local Wagtail admin.
Run npm test
to have Jest run the JavaScript unit test suite, which is found in the src/__tests__
folder.
To reconstruct snapshot data for the tests, run npm test -- -u
. This will be needed if the content ever changes and the snapshot test fails for that reason. You will also need this while writing new tests for any new pages.
The application ultimately serves two Jinja templates at particular URLs:
This template is served by the before-you-begin
URL. It contains a small form for setting options for a review in localStorage before starting it.
This template serves the React application for the review interface itself at the tool
URL. It is nothing more than an empty <div id="react">
that serves at the hook for the React app initialization.
This templates extends the crt-base.html
template, which extends the layout-full
template from consumerfinance.gov, overrides a few things to enforce focusing on the tool, adds in the tool-specific CSS and JS.
CustomerReviewToolComponent.js
is the main entry point for the tool.
"Content" refers to any text that is unique to a given dimension that shows up after you click a dimension button.
content_data
folder (e.g., utilityContent.js
) and loops through the objects, passing the content down to the React components to display on the page.
…CriterionPage.js
and …PrintPage.js
files do not pull the content from the main content_data
folder, because they were developed before that folder was created. The …PrintPage.js
files are a step closer to pulling data from the content_data
folder in that they already reuse other React components. (This makes more sense when you look at the actual file.) The …CriterionPage.js
files are rather large and have all the content and HTML located in the same file.The easiest way to change content is to search in your editor or filesystem for the text you want to change, change it in all locations it shows up, and submit a PR.
The functionality of this tool is not affected by the content changing.
Both Criterion & Print pages have content in TWO different locations: the content_data
folder and in their respective locations below.
src/js/components/pages/**/*CriterionPage.js
):
src/js/components/pages/**/*PrintPage.js
):
If you have questions, concerns, bug reports, etc., please file an issue in this repository's issue tracker.