project/ProjectSettings. ProjectSettings

This class contains miscellaneous settings of JClic projects.

In addition to the members of this class, there can be other properties in JClic project files
that are not currently loaded:

  • iconFileName
  • descriptors
  • area
  • level
  • locale
  • authors
  • organizations
  • revisions

Constructor

new ProjectSettings(project)

ProjectSettings constructor

Parameters:
NameTypeDescription
projectmodule:project/JClicProject.JClicProject

The project to which this settings belongs

Members

authors :Array.<object>

The authors of this project.
Each author is represented by an object with the following attributes:
name (mandatory), mail, rol, organization and url

Type:
  • Array.<object>

description :object

Project's description, maybe in multiple languages.

Type:
  • object

eventSounds :module:media/EventSounds.EventSounds

The main EventSounds object of the project

languages :Array.<string>

JClic projects can use more than one language, so use a string array

Type:
  • Array.<string>

locales :Array.<string>

Array of canonical locales, as defined in
Intl

Type:
  • Array.<string>

organizations :Array.<object>

Schools, companies and other institutions involved on this project.
Each organization is represented by an object with the following attributes:
name (mandatory), mail, url, address, pc, city, state, country, comments

Type:
  • Array.<object>

project :module:project/JClicProject.JClicProject

The JClicProject to which this ProjectSettings belongs

revisions :Array.<object>

The history of revisions made to this project.
Revisions are represented by objects with the following attributes:
date (mandatory), description, comments and author

Type:
  • Array.<object>

skinFileName :string

The name of an optional 'skin' (visual aspect) can be set for the whole project, or for each Activity

Type:
  • string

title :string

The project title

Type:
  • string

Methods

getAttributes() → {object}

Gets a object with the basic attributes needed to rebuild this instance excluding functions,
parent references, constants and also attributes retaining the default value.
The resulting object is commonly usued to serialize elements in JSON format.

Returns:
  • The resulting object, with minimal attrributes
Type: 
object

setAttributes(data) → {module:project/ProjectSettings.ProjectSettings}

Reads the properties of this ProjectSettings from a data object

Parameters:
NameTypeDescription
dataobject

The data object to be parsed, or just the text content

setProperties($xml)

Reads the ProjectSettings values from a JQuery XML element

Parameters:
NameTypeDescription
$xmlexternal:jQuery

The XML element to parse