npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@openhpi/quiz-recap

v1.4.2

Published

Component for quiz recapitulation in education.

Downloads

2,889

Readme

Quiz recap

Educational app for quiz recapitulation.

Screenshot showing the component

Features

Choose between set of questions

Prior to starting a quiz, choose the desired number of questions.

Screenshot showing the component

Multiple choice and multiple answers questions

The question type can be multiple-choice or single-choice.

Instant feedback

After submission, receive immediate feedback with a clear indication of whether your answer was correct.

Screenshot showing the component

Spaced repetition learning technique

A wrong answer will put the question back into the pool up to 3 times, to reinforce memory retention.

Results page

A concise summary of your quiz performance on the results page upon completion.

Screenshot showing the component

Development setup

  1. Clone the repo
  2. npm install
  3. npm run dev

There are also tests that can be run with npm run test. Consider running them in watch mode during development npm run test:watch.

How to use as a Library

Install the package:

npm i @openhpi/quiz-recap

Initialize the component:

  import renderQuizRecap from `@openhpi/quiz-recap`;

  const id = 'quiz-recap';
  const data = [ ... ];
  const lang = 'en';

  renderQuizRecap(id, data, lang);

Data Specification

Refer to src/types.ts for a detailed specification of the expected data format by the application. Markdown is supported for questions and answers.

Options Configuration

Ensure the inclusion of the following options:

  • id of DOM element where the component will attach itself
  • data for specification see Data type in src/types.ts
  • locale (optional) key for desired localization. Supports English ('en') and German ('de'). Will fall-back to English for any non-supported language.

Theming

The App comes with a standard color scheme.

However, you can customize the app's theme to align with corporate design preferences. There are four key colors:

  • primary for action buttons such as submitting an answer
  • neutral for backgrounds
  • success for indicating correct answers and starting a new quiz
  • danger for destructive actions and indicating a wrong answer

Below, you can find an example. It outlines the various shades that need to be defined for each color.

.quiz-recap {
  --qr-color-primary: #3b82f6;
  --qr-color-primary-dark: #2563eb;

  --qr-color-neutral: #737373;
  --qr-color-neutral-light: #f5f5f5;
  --qr-color-neutral-dark: #525252;

  --qr-color-success: #22c55e;
  --qr-color-success-light: #86efac;
  --qr-color-success-dark: #16a34a;

  --qr-color-danger: #ef4444;
  --qr-color-danger-light: #fca5a5;
  --qr-color-danger-dark: #dc2626;
}

Contribute

If you want to contribute, you can look for the Good First Issue label.

Bugs

If you discover some unexpected behavior please file an issue for bugs. Please make sure to read the existing issues first to avoid duplicates.

Feature Requests

Please submit an issue to suggest new features. To help maintainers to determine what to prioritize, you can vote on feature requests by giving them a thumbs up.