Authoring With Corsbook

Special Content Types

By

First published on February 17, 2019


Files

Sometimes you will want to upload files for readers to download, such as a text document, spreadsheet, etc. Many documents can contain malware. Compressing these files into a ZIP file makes them both easier to download and safer.

  • If just one file, then zip (compress) that file.
  • If multiple files, place the files in a folder, then zip (compress) the folder.
  • Upload the zip file.

Short Codes

Corsbook is built on top of the WordPress open source software. It is possible to add additional functionality in WordPress using small snippets of code called shortcodes. Short codes are enclosed in “[…]” and “[/…]” punctuation. An example which will hide enclosed contents is:

[hide]This is my secret text[/hide].

Tables

There is a table creation tool in the text editing tools toolbar. If that tool is insufficient, you can enter HTML and CSS in using the Edit tab. Below is an example of a table created by the Table tool.
Various Edible Plants
Type Variety Color
Fruit Banana Yellow
Vegetable Eggplant Purple

You can also use [table]…[/table] short codes, with values in between, e.g.

[table]
Year,Make,Model,Length
1997,Ford,E350,2.34
2000,Mercury,Cougar,2.38
[/table]

which will produce a table such as:

Year Make Model Length
1997 Ford E350 2.34
2000 Mercury Cougar 2.38

An example of an HTML and CSS table is:

Year Make Model Length
1997 Ford E350 2.34
2000 Mercury Cougar 2.38

Images

You can often just copy and paste images into your Corsbook content. However, the preferred way is to first click on the Add Media button and upload the image into the Media Library, then insert it into your content. Make sure to enter the metadata including Alt Text to improve accessibility. You should enter the source and copyright information into the Description field.

Videos

Use the same approach for videos as for images. You might need to manually add your own caption in the content field rather than in metadata. There is no Alt Text field for videos, but ideally there should be captioning.

  • TIP! To avoid videos appearing in the print version of your course, embed videos in the following short codes: [iframe class="noprint" src="your source"]] and [[/iframe]. The “scr” refers to the URL of the video, and “class” tells the video not to appear in the print version (which would show up as a blank space).

Quizzes

Corsbook presently provides two options for creating quizzes. WP-Pro-Quiz (see left hand side menu) is a more traditional, low-profile tool. It is not being updated, but it still seems to work OK. For a more modern look, H5P capability is provided (also see left hand side menu).

Mathematics

You can directly type some mathematics using the existing text editing tools, such as E = mc2.  You can also use the Ω text tool to enter special symbols, such as ½, Ψ and π.You can insert equations as images, although this might be difficult for the visually-impaired to read. If so, make sure to enter an alternative text.If you know latex, then  you  insert LaTeX code between the following short codes:

[latex]Your LaTeX code [/latex].

Hidden Text

You might wish to use hidden text for notes to yourself or an editor, or for content that is not ready to be viewed by the public. As indicated above, place your content between the short codes.

[hide]This is my secret text[/hide].

Warning! No guarantee is made that this hidden text won’t sometimes be visible to the public. For example, there could be a system bug or glitch that might temporarily deactivate all short codes. Or, you might make an entry mistake or omit the closing short code.

Alert Messages

You can add a message or alert the will popup as soon as a reader goes to a page, such as a course or lesson. Use  the sheetmessage short code:

[sheetmessage message="Turn in Assignment #1!"]

Use the message parameter to enter the text for your message.

Embedding Other Content

When you need to embed content, and the above methods are insufficient, you can try iframe. To use this on Corsbook, use the [iframe][/iframe] shortcode. For example:

[iframe src="https://www.nasa.gov/mission_pages/mars/images/index.html"][/iframe].

This will display the source contents:

.NASA video shown in web version.

Here are some useful parameters for iframe:

  • height (examples: height=”50%”, height=”300px”)
  • width (examples: width=”100%”, width=”200px”)

Here is another example with lots of parameters.

[iframe class="noprint" height="50%" src="https://www.alexandriarepository.org/wp-content/uploads/20161226131424/HMMExplosiveEruption_12Oct2008_1.mp4" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture;fullscreen" ]Error.[/iframe]

You can find additional parameters, such as for sizing, at the iframe site.

There are a few ways you can make iframe better for print and accessibility:

  • class=”noprint” after the word iframe will prevent the contents from showing up in the PDF and print media.
  • alt=”your visual description” is used after the word iframe or the class statement to tell accessibility-enabled devices what would have been seen in the iframe.
  • <span class="nodisplay">NASA video shown in web version.</span> can be in text mode used after the enclosing iframe short code to provide a description that will only appear in the PDF and print modes.

| COURSE |


Content is copyright the author. Layout is copyright Corsbook. See Corsbook.com for further notices.