Documentation

Paragraph eKeyboard

Description

The Paragraph eKeyboard module allows the user to enter free-form text. It also allows providing basic formatting in a WYSIWYG way (similar to MS Word and other rich text editors) and entering national characters from the virtual keyboard attached to the text field.

Properties

The list starts with the common properties. Learn more about them by visiting the Modules description section. The other available properties are described below.

Property name Description
Default font family Set the default font family for the editor's body. The value should be expressed in the same way as in the CSS. It is a comma-separated list of font names.
For example: Helvetica, Arial, Verdana.
For more information, visit: http://www.w3schools.com/cssref/pr_font_font-family.
Default font size Set the default font size for the editor's body. The value should be expressed in the same way as in the CSS. It is a numeric value with a unit.
For example: 14px, 3em.
For more information, please visit: http://www.w3schools.com/cssref/pr_font_font-size.
Hide toolbar Hides the toolbar and thus extends the editable area.
Editable placeholder Makes placeholder editable, so its contents will not be cleared on focus on the module.
Custom toolbar Enables defining a custom toolbar. Below is a list of all available toolbar/menu controls that you can add to your Paragraph eKeyboard module:

newdocument bold italic underline strikethrough alignleft aligncenter alignright alignjustify styleselect formatselect fontselect fontsizeselect bullist numlist outdent indent blockquote undo redo removeformat subscript superscript

Note: Use pipe "|" to group buttons.
Placeholder text This property enables specifying free text content to be used as a placeholder in the Paragraph eKeyboard. Allows for HTML styling.
Custom CSS This property lets you specify a separate file with custom CSS styles extending the main CSS content. This CSS file is used within the editor (the editable area).
If "Default font family" and "Default font size" are defined, they have higher priority than styles used in the "Custom CSS" file.

This property allows online resources. Find out more »

Use Custom CSS files This property allows the use of resources defined in the CSS file specified in the “Custom CSS” property.
It is required that the files listed in the file in “Custom CSS” property are added as assets to the lesson.
In case this property was selected first and then a CSS file was added to the “Custom CSS” property, the list of assets will be updated automatically. Functionality does not yet work with Update assets »
Keyboard Layout Type Type of the eKeyboard layout. You can choose one of the standard layouts: French, German, and Spanish special characters, or Custom, which means you can set whatever Layout you like by configuring the Custom Layout field.
Custom Keyboard Layout Buttons should be space-separated, groups of buttons (rows) should be separated by a new line. The layout object must have at least a "default" property with a standard keyboard. The following action keys are supported:
  • {shift} - used as CapsLock
  • {empty} - used as an empty space
Keyboard Position Position of the Keyboard concerning the text field. If the position is right or left, the keyboard layout will be transposed. If the position is set as Custom, you must specify the position by presentation CSS styles.
Manual grading Selecting this Paragraph eKeyboard's property allows the teacher to manually grade the module's content when the lesson is part of the submitted Assignment. The Paragraph eKeyboard can be instantly viewed by the teacher in the Assignment's results on the LMS and possibly verified without previewing the lesson. If selected, the value of the "weight" property will be treated as the max score.
Show answers Text to display on Show Answers.
Title The title of the Paragraph eKeyboard is visible when the Assignment's open activities are manually graded on mCourser. The title is visible above each Paragraph eKeyboard's preview; however, it is not visible in the lesson itself.
Weight The maximum number of points the teacher can grant when grading the Assignment's open activities. This can only be a whole number in the range from 0 to 100. The default Paragraph eKeyboard's weight equals 1. If the `Manual grading` property is selected, this value will be used as the max score.

Supported commands

Command name Params Description
hide --- Hides the module if it is visible.
show --- Shows the module if it is hidden.
isVisible --- Returns true if the module is visible, otherwise false.
lock --- Covers the module with the mask.
unlock --- Removes the mask from the module.
getText --- Returns module's content.
setText text Sets the content of the module to the text given as a parameter.
isAttempted --- Returns true if any text was inserted.
isAIReady --- Returns true if the model AI is ready to score the module.

Scoring

The Paragraph eKeyboard, thanks to the Open Activity functionality, can be scored by AI and/or a teacher. To activate the scoring, the module must have the Manual grading property selected. At this point, the module supports only the default way of Activity scoring, that is, when:

  • Score Type in page is set to percentage.
  • If the module belongs to a group then the Group scoring in the group is set to Default.

With other settings, the scoring will be miscalculated.

Property Description
maxScore Equal to the value provided in Weight property.
If Manual grading property is not selected, then it returns 0.
score Content of the module can be scored by the teacher and AI.
If Manual grading property is not selected, then it returns 0.
If the module was scored by the teacher and AI, then use the score provided by the teacher.
If the module was neither scored by the teacher nor AI, then the score will be equal to maxScore.
errorCount Always returns 0.

Events

Field name Description
Value blur - event sent on exiting the module.

CSS Classes

Property name Description
.paragraph-keyboard-wrapper Simple module wrapper.
.paragraph-wrapper Simple wrapper for the text editor.
.paragraph-keyboard Layer with eKeyboard.
.paragraph-keyboard-letter Standard keyboard letter.
.paragraph-keyboard-empty Empty field on keyboard.
.paragraph-keyboard-letter.clicked Style appears when a letter is clicked.
.paragraph-keyboard-shift Style for CapsLock button.
.paragraph-keyboard-shift.clicked Style when CapsLock button is clicked.

Demo presentation

Demo presentation contains examples of how to use the Paragraph eKeyboard module.