openedxou / Click-to-reveal-XBlock

An Open edX XBlock to reveal some HTML content

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Click-to-reveal XBlock

A basic XBlock to reveal some HTML when a button element is clicked. Originally an Open edX 2016 Hackathon project.

Available fields:

  • 'Show' action name (such as 'Reveal', 'Click to' or 'Show')
  • 'Hide' action name (such as 'Close', 'Click to' or 'Hide')
  • Text Label (such as 'Comment', 'Description' or 'Text') - This displays both on the button and as a heading above the text
  • Heading level (for the text label in the revealed text)
  • Reveal text (the text to reveal)

This is to try and make the way the button displays as customisable as possible. It defaults to 'Reveal Comment' and 'Hide Comment'.

Name for enabling in Studio: 'c2r'

Screenshots

LMS

LMS view LMS view

Studio

Studio view Studio view

About

An Open edX XBlock to reveal some HTML content

License:GNU Affero General Public License v3.0


Languages

Language:JavaScript 89.8%Language:CSS 5.9%Language:Python 2.7%Language:HTML 1.5%