setActivityStatus - Methods - Author API

Author API Methods

setActivityStatus()

Sets the status of the Activity being edited.

You would want to use this method so that you can programmatically set the default Activity status for all Activities, for example.

Examples

var updatedStatus = authorApp.setActivityStatus('published');
console.log(updatedStatus);

Arguments

  • status string

    The new status for the Activity.

    Possible values

    • "published"
    • "unpublished"
    • "archived"

Return value

Type boolean

Returns true if successful.

Returns false if unable to set the Activity status. For example, when not in the Activity editor view, or the passed status is not valid or is the same as the current status.

Related articles

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.