Tsugi

ContentItem extends ContentItem
in package

This is a ContentItem class with Tsugi-specific convienences.

Table of Contents

Properties

$json  : mixed

Methods

__construct()  : mixed
addContentItem()  : mixed
addContentItem - Add an Content Item
addContentItemExtended()  : mixed
addContentItemExtended - Add an Content Item
addFileItem()  : mixed
addFileItem - Add an File Item
addLtiLinkItem()  : mixed
addLtiLinkItem - Add an LTI Link Content Item
addLtiLinkItemExtended()  : mixed
addLtiLinkItemExtended - Add an LTI Link Content Item
allowContentItem()  : mixed
allowContentItem - Returns true if we can return HTML Items
allowImportItem()  : mixed
allowImportItem - Returns true if we can return Common Cartridges
allowLink()  : mixed
allowLink - Returns true if we can return URLs
allowLtiLinkItem()  : mixed
allowLtiLinkItem - Returns true if we can return LTI Link Items
allowMultiple()  : mixed
allowMultiple - Returns true if we can return multiple items
getContentItemSelection()  : mixed
Return the parameters to send back to the LMS
prepareResponse()  : mixed
Make up a response
returnUrl()  : string
returnUrl - Returns the content_item_return_url

Properties

Methods

addContentItem()

addContentItem - Add an Content Item

public addContentItem(mixed $url[, mixed $title = false ][, mixed $text = false ][, mixed $icon = false ][, mixed $fa_icon = false ][, mixed $additionalParams = array() ]) : mixed
Parameters
$url : mixed
$title : mixed = false
$text : mixed = false
$icon : mixed = false
$fa_icon : mixed = false
$additionalParams : mixed = array()

addContentItemExtended()

addContentItemExtended - Add an Content Item

public addContentItemExtended([mixed $params = array() ]) : mixed
Parameters
$params : mixed = array()

Key/Value pair of configurable options for content item (see addContentItem)

addFileItem()

addFileItem - Add an File Item

public addFileItem(mixed $url[, mixed $title = false ][, mixed $additionalParams = array() ]) : mixed
Parameters
$url : mixed
$title : mixed = false
$additionalParams : mixed = array()
Tags
params

additionalParams Array of configurable parameters for LTI placement (options: presentationDocumentTarget, placementWidth, placementHeight)

addLtiLinkItem()

addLtiLinkItem - Add an LTI Link Content Item

public addLtiLinkItem(mixed $url[, mixed $title = false ][, mixed $text = false ][, mixed $icon = false ][, mixed $fa_icon = false ][, mixed $custom = false ][, mixed $points = false ][, mixed $activityId = false ][, mixed $additionalParams = array() ]) : mixed
Parameters
$url : mixed

The launch URL of the tool that is about to be placed

$title : mixed = false

A plain text title of the content-item.

$text : mixed = false

A plain text description of the content-item.

$icon : mixed = false

An image URL of an icon

$fa_icon : mixed = false

The class name of a FontAwesome icon

$custom : mixed = false

An optional array of custom key / value pairs

$points : mixed = false

The number of points if this is an assignment

$activityId : mixed = false

The activity for the item

$additionalParams : mixed = array()

addLtiLinkItemExtended()

addLtiLinkItemExtended - Add an LTI Link Content Item

public addLtiLinkItemExtended([mixed $params = array() ]) : mixed
Parameters
$params : mixed = array()

Key/Value pair of configurable options for content item (see addLtiLinkItem)

allowContentItem()

allowContentItem - Returns true if we can return HTML Items

public static allowContentItem([mixed $postdata = false ]) : mixed
Parameters
$postdata : mixed = false

allowImportItem()

allowImportItem - Returns true if we can return Common Cartridges

public static allowImportItem([mixed $postdata = false ]) : mixed
Parameters
$postdata : mixed = false

allowLink - Returns true if we can return URLs

public static allowLink([mixed $postdata = false ]) : mixed
Parameters
$postdata : mixed = false

allowLtiLinkItem()

allowLtiLinkItem - Returns true if we can return LTI Link Items

public static allowLtiLinkItem([mixed $postdata = false ]) : mixed
Parameters
$postdata : mixed = false

allowMultiple()

allowMultiple - Returns true if we can return multiple items

public static allowMultiple([mixed $postdata = false ]) : mixed
Parameters
$postdata : mixed = false

getContentItemSelection()

Return the parameters to send back to the LMS

public getContentItemSelection([mixed $data = false ]) : mixed
Parameters
$data : mixed = false

prepareResponse()

Make up a response

public prepareResponse([mixed $endform = false ][, mixed $debug = false ][, mixed $iframeattr = false ]) : mixed
Parameters
$endform : mixed = false

Some HTML to be included before the form closing tag

$endform = 'Back to Store';

$debug : mixed = false

boolean true to pause process to debug.

$iframeattr : mixed = false

A string of attributes to put on the iframe tag

returnUrl()

returnUrl - Returns the content_item_return_url

public static returnUrl([mixed $postdata = false ]) : string
Parameters
$postdata : mixed = false
Return values
string —

The content_item_return_url or false


        
On this page

Search results