Allow for taking practice exam with X questions
FidelusAleksander opened this issue · 17 comments
Please describe the feature you feel like this repository should have.
Additional context
Would be nice to be able to take smaller portions of questions as practice exams
When I've practiced for Azure tests with MeasureUp. I made it a habit to start with day with about 15 minutes of tests. I also did that with dead time, like if you had 15-30 minutes between meetings.
The benefit is that it is super easy to get it done, instead of having to dedicate more than an hour to it.
Thanks for sharing, I'm sure there are other people that study in a similar way so I'd like the site to support that
I will have to figure out a nice way to incorporate this. I've never really dealt too much with frontend and UI/UX design so I'll have to think on it a bit
I looked at the repo to see if I'd could help out with a PR, but at a quick glance I could figure out where the actual logic was.
Does it just iterate over all markdown files in a folder today?
I should probably include something about that in contributing guide, it's just that i've put most of my focus on the actual content (writing questions). Here are the files that you are asking for
- Exam choice page (where you choose 1 of the 4 exams)
- Once you choose one of the exams, e.g Actions then it's this page
- Which uses this shortcode where the logic of iterating over all markdown files with individual questions is
In short, all logic about how to display content is in layouts
directory and it's sub-directories
All content is in content
directory and it's sub-directories.
Hi @tfsjohan
Are you still planning to look at this?
I'm scheduled for taking Github Advanced Security next week so won't look into new features until after that probably
Not sure. Suddenly felt a lot harder when it wasn't something I was familiar with already like JavaScript for the logic.
Please have a look and see if it's good enough.
I reviewed it and I might use a part of it but for the most part I will try to do it less "javascripty" and more inn Hugo way.
Worked on this in #161
Sadly this is not something as easily done in Hugo as I hoped (see https://discourse.gohugo.io/t/is-there-a-way-to-use-select-input-value-in-a-template/34718 )
I will leave it like that right now. Credits to @tfsjohan for the code snippet, didn't want to use the UI "Advanced Settings" part from your PR though.
If someone more experianced than me in CSS want's to modify the "Start exam" card so the UI option is there and not in a separate block then I'm all for it.
Myself I'm going to leave it like this atm, preparing for GHAS
How about using a html form with method GET and action is the permalink of the test. Then either a slider or a select to select number of questions with a name attribute that matches the query string parameter used in the quiz (questions)?
The slider could default to the number of questions on the actual exam, but go from 1 to number of test questions, with a step of 5 or some other integer to force integers only.
The start button needs to change from a link to a submit button.
With this kind of solution you can avoid having JavaScript in the Hugo files.
@tfsjohan That sounds great
It won't be possible to show the numeric value of the slider without using JavaScript or a datalist. A datalist could possible solve that, but you would need to make a clever loop of possible values.
But it would be easy with a tiny bit of JS, something like:
<span id="questionsValue">{{ examQuestionCount }}</span>
<input type="range" min="1" max="{{ testQuestionsCount }}" value="{{ examQuestionCount }}" step="1"
onchange="document.getElementById('questionsValue').textContent = this.value;"
/>
Just using a <input type="number" />
maybe is the easiest option and possible better UX as well?
Just using a
<input type="number" />
maybe is the easiest option and possible better UX as well?
If we put the default amount to the maximum number of questions possible then it's okay UX because it can only be lowered.
But if we put default to 75 (the same as exam) then users will have no idea what is the maximum amount they can put in. A slider would cap on that value.
As long as it fits nicely in the UI i'm fine with either tbh. Little js is okay - probably my bad for choosing HuGo for this site
If we put the default amount to the maximum number of questions possible then it's okay UX because it can only be lowered. But if we put default to 75 (the same as exam) then users will have no idea what is the maximum amount they can put in. A slider would cap on that value.
True. In some ways I like the idea that the default is the same as the actual exam. Especially if QuizDown also couple support showing a timer.
Are you planning on fixes this, or would you like me to give it a go?
probably my bad for choosing HuGo for this site
Maybe. But it is nice to have markdown as a simple form av CMS. But that could have been used by Next JS and the Markdown renderer as well. And Next JS can export a static site.
Maybe. But it is nice to have markdown as a simple form av CMS. But that could have been used by Next JS and the Markdown renderer as well. And Next JS can export a static site.
I am a rookie with JS/HTML/CSS, always worked on backend/devops and never frontend. Hugo was my choice because i hoped to not have to work with these 😄
Are you planning on fixes this, or would you like me to give it a go?
In the light of the above, I'd much rather spend time on adding additional practice questions instead of trying to make the CSS work 🥲
You go ahead @tfsjohan and give it a shot!