Skip to content

Emacs Org-mode HTML exporter variant for educational materials

License

Notifications You must be signed in to change notification settings

inktvis75/org-edu-html

 
 

Repository files navigation

Org-Edu-HTML: A variant of the Emacs Org-mode HTML exporter for educational materials

Introduction

Org-Edu-HTML is an Org-mode exporter (derived from the classical HTML exporter) for educational materials. The exported file may contain cloze tests, single- and multiple-choice tests, and hidden texts revealed after pressing a button.

Installation

Org-Edu-HTML requires Emacs, Org-mode (v8 or higher), and jQuery (see http://jquery.com/). Also, you might want to have a web browser with support for JavaScript installed.

Set org-edu-html-jquery-address to the (relative or absolute) address of the jQuery library. Set org-edu-html-stylesheet if you have your own, fancy CSS style.

Usage

Source file syntax

Options

Currently, four options are recognized. They allow to specify the text on the button pressed to see the correct answer (“Check” by default), the texts displayed when the answer is right or wrong (“OK!” and “Wrong…” by default), and the text on the button pressed to show the hidden text (“Show” by defalt). To change them, write something like this somewehere in the Org file:

#+EDU_CHECK_NAME: Did I get it right?
#+EDU_OK_NAME: How cool is that!
#+EDU_WRONG_NAME: You don't seem to "get" it, right?
#+EDU_SHOW: Show me what's hidden here!

Multiple choice tests

Write a plain list with checkboxes; mark correct answers. Put a line saying
#+ATTR_EDU: :test mct

before the list.

You may embed special blocks called COMMENT_OK and COMMENT_WRONG within any of the answers (items in the list). These will be shown when the user gave a correct/wrong answer respectively.

Example:

A multiple-choice question:
#+ATTR_EDU: :test mct
- [ ] Wrong answer.
  This is a remark shown if the answer is right (i.e., not checked).
  This is a remark shown if the answer is wrong (i.e., checked).
- [ ] Another wrong answer.
- [X] Right answer.
  This is a remark shown if the answer is right (i.e., checked).
  This is a remark shown if the answer is wrong (i.e., not checked).
- [X] Another right answer.

Single choice tests

Multiple choice tests work much like multiple choice tests: the only difference is that you should put

#+ATTR_EDU: :test sct

before the list. The behavior of a SCT when more than one answer is marked as correct in the source file is unspecified (currently, giving any of the answers marked as correct will be accepted, but please don’t rely on this).

Alternatively, you can use HTML drop-down lists instead of radio buttons for SCTs; just say

#+ATTR_EDU: :test select

before the list. Support for drop-down selection lists is poor and might be dropped in the future; please use radiobuttons for SCTs. Alternatively, if you have a very good reason to use drop-down lists and not radiobuttons, contact me and convince that this is good idea. (Part of “convincing” is providing both reasonable source syntax and reasonable styling.)

Cloze tests

Cloze tests are denoted by a special block CLOZE. Inside it, underline text fragments which should be rendered as blanks. You can separate variants with a vertical bar (|). Example:

#+BEGIN_CLOZE
A _cloze_ test is a test where the _student|learner_ has
to type a missing _word|phrase_.
#+END_CLOZE

Hidden texts

An alternative to a choice or cloze test is an activity when a student is presented with a question and a button revealing the answer. Here it is he or she who is responsible for deciding whether the answer given was correct or not. Of course, this might be used for other things, too, like hints for problems. The syntax is easy – you just enclose the hidden text in a special block:

Now think about this question and press the button when you think
you know the answer.
#+BEGIN_HIDDEN
This is the secret answer.  Hopefully you got it right!
#+END_HIDDEN

Using the generated tests

Basically, you choose or write down the answers, click buttons and look at the feedback. Most texts appearing after pressing buttons can be hidden again by clicking them.

HTML structure and CSS styling

Styling can be done via CSS. A simple stylesheet (org-edu-html-default.css) is provided; since I suck at CSS, it looks rather plain. Here are a few hints about writing your own.

Most elements are enclosed in <div> or <span> tags with suitable classes. Hiding comments about answers is currently done by JavaScript and jQuery. Please consult the exported example file (oeh-test.html after exporting oeh-test.org) to see all the tags used by Org-edu-HTML.

Known bugs and missing features

See TODO.org.

About

Emacs Org-mode HTML exporter variant for educational materials

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 69.0%
  • JavaScript 27.6%
  • CSS 3.4%