Giter VIP home page Giter VIP logo

adapt-block-reveal's Introduction

adapt-block-reveal

Block reveal is an extension for the Adapt framework.

This extension enables blocks to be hidden and revealed within an article.

Installation

This extension must be manually installed.

If Block reveal has been uninstalled from the Adapt authoring tool, it may be reinstalled using the Plug-in Manager.

Settings Overview

Block reveal is configured at article level (articles.json).

The attributes listed below are properly formatted as JSON in example.json.

Attributes

The Block reveal attribute group contains values for _isEnabled, _trackCompletion, _blockToHide, and _blockToReveal.

_isEnabled (boolean): Turns on and off the Block reveal extension. Can be set to disable Block reveal when not required.

_trackCompletion (boolean): Defines whether the button is hidden until the block is complete.

_blockToHide (object): This _blockToHide attributes group stores the properties for the open button. It contains values for _classes, _buttonLocation, _number, title, _icon, ariaLabel, and _graphic.

_classes (string): Defines the class name for the button which must be included in the theme.

_buttonLocation (string): Defines where the button will be displayed on the page. Options are top and bottom.

_number (string): Defines the id or the block number that displays first.

title (string): Defines the text for the button on the visible block.

_icon (string): This defines a css class for the icon on the button in the visible block, which must be included in the theme.

ariaLabel (string): This text becomes the open button’s aria label attribute.

_graphic (object): This _graphic attributes group stores the properties for the graphic used as a button. It contains values for src, srcHover, and srcVisited.

src (string): File name (including path) of the image for button's normal state.

srcHover (string): File name (including path) of the image for button's hover state.

srcVisited (string): File name (including path) of the image for button's visited state.

_blockToReveal (object): This _blockToReveal attributes group stores the properties for the close button. It contains values for _classes, _buttonLocation, _number, title, _icon, ariaLabel, and _graphic.

_classes (string): Defines the class name for the button which must be included in the theme.

_buttonLocation (string): Defines where the button will be displayed on the page. Options are top and bottom.

_number (string): Defines the id or the block number that is revealed when the button is selected.

title (string): Defines the text for the back button on the hidden block.

_icon (string): This defines a css class for the icon on the button in the hidden block, which must be included in the theme.

ariaLabel (string): This text becomes the close button’s aria label attribute.

_graphic (object): This _graphic attributes group stores the properties for the graphic used as a button. It contains values for src, srcHover, and srcVisited.

src (string): File name (including path) of the image for button's normal state.

srcHover (string): File name (including path) of the image for button's hover state.

srcVisited (string): File name (including path) of the image for button's visited state.


Version number: 5.1.0
Framework versions supported: 5.8+
Author / maintainer: DeltaNet with contributors
Accessibility support: yes
RTL support: yes
Authoring tool support: yes

adapt-block-reveal's People

Contributors

dancgray avatar deltanetdan avatar robertpeek avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adapt-block-reveal's Issues

No longer possible to setup with open icon only

The #any condition on Ln 1 of the openButton.hbs prevents the use of an icon for the button. In legacy courses that do not have a title or button graphic and use _buttonIcon._isEnabled no open button will be shown.

Could prevent completion if this is required on the hidden block.

V4 breaks plugin for older courses

Older courses get the following error:
Uncaught TypeError: this.hideBlockNum is undefined
here L37 & here L38

Prevents user progress.

Suggest adding backward compatible code to ln24 to grab var from old JSON:
this.hideBlockNum = this.model.get('_blockReveal')._blockToHide._number || this.model.get('_blockReveal')._blockToHide;
this.revealBlockNum = this.model.get('_blockReveal')._blockToReveal._number || this.model.get('_blockReveal')._blockToReveal;

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.