GithubHelp home page GithubHelp logo

marcnewport / adapt-assessmentcertificate Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 265 KB

Generates a certificate as a png file (data uri) when an assessment is passed. Extending the functionality of the adapt-contrib-AssessmentResults component.

License: GNU General Public License v3.0

JavaScript 78.39% CSS 5.22% HTML 16.38%

adapt-assessmentcertificate's Introduction

adapt-assessmentCertificate

Generates a certificate as a png file (data uri) when an assessment is passed. Extending the functionality of the adapt-contrib-AssessmentResults component.

demo

Installation

With Adapt CLI installed, run adapt install assessmentCertificate

Alternatively, download the ZIP and extract into the src > extensions directory.

Usage

Extend the adapt-contrib-AssessmentResults component by adding a _certificate proprty with the following attributes (see exaple.json for further infromation).

_buttons

Attribute Type Description
start string The label for the button on the assessment results component
yes string The label for the continue button on the modal box
no string The label for the cancel button on the modal box

_prompt

Attribute Type Description
title string The title of the modal prompt
body string The body text of the modal prompt
instruction string The instruction text of the modal prompt (serves as for the user name input field)
placeholder string The placeholder text for the user name input field
blocked string The text alerted to the user if their popup blocker is enabled

_display

Attribute Type Description
_graphic.src string The path to the certificate graphic
_graphic.width int The width of the certificate graphic
_graphic.height int The height of the certificate graphic
_userName.x int/string The x position in pixels for the placement of the user name (use "center" to centre the text relative to the certificate with)
_userName.y int The y position in pixels for the placement of the user name
_userName.font string The style of font to use eg. "48px Arial"
_courseName.x int/string The x position in pixels for the placement of the user name (use "center" to centre the text relative to the certificate with)
_courseName.y int The y position in pixels for the placement of the user name
_courseName.font string The style of font to use eg. "48px Arial"
_courseDate.x int/string The x position in pixels for the placement of the user name (use "center" to centre the text relative to the certificate with)
_courseDate.y int The y position in pixels for the placement of the user name
_courseDate.font string The style of font to use eg. "48px Arial"

Limitations

Cross-platform coverage: Chrome, Firefox, Edge, IE11, IE10, Safari for iOS, Chrome for Android

Credits

Sample certificate image designed by Freepik

adapt-assessmentcertificate's People

Contributors

marcnewport avatar

Stargazers

Roman avatar Ludovic Bas avatar

Watchers

James Cloos avatar  avatar Yaniv Yalda avatar

Forkers

samumist

adapt-assessmentcertificate's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.