Obojobo

Obojobo

  • Authors
  • Developers
  • GitHub

› Developers Section Topics

Getting Started

  • OboNode Structure
  • Text Content Conventions
  • Triggers and Actions

Misc Dev Topics

  • Obojobo Glossary
  • Question Selection Algorithm
  • Range Strings

Events Reference

  • Caliper Event Reference
  • Obojobo Event Reference

OboNode & Content Block Reference

  • ActionButton
  • Assessment
  • Assessment > rubric
  • Assessment > rubric > mod
  • Assessment > scoreAction
  • Break
  • Code
  • Content
  • Figure
  • Heading
  • HTML
  • IFrame
  • List
  • List > listStyle
  • List > listStyle > indent
  • Materia
  • MathEquation
  • MCAssessment
  • MCAssessment > MCChoice
  • MCAssessment > MCChoice > MCAnswer
  • MCAssessment > MCChoice > MCFeedback
  • Module
  • NumericAssessment
  • NumericAssessment > NumericChoice
  • NumericAssessment > NumericChoice > NumericAnswer
  • NumericAssessment > NumericChoice > NumericFeedback
  • Page
  • Question
  • QuestionBank
  • Table
  • Table > gridTextGroup
  • Text
  • textGroup
  • textGroup > textItem
  • textGroup > textItem > styleableText
  • textGroup > textItem > styleableText > styleList
  • trigger
  • trigger > action
  • YouTube

trigger > action

Class: Content Block

The change that occurs as the result of a event being heard by a trigger.

Properties

Property Required Type Description
type Required String The type of action. This is limited to the values shown in the table below.
value no Object An object that can send one or more values along with the action event. The system can then use these values as desired.

Supported Values for type

Type Name Description
nav:goto Navigate a user to a node. value should be an object with an id property set to the id of the node to navigate to.
nav:prev Navigate the user back one page.
nav:next Navigate the user forward one page.
nav:openExternalLink Navigate a user to an external webpage. value should be an object with an url property set to the URL to navigate to.
nav:lock Locks navigation.
nav:unlock Unlocks navigation.
nav:open Opens the left-hand navigation drawer.
nav:close Closes the left-hand navigation drawer.
nav:toggle Toggles open or close the navigation drawer.
assessment:startAttempt Begins an assessment attempt. value should be an object with an id property set to the id of the Assessment node containing the assessment to start.
assessment:endAttempt Ends an assessment attempt. value should be an object with an id property set to the id of the Assessment node containing the assessment to start.
viewer:alert Displays a popup dialog. value should be an object with a message property (the main text of the dialog) and optionally a title property (the title of the dialog).
viewer:scrollToTop Scrolls page to the top. value is optional, but if specified, should be an object with a animateScroll property. If animateScroll is true then the page will smoothly scroll to the top, otherwise, the page will jump to the top.
focus:component Moves DOM focus to an OboNode (for example, a Question). value should be an object with an id property set to the id of the OboNode to focus on. Optionally you can also specify fade:true to visually fade other elements on the page. If the OboNode to focus on is not visible the page will jump so that it is visible to the user. You can optionally specify animateScroll:true to smoothly scroll to the element instead, or preventScroll:true to prevent the page from scrolling (not recommended).

Required Children

None

Variables Registered

None

Example

Action that navigates the user to the node with an id of page-1.

JSON

actions:[
  {
    "type": "nav:goto",
    "value": {
      "id": "page-1"
    }
  }
]

XML

<actions>
  <action type="nav:goto">
    <value id="page-1" />
  </action>
</actions>
  • Properties
    • Supported Values for type
  • Required Children
  • Variables Registered
  • Example
    • JSON
    • XML
Visit Obojobo on GitHub
Obojobo
Obojobo™ ©2021 University of Central Florida