Skip to main content

API-Referenz

eLP : object

global eLP Object

Kind: global namespace

eLP.resources : object

Object of the currently loaded Resources

Kind: static property of eLP
Example

eLP.resources = {
bildungseinrichtung_versions: {...},
bildungseinrichtungen: {...},
kompetenzen: [...],
languageKeys: {...},
methoden: [...],
oer: [...],
pruefungsmethoden: [...],
taxonomy: {...},
technik: [...],
veranstaltungstypen: [...],
versions: {...},
webapplikationen: [...]
}

eLP.config : object

eLP-Config Object

Kind: static property of eLP

config.type : string

Loaded Version of eLP, corresponding to an .html-file
eLP.config.type === 'index' || 'lehrportal' || 'lernportal'

Kind: static property of config

config.svgzoom : number

Zoom in on SVGs when converting them to PNGs

Kind: static property of config
Default: 4

config.ckeditor4 : string

Path to the config-file for CKEditor4, relative from 'Resources/packages/ckeditor4/ckeditor.js'

Kind: static property of config
Default: "'../../Resources/Js/ckeditor4-config.js'"

config.resizepolyfill : boolean

If true, use interact-js to polyfill a resizer for textareas, either if default css-resize is not supported by the browser or if touch-interaction is detected (as the default css-resize doesn't support touch-interactions)

Kind: static property of config
Default: false, not finished testing

config.portfolio_name : string

Name of the loaded portfolio

Kind: static property of config
Default: "''"

config.bildungseinrichtung : string

Selected Bildungseinrichtung
'-1' for unselected

Kind: static property of config
Default: "'-1'"

config.bildungseinrichtung_selection : boolean

Configuration if bildungseinrichtung-selection in veranstaltung-tab is shown

Kind: static property of config
Default: true

config.language : string

Selected language
Currently supported: 'de' || 'en'
French in development

Kind: static property of config
Default: "'de'"

config.tools : Array

Loaded tools
Intended for automatic generation of the navigation, API unstable

Kind: static property of config

config.datetypes : Array.<string>

Custom date-types

Kind: static property of config
Default: empty Array

config.phasetypes : Array.<string>

Custom phase-types

Kind: static property of config
Default: empty Array

config.kompetenzen_array

TODO: Description

Kind: static property of config

eLP.collections : Array

Array of the Collections of Veranstaltungen

Kind: static property of eLP
Example

eLP.collections[0] = {
name: 'Name of the Collection',
veranstaltungen: [ 'ei18' ] // veranstaltungs-ids
}

eLP.queries : object

Object of often used media-queries

Kind: static property of eLP

queries.phone : object

Media-Query for phones: Width under 767px

Kind: static property of queries

queries.tablet : object

Media-Query for Tablets: Width between 768px and 991px

Kind: static property of queries

queries.desktopSmall : object

Media-Query for Small Desktop-View: Width between 992px and 1199px

Kind: static property of queries

queries.desktopBig : object

Media-Query for the widest View: Width greater than 1200px

Kind: static property of queries

queries.touch : object

Media-Query for touch-devices

Kind: static property of queries

queries.orientation : object

Media-Query for current orientation, if applying = portrait

Kind: static property of queries

eLP.veranstaltungen : Array

Array with all loaded [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}

Kind: static property of eLP

eLP.utils : object

Namespace for utility functions

Kind: static namespace of eLP

utils.getPngDimensions ⇒ object

Parse png-dimension out of dataURL (can't wait for asynchronous in parseHtml)

Kind: static property of utils
Returns: object - Object with Object.width and Object.height being Integer of width/height

ParamTypeDescription
dataURLstringDataURL of png-image to parse

utils.bowser : object

Object of bowser parsing current userAgent at pageload

Kind: static property of utils

utils.loaderVisible : number

How many often eLP.utils.loaderShow has been called MORE than eLP.utils.loaderHide Start at 1 as loader is visible per default (while JS is loading)

Kind: static property of utils

utils.sortName(a, b) ⇒ number

Sort-Function for Arrays of Objects, sorting elements with .children to the top, otherwise sorting by .name

Kind: static method of utils
Returns: number - Number following sort-convention to indicate sorting of a and b

ParamTypeDescription
aobjectObject A to sort
bobjectObject B to sort

utils.makeBool(variable) ⇒ boolean

Parse Value as boolean
Only the boolean or string 'true' return true, otherwise return false

Kind: static method of utils
Returns: boolean - Return-Value

ParamTypeDescription
variable*Variable to parse

utils.nullCoal(...expressions) ⇒ *

utility function for the nullish coallescing operator

Kind: static method of utils
Returns: * - first expression that satisfies != null

ParamTypeDescription
...expressions*Expressions to check

utils.btoaWrapper(string) ⇒ string

Wrapper for btoa, unescape and encodeURI to enable btoa to extend btoa to UTF

Kind: static method of utils
Returns: string - Base64-encoded ASCII string

ParamTypeDescription
stringstringbinary string

utils.atobWrapper(string) ⇒ string

Wrapper for atob, escape and decodeURI to enable atob to extend btoa to UTF

Kind: static method of utils
Returns: string - binary string

ParamTypeDescription
stringstringBase64-encoded ASCII string

utils.decodeHtmlEntities(html) ⇒ string

Decode HTML-Entities, necessary for vex-js
Browser-Hack, use plugin "he" if cross-browser standard-conform is necessary

Kind: static method of utils
Returns: string - Decoded String

ParamTypeDescription
htmlstringString including the html-entity

utils.byString(o, s) ⇒ *

Parse the path as string inside an object

Kind: static method of utils
Returns: * - Value at specified path

ParamTypeDescription
oobjectObject in which to look the path up
sstringPath to look up

utils.isObject(obj) ⇒ boolean

Test if value is an Object

Kind: static method of utils
Returns: boolean - Truthy if obj is Object

ParamTypeDescription
obj*Value to test

utils.isDOM(obj) ⇒ boolean

Test if value is an HTML Object, relies on duck-typing for property nodeType

Kind: static method of utils
Returns: boolean - True when DOM Element

ParamTypeDescription
obj*Value to test

utils.findByIdShallow(o, id) ⇒ string | number | undefined

In an Object, find the Object with the specified 'id' and return the key

Kind: static method of utils
Returns: string | number | undefined - Key of found Object or undefined

ParamTypeDescription
oobjectObject to search in
id*Id to find

Example

eLP.utils.findByIdShallow({
1: { id: 1 },
2: { id: 3 }
}, 3) // == 2

utils.findIndexByIdShallow(o, id) ⇒ string | number | undefined

In an Object, find the Object with the specified 'id' and return the key

Kind: static method of utils
Returns: string | number | undefined - Key of found Object or undefined

ParamTypeDescription
oobjectObject to search in
id*Id to find

Example

eLP.utils.findByIdShallow({
1: { id: 1 },
2: { id: 3 }
}, 3) // == 2

utils.findById(o, id) ⇒ object | number

In an Object, find deep through children-objects and return the Object with the specified 'id'

Kind: static method of utils
Returns: object | number - Found Object or 0
Throws:

  • 'No result for id in o'
ParamTypeDescription
oobjectObject to search in
id*Id to find

utils.showClosestTabsCollapse(target, container, nav) ⇒ boolean

Look for closest tabs and collapse including itself to given id and show each

Kind: static method of utils
Returns: boolean - If true, failed

ParamTypeDescription
targetstringID of element to show
containerobjectDOM-Element of container to look for links in
navobjectDOM-Element of the navigation aka container of tab-elements, if existing

utils.newerVersion(now, test) ⇒ boolean

Test two version-Strings if the second is newer

Kind: static method of utils
Returns: boolean - True if test is newer, else false

ParamTypeDescription
nowstringPrevious Version String
teststringVersion String to test

utils.testIfCORSViolation(url, editor)

Test if image accessible without CORS-Violation, if not show Notification in CKEditor4

Kind: static method of utils

ParamTypeDescription
urlstringURL of image to test
editorobjectCKEditor4-Instance to show the notificatio in

utils.imageURLtoBase64(url) ⇒ Promise.<string>

Load image URL and convert it to Base64
Try to ensure compatibility with PDF and docx

Kind: static method of utils
Returns: Promise.<string> - Promise that resolves to the Base64-String

ParamTypeDescription
urlstringImage-URL

utils.SVGtoPNG(svg) ⇒ string

Convert SVG to PNG (Base64-String), synchronous Consider as deprecated, should be transitioned to asynchronous and using native browser

Kind: static method of utils
Returns: string - Base64-DataURL String of PNG

ParamTypeDescription
svgstringSVG-String

utils.SVGtoPNGdefer(svg) ⇒ Promise.<string>

Convert SVG to PNG (Base64-String), asynchronous, unused but potential fallback if canvg-library has issues

Kind: static method of utils
Returns: Promise.<string> - Base64-DataURL String of PNG

ParamTypeDescription
svgstringSVG-String

utils.convertHtmlToPdf(html, images) ⇒ object

Convert HTML to Object in pdfmake-format Heavily influenced by OpenSlides, https://github.com/OpenSlides/OpenSlides For native support of pdfmake or standarized plugin to use instead, follow https://github.com/bpampuch/pdfmake/issues/205

Kind: static method of utils
Returns: object - Object in the pdfmake-format

ParamTypeDescription
htmlstringHTML-String that is supposed to be converted
imagesArray.<string>Array of Data64 of images to load, correct key is the src-attribute

utils.hslToHex(h, s, l) ⇒ string

Convert Color in HSL-format to Hex-format inspired by https://stackoverflow.com/a/44134328

Kind: static method of utils
Returns: string - HEX-value with leading '#'

ParamTypeDescription
hnumberhue, angle
snumbersaturation, percentage
lnumberlightness, percentage

utils.hexToRGB(h) ⇒ string

Convert Color in Hex-format to RGB-format (hexadecimal to decimal) copied from https://css-tricks.com/converting-color-spaces-in-javascript/

Kind: static method of utils
Returns: string - rgb values as string, without the function (so it can be put into both rgb and rgba)

ParamTypeDescription
hstringhexadecimal color-string

utils.rgbToHex(rgb) ⇒ string

Convert Color in RGB-format to Hex-format (decimal to hexadecimal) inspired by hexToRGB

Kind: static method of utils
Returns: string - hexadecimal-color, starting with '#'

ParamTypeDescription
rgbstringrgb color-string

utils.defer() ⇒ Promise

Make Promise which is resolvable from the outside

Kind: static method of utils
Returns: Promise - Promise with Promise.resolve and Promise.reject the corresponding functions

utils.makeCKEditor(elem, config, startValue, forceRecreate)

Wrapper to handle CKEditor instance creation
If already existing (and not deleted), check:

  • if same config, do nothing
  • if different config and ready, destroy current instance and create new
  • if different config and still creating, delay destroying until finished creating (CKEditor is unhappy with being destroyed while still creating)
  • else create new

Kind: static method of utils

ParamTypeDescription
elemobject | stringjQuery-Selector or node-Element
configobjectConfiguration-Object, for details the CKEditor Documentation: check https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html
startValuestringStart-Value for the Editor
forceRecreatebooleanForce to recreate even if same config

utils.makeFlatpickr(element, config) ⇒ object | null

Wrapper to handle Flatpickr instance creation

Kind: static method of utils
Returns: object | null - new flatpickr instance, or null

ParamTypeDescription
elementobjectHTMLElement to create flatpickr at
configobjectflatpickr-options Object, for details check the flatpickr Documentation: https://flatpickr.js.org/options/

utils.removeFlatpickr(element, keepNative)

Destroy flatpickr instance and unbind elp's .flatpickrChange events

Kind: static method of utils

ParamTypeDescription
elementobjectHTMLElement of flatpickr
keepNativebooleanOnly unbinds .flatpickrChange events, does NOT destroy instance

utils.fixCKEBlur()

Fix some occasions of CKEditor not triggering expected event and thus loosing last changes: check all editors for unsaved changes To be safe, always cast this before processing data depending on CKEditor input

Kind: static method of utils

utils.objectToHtml(obj) ⇒ string

Convert object in special format to html-String, accepts primitives and Arrays too

  • If primitive (number or string), directly casts that to string and returns that
  • If Array, convert each element and concatenate the results
  • If Object following special Object.template format, proceed from there
  • If Object.element, convert with eLP.utils.objectToElement
  • If other Object, follow the special community-Object rules
  • Else log error in console and return empty string

Kind: static method of utils
Returns: string - html-String
See: [Tutorial]{@tutorial Spezielle-Formate-ObjectHtml}

ParamTypeDescription
obj*Object in special format to convert to html

utils.objectToLink(obj) ⇒ string

Convert object to html-String of a link

  • If String, use it as href and text
  • If Object, put following values on the link-Element:
    • id
    • class
    • rel
    • target
    • data-toggle
    • href
    • langkey
      Additionally, if obj.langkey, add "translate" as class, get href from obj.url, obj.name or obj.text if not supplied, and the shown text is either the translated obj.langkey or obj.text, obj.name, obj.href or obj.url
    • passthrough to just append additional HTML directly into the <a>-Element

Kind: static method of utils
Returns: string - html-String of link-Element

ParamTypeDescription
obj*Object or primitive to convert to html-String of link-Element

utils.objectToElement(obj) ⇒ string

Convert object in special format to html-String, accepts primitives and Arrays too

  • If primitive, directly returns that
  • If Array, convert each element and concatenate the results
  • Otherwise parse to element with following rules:
    Parse every Object.keys(obj)-entry as attribute, unless it's a special jQuery function which gets parsed with the value instead
    obj.element becomes the element-type
    obj.langkey adds class "translate" and changes text to eLP.core.translate(obj.langkey) and gets added as data-langkey

Kind: static method of utils
Returns: string - html-String
See: [Tutorial]{@tutorial Spezielle-Formate-ObjectElement}

ParamTypeDescription
obj*Object in special format to convert to html

utils.literatureObjectToReference(obj) ⇒ string

Convert Object in literature-format to reference No official reference-specification applied for now!

Kind: static method of utils
Returns: string - String of reference

ParamTypeDescription
objobjectObject in literature-format

utils.testReadonlySome(obj) ⇒ boolean

Testfunction evaluating obj.readonly as truthy

Kind: static method of utils
Returns: boolean - True if obj.readonly is truthy, false otherwise

ParamTypeDescription
objobjectObject to test

utils.templatePreserve(data) ⇒ string | object

Function for use in select2 as templateSelection/templateResult-option Takes care of translating if data.langkey is truthy and preserves previous html5-data on data.element

Kind: static method of utils
Returns: string | object - String or jQuery-Object to be shown as selection/result

ParamTypeDescription
dataobjectdata-Object with the select2-data

utils.getListSortWithFilterBound(listObj) ⇒ function

Get sort-function bound to List-Object that sorts based on additional item-property item.filter, reverts to naturalSort otherwise

Kind: static method of utils
Returns: function - search-function

ParamTypeDescription
listObjobjectList-Object

utils.formToDates(data, ids) ⇒ Array

Parse the vex-date form to the dates format

Kind: static method of utils
Returns: Array - Values from data in the dates format

ParamTypeDescription
dataobjectSerialized values of the form
idsArray.<(number|string)>Array of the used IDs for the form-rows

utils.serialize(elements) ⇒ object

Serialize a form to an Object with the Objectkeys equalling the corresponding form-element name

Kind: static method of utils
Returns: object - Get serialized Object for form-elements

ParamTypeDescription
elements*jQuery-Selector or NodeElement which descendant form-element to serialize

Example

<div id="form-wrap"><form><input name="test" type="number" value="1234"></form></div>
eLP.utils.serialize('#form-wrap') // { test: 1234 }

utils.isInArray(x, array) ⇒ boolean

Test if x and array are the same or if x is in array, recursively and using non-strict equality (==)

Kind: static method of utils
Returns: boolean - True when x is equal to array or x is in array, false else

ParamTypeDescription
x*Parameter to find
arrayArray | *Array to search in or Value to compare with

utils.outputPhase(lehreinheit, termin, veranst) ⇒ string

Parse phase-type of a phase to human-readable name and append number of occurance if this phase-type is set multiple times for one date
If lehreinheit.phase is falsy, returns eLP.core.translate('phase')

Kind: static method of utils
Returns: string - The parsed phase-Type and potentially appended number of occurance

ParamTypeDescription
lehreinheitobjectLehreinheit-Object of which the .phase-attribute is to be parsed
terminobject | undefinedTermin-Object which includes the Lehreinheit-Object
veranstobject | undefinedVeranstaltungs-Object which includes the Termin-Object with the Lehreinheit-Object
only relevant if termin is not set, defaults to currently selected Veranstaltung.
If none is selected, number is omitted

utils.readJsonFile(file) ⇒ object

Read a URL and parse to JSON, using eLP.storage.puffer[file] as buffer To force re-reading without using eLP.storage.puffer, make sure to clear that first

Kind: static method of utils
Returns: object - deep clone of Object at eLP.storage.puffer[file] or from reading the URL

ParamTypeDescription
filestringURL to read and parse as JSON, preferred relative

utils.readMarkdownFile(file) ⇒ Promise.<*>

Read a URL as text without parsing, using eLP.storage.puffer[file] as buffer To force re-reading without using eLP.storage.puffer, make sure to clear that first WARNING: No check to ensure eLP.storage.puffer[file] is text and not an Object

Kind: static method of utils
Returns: Promise.<*> - Value at eLP.storage.puffer[file] or from reading the URL as text

ParamTypeDescription
filestringURL to read as text, preferred relative

utils.updateResources(language, bildungseinrichtung, veranstSet, prevBildung) ⇒ number

Update resources according to version-number (Resources/infothek/Data/versions.json or the version.json for bildungseinrichtung), this includes:

  • eLP.resources
  • eLP.toolbar.general
  • eLP.toolbar.netzwerk or veranstaltung.toolbar.netzwerk
  • eLP.toolbar.einrichtung or veranstaltung.toolbar.einrichtung where "veranstaltung" is the currently selected veranstaltung (if applicable)

Kind: static method of utils
Returns: number - Approximate counter of how many resources have been updated

ParamTypeDescription
languagestringLanguage to access ('de'
bildungseinrichtungstringSelected bildungseinrichtung, defaults to veranstaltung.config.bildungseinrichtung or eLP.config.bildungseinrichtung If the version-number of the "Bildungseinrichtung" is outdated, the elements of the object are reloading. If all ELP-Tabs are closed, all elements are deleted anyways.
veranstSetbooleanIf truthy, change Resources of the selected Veranstaltung, else change Resources for portfolio. The influence is only for the reloading of the toolbar. Defaults to true if a Veranstaltung is selected, false otherwise
prevBildungstringIf set to bildungseinrichtung, reset all bildungseinrichtung-specific settings which aren't set by bildungseinrichtung to default
updateResources~execChange(item)

Set up changes to item based on change of bildungseinrichtung
Change itself is performed afterward

Kind: inner method of updateResources

ParamTypeDescription
itemstringkey to change

utils.dragStartPhaseRow(event)

Function for use in the drag&drop API at the dragStart-event on PhaseRow Custom data in dataTransfer: dragged rowtype as 'elp-row' Effect allowed: 'move'

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragEnterPhaseRow(event)

Function for use in the drag&drop API at the dragEnter-event on PhaseRow

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragOverPhaseRow(event)

Function for use in the drag&drop API at the dragOver-event on PhaseRow

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragEndPhaseRow(event)

Function for use in the drag&drop API at the dragEnd-event on PhaseRow

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dropPhaseRow(event)

Function for use in the drag&drop API at the drop-event on PhaseRow

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.phaseRowOrderUp()

Function for use at a click-event, the clicked PhaseRow is sorted one earlier in the current PhaseRow-Order Calls eLP.core.updatePhaseRowOrder

Kind: static method of utils

utils.phaseRowOrderDown()

Function for use at a click-event, the clicked PhaseRow is sorted one later in the current PhaseRow-Order Calls eLP.core.updatePhaseRowOrder

Kind: static method of utils

utils.rowClose()

Function for use as an click-event to unselect a materialien-row from PhaseRow

Kind: static method of utils

utils.dragStartSubContent(event)

Function for use in the drag&drop API at the dragStart-event on SubContent Custom data in dataTransfer: dragged subcontent as 'elp-subcontent' dragged rowtype as 'elp-rowtype' Effect allowed: 'move'

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragEnterSubContent(event)

Function for use in the drag&drop API at the dragEnter-event on SubContent

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragOverSubContent(event)

Function for use in the drag&drop API at the dragOver-event on SubContent

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragEndSubContent(event)

Function for use in the drag&drop API at the dragEnd-event on SubContent

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dropSubContent(event)

Function for use in the drag&drop API at the drop-event on SubContent

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.subContentOrderUp()

Function for use at a click-event, the clicked SubContent is sorted one earlier in the current SubContent-Order Calls eLP.core.updateSubContentOrder

Kind: static method of utils

utils.subContentOrderDown()

Function for use at a click-event, the clicked SubContent is sorted one later in the current SubContent-Order Calls eLP.core.updateSubContentOrder

Kind: static method of utils

utils.subcontentRowClose()

Function for use as an click-event to unselect a materialien-row from SubContent

Kind: static method of utils

utils.dragStartVeranstaltung(event)

Function for use in the drag&drop API at the dragStart-event on veranstaltung Custom data in dataTransfer: dragged veranstaltung as 'elp-veranstaltung' Custom data in dataTransfer: dragged collection as 'elp-ver-collection' Effect allowed: 'move'

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragEnterVeranstaltung(event)

Function for use in the drag&drop API at the dragEnter-event on veranstaltung

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragOverVeranstaltung(event)

Function for use in the drag&drop API at the dragOver-event on veranstaltung

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragEndVeranstaltung()

Function for use in the drag&drop API at the dragEnd-event on veranstaltung

Kind: static method of utils

utils.dropVeranstaltung(event)

Function for use in the drag&drop API at the drop-event on veranstaltung

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragStartCollection(event)

Function for use in the drag&drop API at the dragStart-event on collection Custom data in dataTransfer: dragged collection as 'elp-collection' Effect allowed: 'move'

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragEnterCollection(event)

Function for use in the drag&drop API at the dragEnter-event on collection

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragOverCollection(event)

Function for use in the drag&drop API at the dragOver-event on collection

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragEndCollection(event)

Function for use in the drag&drop API at the dragEnd-event on collection

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dropCollection(event)

Function for use in the drag&drop API at the drop-event on collection

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragStartTermin(event)

Function for use in the drag&drop API at the dragStart-event on dates Custom data in dataTransfer: dragged date as 'elp-termin' Effect allowed: 'move'

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragEnterTermin(event)

Function for use in the drag&drop API at the dragEnter-event on dates

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragOverTermin(event)

Function for use in the drag&drop API at the dragOver-event on dates

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragEndTermin(event)

Function for use in the drag&drop API at the dragEnd-event on dates

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dropTermin(event)

Function for use in the drag&drop API at the drop-event on dates

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragStartReflex(event)

Function for use in the drag&drop API at the dragStart-event on reflex-dates Custom data in dataTransfer: dragged date as 'elp-reflex' Effect allowed: 'move'

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragEnterReflex(event)

Function for use in the drag&drop API at the dragEnter-event on dates

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragOverReflex(event)

Function for use in the drag&drop API at the dragOver-event on dates

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragEndReflex(event)

Function for use in the drag&drop API at the dragEnd-event on dates

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dropReflex(event)

Function for use in the drag&drop API at the drop-event on dates

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragStartPhase(event)

Function for use in the drag&drop API at the dragStart-event on phases Custom data in dataTransfer: dragged phase as 'elp-phase' Effect allowed: 'move'

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragEnterPhase(event)

Function for use in the drag&drop API at the dragEnter-event on phases

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragOverPhase(event)

Function for use in the drag&drop API at the dragOver-event on phases

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dragEndPhase(event)

Function for use in the drag&drop API at the dragEnd-event on phases

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.dropPhase(event)

Function for use in the drag&drop API at the drop-event on phases

Kind: static method of utils

ParamTypeDescription
eventobjectEvent-Object

utils.loaderShow()

Show loader

Kind: static method of utils

utils.loaderHide()

Hide loader

Kind: static method of utils

utils.phoneResizeHandler()

Handler for when the site is resized to/from smallest/phone width Mostly visuals, disables infothek

Kind: static method of utils

utils.resizeHandlerPolyfill(element)

Polyfill to resize textarea if browser doesn't support it natively AND enabling resizing with touch

Kind: static method of utils

ParamTypeDescription
elementobjectNodeElement, parent of textarea-Element and element with class 'resize-polyfill-grapper' to use as grabber

eLP.storage : object

storage-related Namespace, e.g. saving to disk or to localStorage

Kind: static namespace of eLP

storage.puffer : object

Buffer for loaded files, intended for the loading-process only
Content is stored under the key of their file-path

Kind: static property of storage

storage.storageSaving : number

intervalID of the timer saving current portfolio in storage with eLP.storage.storageFunction() every 5 minutes

Kind: static property of storage

storage.menuSaving : number

intervalID of the timer highlighting the save-Icon with eLP.storage.speichernHighlight() every 5 minutes

Kind: static property of storage

storage.storageFunction()

Store current portfolio in localStorage, key is equal to eLP.config.type

Kind: static method of storage

storage.loadStorageFunction(testrun) ⇒ object | undefined

Load current portfolio from localStorage, key is equal to eLP.config.type

Kind: static method of storage
Returns: object | undefined - Return localStorage[eLP.config.type] if testrun

ParamTypeDescription
testrunbooleanif truthy, return localStorage[eLP.config.type] without changing anything

storage.cleanDeprecatedStorage()

Clean localStorage from deprecated keys used in old versions of eLP

Kind: static method of storage

storage.speichernHighlight()

Function highlighting the save-Icon, for automatic use

Kind: static method of storage

storage.save(opts)

Save portfolio or collection browser-handling depends on browser-settings, usually either opens save-dialog or saves at default download-location

Kind: static method of storage

ParamTypeDescription
optsobjectObject with options
opts.typestringDownload-type, either 'portfolio' or 'collection', defaults to 'portfolio'
opts.collectionidstringIf saving a collection, specifies the collection to save
opts.callbackfunctionCallback-function to call after saving

storage.resetStorage()

Reset localStorage and reload page, to use at encountering errors with storage

Kind: static method of storage

eLP.toolbar : object

toolbar- and toolbox-related Namespace

Kind: static namespace of eLP

toolbar.general : Array

Array of general links

Kind: static property of toolbar
Example

eLP.toolbar[0] = {
// displayed name
name: 'ELP-Chat',
// src-link to the displayed icon
src: 'Resources/ELP_media/picture/elp_chat.png',
// actual link
link: 'https://elp-community.uni-wuppertal.de'
}

Example

eLP.toolbar[1] = {
name: 'ELP-Tutorial',
// classes which display an icon, mostly from fontawesome
icon: 'fa-file-video-o fa-lg',
link: 'http://dl.medienlabor.uni-wuppertal.de/zim4learners/elp/index.html'
}

toolbar.einrichtung : Array

Array of Toolbar-Links from selected einrichtung

Kind: static property of toolbar
See: general for the syntax of link-Objects

toolbar.netzwerk : Array

Array of Toolbar-Links for netzwerk-apps which the selected einrichtung is part of

Kind: static property of toolbar
See: general for the syntax of link-Objects

toolbar.user : Array

Array of Toolbar-Links for user-apps

Kind: static property of toolbar
See: general for the syntax of link-Objects

toolbar.toolbox : Array

Array of Links saved in the Toolbox Is named Toolbar now and you can find it under Dashboard.

Kind: static property of toolbar
See: general for the syntax of link-Objects

toolbar.createTools(elem)

Create the tools-column in the toolbar

Kind: static method of toolbar

ParamTypeDescription
elemobject | stringjQuery-Selector or node-Element

toolbar.bookmark_drag_start_veranst(event)

Function for use in the drag&drop API at the dragStart-event on bookmarks in the toolbar

Kind: static method of toolbar

ParamTypeDescription
eventobjectEvent-Object

toolbar.bookmark_drag_start_toolbox(event)

Function for use in the drag&drop API at the dragStart-event on bookmarks in the toolbox

Kind: static method of toolbar

ParamTypeDescription
eventobjectEvent-Object

toolbar.bookmark_drag_move_veranst(event)

Function for use in the drag&drop API at the dragMove-event on bookmarks in the toolbar

Kind: static method of toolbar

ParamTypeDescription
eventobjectEvent-Object

toolbar.bookmark_drag_move_toolbox(event)

Function for use in the drag&drop API at the dragMove-event on bookmarks in the toolbox

Kind: static method of toolbar

ParamTypeDescription
eventobjectEvent-Object

toolbar.bookmark_drag_new(event)

Function for use in the drag&drop API at the dragEnter-event and dragOver-event on bookmarks in the toolbar/toolbox

Kind: static method of toolbar

ParamTypeDescription
eventobjectEvent-Object

toolbar.bookmark_drop_move_veranst(event)

Function for use in the drag&drop API at the drop-event on bookmarks in the toolbar, moving bookmark which is already part of the toolbar

Kind: static method of toolbar

ParamTypeDescription
eventobjectEvent-Object

toolbar.bookmark_drop_move_toolbox(event)

Function for use in the drag&drop API at the drop-event on bookmarks in the toolbox, moving bookmark which is already part of the toolbox

Kind: static method of toolbar

ParamTypeDescription
eventobjectEvent-Object

toolbar.bookmark_drop_new_veranst(event)

Function for use in the drag&drop API at the drop-event on bookmarks in the toolbar, creating new bookmark

Kind: static method of toolbar

ParamTypeDescription
eventobjectEvent-Object

toolbar.bookmark_drop_new_toolbox(event)

Function for use in the drag&drop API at the drop-event on bookmarks in the toolbox, creating new bookmark

Kind: static method of toolbar

ParamTypeDescription
eventobjectEvent-Object

Open Dialog to create new Bookmark in toolbar

Kind: static method of toolbar

ParamTypeDescription
linkstringPre-entered value for the link
titlestringPre-entered value for the title
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} for which the new bookmark is created, defaults to currently selected Veranstaltung-Object

Open Dialog to create new Bookmark in toolbox

Kind: static method of toolbar

ParamTypeDescription
linkstringPre-entered value for the link
titlestringPre-entered value for the title
groupnumberIndex of group in which to insert the new Bookmark, defaults to 0

toolbar.editBookmark(bookmark, additionalObj, callback)

Open Dialog to change existing Bookmark in toolbar

Kind: static method of toolbar

ParamTypeDescription
bookmarkobjectBookmark-Object as used in toolbar and toolbox
bookmark.titlestringPrevious title of the bookmark
bookmark.linkstringPrevious link of the bookmark
additionalObjobjectadditional info
additionalObj.typestringtype of bookmark, used for updating eLP.config.tags; 'toolbar'
additionalObj.groupnumbergroup-index if additionalObj.type == 'toolbox'
additionalObj.elpidstringid of veranstaltung if additionalObj.type == 'veranstToolbar'
additionalObj.bookmarknumberindex of bookmark
callbackfunctionCallback-function to execute after dialog is closed

toolbar.mergeFunction(origArray, addedArray) ⇒ Array

Special way of merging two arrays, elements with same arguments name and link will be left intact, other new elements will be added, other old elements will be removed To be used for using the new array but leaving changes (e.g. hide-settings) intact

Kind: static method of toolbar
Returns: Array - Altered array, generally the same as origArray

ParamTypeDescription
origArrayArray | *Array to merge onto, if not an array will be used as first element in new array
addedArrayArray | *Array to merge into origArray, if not an array will be used as first element in new array

toolbar.create(veranst)

Create/update toolbar

Kind: static method of toolbar

ParamTypeDescription
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to use toolbar-links and the selected bildungseinrichtung of, defaults to currently selected Veranstaltung-Object, otherwise to eLP.toolbar and eLP.config.bildungseinrichtung

toolbar.createToolbox(veranst)

Create and update the toolbox-view

Kind: static method of toolbar

ParamTypeDescription
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to update the view to, defaults to currently selected Veranstaltung-Object
createToolbox~arrayBookmarks(array, toolbox) ⇒ string

Create HTML-String for carousel-items

Kind: inner method of createToolbox
Returns: string - HTML-String

ParamTypeDescription
arrayArrayArray to make carousel-items
toolboxbooleanIf true, prepare for toolbox-HTML, if false prepare for Veranstaltung-Links-HTML

eLP.sidebar : object

Namespace for the sidebar "ELP entdecken"

Kind: static namespace of eLP

sidebar.discoverChange(boolean)

Hide/Show buttons to show sidebar, changing eLP.config.discover If hiding and sidebar is open, hide sidebar

Kind: static method of sidebar

ParamTypeDescription
booleanbooleanValue to use and set eLP.config.discover to, defaults to eLP.config.discover

sidebar.create()

Create a sidebar, removing a previous one if existing

Kind: static method of sidebar

create~createPage(object)

Create a page for the sidebar, output in array "pages", no return-value

Kind: inner method of create

ParamTypeDescription
objectobjectObject with parameters to create Page with

sidebar.show(targetId)

Change sidebar to a specified subpage, unhiding sidebar and if necessary creating the sidebar via eLP.sidebar.create();

Kind: static method of sidebar

ParamTypeDescription
targetIdstringIf string, the key under which the content can be found in eLP.sidebar
If it doesn't find targetId, tries again with 'sidebar-' + targetId or 'sidebar-start'

eLP.settings : object

Namespace for settings-View

Kind: static namespace of eLP

eLP.infothek : object

infothek-related Namespace

Kind: static namespace of eLP

infothek.listen : object

Object of all (dynamic, listjs) infothek-lists Standard-Lists: -"infothek-activities-methodlist" -"infothek-exams-methods" -"infothek-exams-tasks-questionliste" -"infothek-apps-applist" -"infothek-resources-mediarights-oer-list"

Kind: static property of infothek

infothek.listoptionen : object

Options of the list with same key in eLP.infothek.listen

Kind: static property of infothek

infothek.create() ⇒ Promise

Initialize the infothek, processing infothek/menu.json and building the html, afterwards calling eLP.infothek.createIntern to setup the javascript functionality and dynamic lists

Kind: static method of infothek
Returns: Promise - Promise to be resolved when infothek-html is build AND eLP.infothek.createIntern is finished

infothek.parseSubmenu(submenu, prevFile, prevId, prevPath, promiseChain) ⇒ object

Parse submenu from menu.json as part of eLP.infothek.create

Kind: static method of infothek
Returns: object - Object.result = html-String of parsed submenu, Object.promiseChain is new promiseChain-end

ParamTypeDescription
submenuArraySubmenu entries
prevFilestringPath of previous file
prevIdstringId of previous menu/submenu-entry
prevPathArray.<string>Paths of previous entries
promiseChainPromisePromise to append the processing of each submenu-entry to

infothek.createInfothekPane(options) ⇒ string

Return html-String of pane for infothek

Kind: static method of infothek
Returns: string - html-String for the infothek-pane

ParamTypeDescription
optionsobjectOptions-Object, with:
options.idstringId of the pane
options.classstringclassName of the pane
options.languagestringlanguage of the pane, defaults to eLP.config.language
options.pfadArray.<string>langkeys to create the breadcrumb from
options.filestringpath to the file to create the pane from, either markdown or html format
options.typestringIdentifying the file-type, "md" for markdown, defaults to html-file

infothek.createIntern()

Setup the javascript functionality and dynamic lists in infothek, usually called from inside eLP.infothek.create

Kind: static method of infothek

infothek.toListjsObject(beforeObj, panelid, additionalobj) ⇒ object

Convert Object from resources-format (e.g. methoden) to the Listjs-specification

Kind: static method of infothek
Returns: object - Object in Listjs-format

ParamTypeDescription
beforeObjArrayArray of resources to be converted
panelidstringhtml-id for the panel, make sure to be unique
additionalobjobjectObject of additional information to overwrite resources-array values

infothek.getFilterOptions(filtertype, liste) ⇒ string

Get the options for the specified filter in that list

Kind: static method of infothek
Returns: string - html-String of the filter-options

ParamTypeDescription
filtertypestringType of the filter
listeobjectListe to generate the options from

infothek.getFilterOptionsForTaxonomy(model) ⇒ string

Get select-options for a given taxonomymodel (first dimension only)

Kind: static method of infothek
Returns: string - html-String of the filter-options

ParamTypeDescription
modelstringTaxonomy-Model

infothek.updateListen(bildungseinrichtung, language)

Update the infothek lists, with new bildungseinrichtung and/or language

Kind: static method of infothek

ParamTypeDescription
bildungseinrichtungstringbildungseinrichtung-shortname
languagestringnew language of the list-elements

infothek.infothekListenFilterInit(element)

Initialize the filters for a specific infothek-list

Kind: static method of infothek

ParamTypeDescription
element*jQuery-Selector or NodeElement containing the filters (elements with class 'filter') to be initialized

infothek.getFiltervalues(element) ⇒ Array

Get currently selected filters and search

Kind: static method of infothek
Returns: Array - Array of Objects with the filtervalues, Object.filtertype holds the type of the filter, Object.value holds the value of the filter, specifically for the taxonomy-filter Object.taxmodell holds the selected taxonomy model

ParamTypeDescription
element*jQuery-Selector or NodeElement whose descendant filters and search to parse

infothek.updateFilterBreadcrumbs(element, filtervalues)

Updates the Filter-Breadcrumbs (which can be clicked to quickly clear them)

Kind: static method of infothek

ParamTypeDescription
element*jQuery-Selector or NodeElement whose descendant filters and to parse and insert into the descendant with class 'filter-breadcrumb'
filtervaluesArrayFiltervalues to use for the Filter-Breadcrumbs, defaults to callin eLP.infothek.getFiltervalues on element

infothek.changeBildungseinrichtung(bildung)

Change the bildungseinrichtung only for the infothek, handles updating all dynamic lists and update bildungseinrichtung-specific changes to the infothek

Kind: static method of infothek

ParamTypeDescription
bildungstringBildungseinrichtung-shortname

infothek.ensureShowingOfItem(target)

Ensure/Enforce to show a given target, given as id of the panel, in a list

Kind: static method of infothek

ParamTypeDescription
targetstringID-String of the target-panel to show

eLP.core : object

Main Namespace for the planning tool

Kind: static namespace of eLP

core.createCommunity()

Setup the community-tab with the information from eLP.resources.bildungseinrichtungen

Kind: static method of core

core.createLernportalBildungseinrichtungen()

Setup the bildungseinrichtungen-tab with the information from eLP.resources.bildungseinrichtungen

Kind: static method of core

core.openTerminDialog(prevTermin, callback)

Open the dialog to let the user input an dates-object

Kind: static method of core

ParamTypeDescription
prevTerminArrayPrevious dates object to be supplied as default and used as "new" when aborted
callbackfunctionFunction to call with the new dates-object as first parameter
openTerminDialog~updateCount()

Update count-element

Kind: inner method of openTerminDialog

openTerminDialog~newRow(termin) ⇒ string

Create HTML-String for new row

Kind: inner method of openTerminDialog
Returns: string - HTML-String for new row

ParamTypeDescription
terminobjectTermin-object to make new row for
newRow~checkWeekday(day) ⇒ boolean

Check if given day is same as variable weekdayPuffer

Kind: inner method of newRow
Returns: boolean - Return if given day is same as variable weekdayPuffer

ParamTypeDescription
dayobjectDay-Object, important is function day.getDay()
newRow~updateCountRow()

Update count in new row

Kind: inner method of newRow

core.datesToArray(termine) ⇒ Array

Convert dates-format to an array of each date as String

Kind: static method of core
Returns: Array - Array of Strings with the specific days in momentjs-format 'DD.MM.YYYY', timeframes are arrays of two strings themselfes

ParamTypeDescription
termineArrayDates-format, if not Array cast to Array, allows to run on each entry in dates alone

core.datesToOutput(termine) ⇒ Array

Convert dates-format to a special output-format, usually called by eLP.core.datesToHtmlRows, eLP.core.datesToHtmlTable, eLP.core.datesToPdf

Kind: static method of core
Returns: Array - Three-dimensional array in the special output-format: First dimension for each "row" in the dates-format Second dimension for each information specifying the "row" Third dimension to differentiate header and value First value is an Object representing the header Second value is an Object representing the value of this information for the "row"

ParamTypeDescription
termineArrayArray in the dates-format

core.datesToHtmlRows(termine, leaveSpaceForButton) ⇒ string

Convert dates-format to a html-String utilizing bootstrap-rows

Kind: static method of core
Returns: string - html-String that represents termine utilizing bootstrap-rows

ParamTypeDescription
termineArrayArray in dates-format to convert to html-String
leaveSpaceForButtonstringString to insert as own row in the end, especially used to insert a button which opens the terminDialog again

core.datesToHtmlTable(termine, withoutCountComplete) ⇒ string

Convert dates-format to a html-String for a table (insert into the table-Element) CAREFUL! For now depends on header being the same across similar values, like termin (single) vs termin1 & termin2 (weekly) Special handling for row if its only header is { langkey: 'datecount-complete' } by making it into tfooter

Kind: static method of core
Returns: string - HTML-String representing termine as theader and tbody

ParamTypeDescription
termineArrayArray in dates-format to convert to html-String
withoutCountCompletebooleanIf true, don't print extra-row with count-complete

core.datesToPdf(termin, layout) ⇒ Array

Convert dates-format to the pdfmake-format

Kind: static method of core
Returns: Array - Array in pdfmake-format

ParamTypeDescription
terminArrayArray in dates-format
layoutstringIf 'text' prepare for use in stacks, if 'table' prepare for use in tables -> createPdf
datesToPdf~objectToText(obj) ⇒ string

Make object simplified to Name: if obj.langkey translate, else obj.text else obj itself

Kind: inner method of datesToPdf
Returns: string - Text-Representation

ParamTypeDescription
objobject | stringObject to get Text-Representation for

core.oldDateToDates(date) ⇒ Array

Convert legacy-versions of date to dates (date format was only used in the testing stage)

Kind: static method of core
Returns: Array - Array in dates-format

ParamTypeDescription
dateobjectObject in date-format

core.oldTerminToDates(rhythmus, termine) ⇒ Array

Convert legacy-versions of rhythmus + termine to dates

Kind: static method of core
Returns: Array - Array in new dates format

ParamTypeDescription
rhythmusstringString of a number representing the rhythmus
termineobjectObject in old termine-format

core.calcDatesCount(dates) ⇒ number

Calculates the amount of dates in a Dates-Array, ignoring dates.count

Kind: static method of core
Returns: number - Amount of dates in dates

ParamTypeDescription
datesArrayDates-Array to calculate amount of dates from

core.findDateInDates(dates, date, id) ⇒ object

Search for Date-Object with a specific date in Dates-Array

Kind: static method of core
Returns: object - Date-Object

ParamTypeDescription
datesArrayDates-Array to search in
datestring | object | ArrayDate in 'DD.MM.YYYY' format or moment-Object or Array of either for timeframe
idnumberId to find correct Date-Object if multiple apply at the same day, defaults to 0

core.findDateDuplicateId(terminid, veranst) ⇒ number

Get duplicate-ID to use in eLP.core.findDateInDates

Kind: static method of core
Returns: number - duplicate-ID

ParamTypeDescription
terminidnumberterminid for termin in veranst.terminplanung
veranstobjectveranstaltung to look in

core.decipherTaxonomyLevel(level, dim, standard, veranst) ⇒ string

Get the human readable representation/name of selected taxonomy level, potentially multiple if multiple selections are allowed, only for one dimension

Kind: static method of core
Returns: string - Human-readable Name of the selected Taxonomy, or an empty string

ParamTypeDescription
levelArray.<Array.<string>> | Array.<string> | stringID(s) of select(ed) level(s) for one dimension, depending on taxonomy model there can be multiple selections resulting in an Array of IDs
dimstringWhen the taxonomy model uses multiple dimensions, select the dimension to look for, defaults to first dimension (in array-order)
standardstringTaxonomy model to be used, defaults to veranstaltung.taxonomien.standard or 'anderson'
veranstobjectThe [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to get the taxonomy-model from, especially important if a custom model is requested as those are only saved with a Veranstaltung-Object

core.defaultTaxonomy(standard) ⇒ Array.<Array.<string>> | Array.<string> | string

Generate the default selection for the taxonomy standard

Kind: static method of core
Returns: Array.<Array.<string>> | Array.<string> | string - ID of selected level, depending on taxonomy model there can be multiple selections and/or multiple dimensions resulting in one- or two-dimensional Arrays of IDs; if a dimension is allowed to be empty the default selection for it is an empty Array

ParamTypeDescription
standardstringTaxonomy model to be used, defaults to veranstaltung.taxonomien.standard or 'anderson'
defaultTaxonomy~getEarliestIdNotDisabled(dimension) ⇒ Array

Get earliest ID for a level of a dimension, that is not disabled

Kind: inner method of defaultTaxonomy
Returns: Array - ID of earliest not-disabled level in the dimension, if all are disabled, default to first id

ParamTypeDescription
dimensionobjectDimension-Object to look in

core.getTaxonomy(taxmodell, veranst) ⇒ object

Get a Taxonomy Model Object, from eLP.resources.taxonomy, eLP.config.taxonomies or the given Veranstaltung-Object

Kind: static method of core
Returns: object - Taxonomy-Model Object

ParamTypeDescription
taxmodellstringThe taxonomy model to be used, defaults to veranst.taxonomien.standard or 'anderson'
veranstobjectThe [Veranstaltung-Object]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to get the taxonomy-model from, especially important if a custom model is requested as those are only saved in a Veranstaltung-Object

core.getTaxonomyDimension(dim, taxmodell, veranst) ⇒ object

Get an Taxonomy Dimension Object, based on eLP.core.getTaxonomy

Kind: static method of core
Returns: object - Dimension-Object

ParamTypeDescription
dimstringID for dimension, defaults to 0
taxmodellstringThe taxonomy model to be used, defaults to veranst.taxonomien.standard or 'anderson'
veranstobjectThe [Veranstaltung-Object]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to get the taxonomy-model from, especially important if a custom model is requested as those are only saved in a Veranstaltung-Object

core.getTaxonomyLevels(level, dim, taxmodell, veranst) ⇒ object

Get an Taxonomy Level Object

Kind: static method of core
Returns: object - Level-Object

ParamTypeDescription
levelstringID of level, defaults to 0
dimstringID of dimension if there are multiple dimensions, defaults to 0
taxmodellstringThe taxonomy model to be used, defaults to veranst.taxonomien.standard or 'anderson'
veranstobjectThe [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to get the taxonomy-model from, especially important if a custom model is requested as those are only saved with a Veranstaltung-Object

core.newVerId() ⇒ string

Generate a random 4-digit hexadecimal number and avoiding already used numbers to use for [Veranstaltungs-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} IDs, avoiding those already in use (locally)

Kind: static method of core
Returns: string - 4-digit hexadecimal number as String

core.newVeranstaltung() ⇒ object

Get a new, with minimum-default settings pre-filled [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}

Kind: static method of core
Returns: object - Veranstaltung-Object

core.newVeranstaltungTermin() ⇒ object

Get a new, with minimum-default settings pre-filled [Veranstaltung-Termin-Objekt]{@tutorial Spezielle-Formate-Terminobjekt}

Kind: static method of core
Returns: object - Veranstaltung-Termin-Object

core.newVeranstaltungTerminPhase() ⇒ object

Get a new, with minimum-default settings pre-filled [Veranstaltung-Termin-Phase-Objekt]{@tutorial Spezielle-Formate-Phaseobjekt}

Kind: static method of core
Returns: object - Veranstaltung-Termin-Phase-Object

core.changeBildungseinrichtung(bildungseinrichtung, veranst)

Change bildungseinrichtung and load appropriatly altered resources

Kind: static method of core

ParamTypeDescription
bildungseinrichtungstringBildungseinrichtung-shortname specifying which bildungseinrichtung is newly loaded
veranstobjectIf provided or defaulting to currently selected veranstaltung, change bildungseinrichtung for this [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, otherwise change bildungseinrichtung for portfolio, if false do NOT default to selected veranstaltung, instead always change portfolio-bildungseinrichtung

core.changeLanguage(language, veranst)

Change language, load appropriate resources new and translate the page

Kind: static method of core

ParamTypeDescription
languagestringLanguage-key to select ('de'
veranstobjectChange standard-kompetenzen for provided [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object or null

core.translate(langkey, language, veranst) ⇒ string

Translate from eLP.resources.languageKeys or eLP.resources.bildungseinrichtungen[bildungseinrichtung][language], resolving placeholder $langkey^ and &veranstaltung.path|eLP.path|default&

Kind: static method of core
Returns: string - Found translation or empty string

ParamTypeDescription
langkeystring | object | ArrayFind the translation with this key, if Object use langkey.langkey, if Array try each entry and return first successfull translation
languagestringString for the target language, defaults to eLP.config.language
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, important if placeholder resolves to a path in veranstaltung (should only happen when a Veranstaltung-Object has been selected), defaults to currently selected Veranstaltung-Object

core.translateAll(language, veranst, elem)

Translate all elements with translate-classes with eLP.core.translate() The translate-classes are:

  • 'translate' to translate the innerHTML, langkey to use is elem.data-langkey
  • 'translatetitle' to translate the title-attribute, langkey to use is elem.data-titlekey
  • 'translateplaceholder' to translate the placeholder-attribute, langkey to use is elem.data-placeholderkey In addition also changes localization for flatpickr, timepicker and the vex cancel-button

Kind: static method of core

ParamTypeDescription
languagestringTarget-Language ('de'
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to pass to eLP.core.translate(), defaults to selected Veranstaltung
elem*jQuery-Selector or nodeElement to translate all descendants from, defaults to 'body'

core.newMaterial(defaultValues, callback)

Open Dialog to create new material in eLP.config.materials

Kind: static method of core

ParamTypeDescription
defaultValuesobjectObject with default values, if any
defaultValues.linkstringPre-entered value for the link
defaultValues.titlestringPre-entered value for the title
callbackfunctioncallback-function, first argument: new id

core.editMaterial(materialId, callback)

Open Dialog to change existing material in eLP.config.materials

Kind: static method of core

ParamTypeDescription
materialIdnumberid of material in eLP.config.materials
callbackfunctionCallback-function to execute after dialog is closed

core.showMaterial(materialId)

Open Dialog to show material in eLP.config.materials

Kind: static method of core

ParamTypeDescription
materialIdnumberid of material in eLP.config.materials

core.getLicenses(additionalLicenses) ⇒ Array

Get array of default Creative Commons Licenses and custom licenses in materials

Kind: static method of core
Returns: Array - Array of Creative-Commons-Licenses and custom licenses in materials

ParamTypeDescription
additionalLicensesstring | Arrayadditional License(s) to add to the Array after the CC-Licenses but before other custom licenses

core.createBreadcrumb(target)

Create Breadcrumb in element with id 'breadcrumb'

Kind: static method of core

ParamTypeDescription
targetobjectCurrently selected tab-pane

Generate HTML for sidebar-link

Kind: inner method of createBreadcrumb
Returns: string - HTML for sidebar-link

ParamTypeDescription
linkstringLink indicating targeted sidebar-panel

core.createKacheln(elem)

Create Dashboard-"Kacheln"

Kind: static method of core

ParamTypeDescription
elemobjectNodeElement in which to create the Dashboard-Kacheln Expected to have class 'row'

core.getComputedData(data, bildungseinrichtung, language) ⇒ object

Get and combine the general data.json and the data.json from bildungseinrichtung Uses eLP.storage.puffer[data] if data specified and both language and bildungseinrichtung are currently selected

Kind: static method of core
Returns: object - Combined data-Object with general and bildungseinrichtung-specific data

ParamTypeDescription
datastringRequested type of data
bildungseinrichtungstringBildungseinrichtung to request from, defaults to veranstaltung.config.bildungseinrichtung or eLP.config.bildungseinrichtung or '-1'
languagestringLanguage-String, defaults to eLP.config.language or 'de'

core.init(ohneStorage)

Initialize eLP-settings from default settings, supplied get-parameters and localStorage

Kind: static method of core

ParamTypeDescription
ohneStoragebooleanIf truthy, ignore portfolio in localStorage Does NOT ignore localStorage[language]

core.reset()

Reset portfolio-related settings to an empty/new state Calls eLP.storage.storageFunction() afterwards

Kind: static method of core

core.updatePlaner(terminkey, lehreinheitkey, reloadSelect, veranst)

Update the planer-view, including each sub-view

Kind: static method of core

ParamTypeDescription
terminkeynumberPassed as parameter with same name to eLP.core.updateTermine
lehreinheitkeynumberPassed as parameter with same name to eLP.core.updateTermine
reloadSelectbooleanPassed as parameter with same name to eLP.core.updateTermine
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to update the planer-view to, defaults to currently selected Veranstaltung-Object

core.updateOverview(veranst)

Update the full Overview-view

Kind: static method of core

ParamTypeDescription
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to update view to, defaults to currently selected Veranstaltung-Object

core.updateTermine(terminkey, lehreinhkey, reloadSelect, veranst)

Update the content-planning-view

Kind: static method of core

ParamTypeDescription
terminkeynumberID of currently selected termin in veranst
lehreinhkeynumberID of currently selected lehreinheit, in currently selected termin in veranst
reloadSelectbooleanPassed as parameter with same name to eLP.core.updateTabsTermin
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to update the view to, defaults to currently selected Veranstaltung-Object

core.updateKompetenzen(veranst)

Update the competence-part of the organization-view

Kind: static method of core

ParamTypeDescription
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to update the view to, defaults to currently selected Veranstaltung-Object

core.createSettings(veranst)

Create and update the settings-view

Kind: static method of core

ParamTypeDescription
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to update the view to, defaults to currently selected Veranstaltung-Object
createSettings~arrayBookmarks(array, type, standard) ⇒ string

Create HTML-String for carousel-items

Kind: inner method of createSettings
Returns: string - HTML-String

ParamTypeDescription
arrayArrayArray to make carousel-items
typestringString identifying which type of bookmark it is, mandatory for linkid
standardbooleanIf truthy, do not allow deleting of bookmarks

core.createMaterials()

Populate and update the list of materials on #nav-materials
Includes initializing/updating filters

Kind: static method of core

core.materialsInit(listContainer)

Initialize materials-list and associated functions/eventlisteners

Kind: static method of core

ParamTypeDescription
listContainerobjectcontainer-element for List
materialsInit~makeItem(item) ⇒ string

Create HTML-String for list-item

Kind: inner method of materialsInit
Returns: string - HTML-String

ParamTypeDescription
itemobjectlist-item to make html of

core.materialsFilterUpdate()

Populate the options of select-filters for materialsList

Kind: static method of core

core.materialsListBreadcrumbs()

Update breadcrumbs for materialsList-filter

Kind: static method of core

core.createTags()

Populate and update the list of tags at #nav-tags

Kind: static method of core

core.tagsDialog(presetFilter)

Open dialog to jump to tag-locations

Kind: static method of core

ParamTypeDescription
presetFilterobjectPreset filters

core.updateTags()

Update eLP.config.tags: first empty then search exhaustivly through every veranstaltung

Kind: static method of core

updateTags~addTag(key, object)

Add tag to eLP.config.tag

Kind: inner method of updateTags

ParamTypeDescription
keystringString-key for the tag
objectobjectPath-Object for the tag

core.updateTagSelects()

Update all tag-selects (rahmenbedingungen, termin, lehreinheit, subcontent) with current eLP.config.tags

Kind: static method of core

core.updateTaxonomy(veranst)

Update changes to taxonomy-model and taxonomy-selections across different views, including the shareauswahl-modal

Kind: static method of core

ParamTypeDescription
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with the selected taxonomy-model and selections, defaults to currently selected Veranstaltung-Object

core.updateButtonsTaxonomy(element, veranst)

Update the buttons to select a taxonomy-model

Kind: static method of core

ParamTypeDescription
elementobjectNodeElement where the buttons are added as children
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with currently selected taxonomy-model, defaults to currently selected Veranstaltung-Object

core.updateRahmenbedingungen(veranst)

Create and update the organization-view

Kind: static method of core

ParamTypeDescription
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to update the view to, defaults to currently selected Veranstaltung-Object

core.createSelectTaxonomie(element, veranst)

Create select-elements for currently selected taxonomy model for use in content-planning -> phase

Kind: static method of core

ParamTypeDescription
elementobjectNodeElement to create select-elements as children of, expected to be row[data-rowtype='objective'] > div
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with taxonomy model and previously-selected values, defaults to currently selected Veranstaltung-Object

core.createVerbs(element, veranst)

Create verbs-buttons depending on selected taxonomy, for use in content-planning -> phase -> objective

Kind: static method of core

ParamTypeDescription
elementobjectNodeElement to create verb-buttons as children of
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with taxonomy model and previously-selected values, defaults to currently selected Veranstaltung-Object
createVerbs~btngroup(level, dimension) ⇒ string

Create HTML-String of the button-group and verbs to make

Kind: inner method of createVerbs
Returns: string - HTML-String

ParamTypeDescription
levelobjectTaxonomy-Level-Object to make verbs for
dimensionobjectTaxonomy-Dimension-Object containing the level-object

core.createProgressBarTaxonomy(element, altTax, veranst)

Create progress-bar for a taxonomy model, if multiple categories are in the model, always use first

Kind: static method of core

ParamTypeDescription
elementobjectNodeElement to create progress-bar in
altTaxstringTaxonomy model, defaults to veranst.taxonomien.standard
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with taxonomy model, defaults to currently selected Veranstaltung-Object

core.createProgressBarLernstand(element, veranst)

Create progress-bar for lernstand

Kind: static method of core

ParamTypeDescription
elementobjectNodeElement to create progress-bar in
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with lernstand, defaults to currently selected Veranstaltung-Object

core.createProgressBarStatus(element, veranst)

Create progress-bar for status

Kind: static method of core

ParamTypeDescription
elementobjectNodeElement to create progress-bar in
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with status, defaults to currently selected Veranstaltung-Object

core.createTableKompetenzen(element, veranst)

Create table-content for competences, part of organization-view

Kind: static method of core

ParamTypeDescription
elementobjectNodeElement of the table-element
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with taxonomy model, defaults to currently selected Veranstaltung-Object

core.checkTerminplanung(veranst) ⇒ boolean

Ensure that terminplanung-Array and reflexion-Array of [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} is according to the model

Kind: static method of core
Returns: boolean - If true, terminplanung-Array or reflexion-Array had to be fixed at least once

ParamTypeDescription
veranstobjectVeranstaltung-Object whose terminplanung-Array and reflexion-Array are to be checked and potentially fixed, defaults to currently selected Veranstaltung-Object

core.checkVeranstaltung(veranst) ⇒ boolean

Ensure that [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} is according to the model

Kind: static method of core
Returns: boolean - If true, Veranstaltung-Object had to be fixed at least once

ParamTypeDescription
veranstobjectVeranstaltung-Object that is to be checked and potentially fixed, defaults to currently selected Veranstaltung-Object

core.fixDates(rahmen) ⇒ number

Fix dates-Objects in the given Rahmenbedingungen-Object (part of [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt})

  • Fix old formats to current format
  • Calculate and set dates.count if undefined

Kind: static method of core
Returns: number - Approximate number of changes performed

ParamTypeDescription
rahmenobjectRahmenbedingungen-Object, as part of Veranstaltung-Object

core.highestTaxonomyReached(veranst) ⇒ number

Get highest taxonomy-level reached in phases with objectiveactive

Kind: static method of core
Returns: number - Highest taxonomy-level reached

ParamTypeDescription
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object

core.highestTaxonomyReachedDate(date, veranst) ⇒ number

Highest taxonomy-level reached at a specific date

Kind: static method of core
Returns: number - Highest taxonomy-level reached on the date

ParamTypeDescription
datenumberID of the date as part of the Terminplanung-Array of Veranstaltung-Object
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object

core.countTaxonomyDateBadge(taxonomy, date, veranst) ⇒ number

Count how often the specific taxonomy-level is selected on the specific date, only consideres first taxonomy-category

Kind: static method of core
Returns: number - Count

ParamTypeDescription
taxonomynumberID of the taxonomy to check
datenumberID of the date as part of the Terminplanung-Array of [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}
veranstobjectVeranstaltung-Object, defaults to currently selected Veranstaltung-Object

core.countTaxonomyOverviewBadge(taxonomy, veranst) ⇒ number

Count how often the specific taxonomy-level is selected over the whole Terminplanung-Array, only considers first taxonomy-category

Kind: static method of core
Returns: number - Count

ParamTypeDescription
taxonomynumberID of the taxonomy to check
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object

core.gesamtLehreinheit(veranst) ⇒ number

Count all Phase-Array-lengths across the Terminplanung-Array of an [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}

Kind: static method of core
Returns: number - Count

ParamTypeDescription
veranstobjectVeranstaltung-Object, defaults to currently selected Veranstaltung-Object

core.dateNumbering(terminid, veranst) ⇒ number

Provide human readable number for date in veranstaltung, excluding timeframes

Kind: static method of core
Returns: number - Count

ParamTypeDescription
terminidnumberID of date in terminplanung
veranstobjectVeranstaltung-Object, defaults to currently selected Veranstaltung-Object

core.createNavTermin(element, activetermin, veranst)

Create the navigation for dates in Terminplanung-Array, part of content-planning-view

Kind: static method of core

ParamTypeDescription
elementobjectNodeElement of the Navigation, expected to be list-Element with data-navtype="termin"
activeterminnumberWhich date is the currently active one, caps at length of dates, defaults to 1
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object

core.createNavReflexTermin(element, terminkey, veranst)

Create the navigation for dates in Reflexion-Array, part of reflexion-view

Kind: static method of core

ParamTypeDescription
elementobjectNodeElement of the Navigation, expected to be list-Element with data-navtype="reflextermin"
terminkeynumberWhich date is the currently active one, caps at length of dates, defaults to 1
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object

core.navwidth(navtype) ⇒ number

Get the maximum amount of elements in the date- and phase-navigations visible at once

Kind: static method of core
Returns: number - Maximum amount of elements

ParamTypeDescription
navtypestringType of navigation, currently 'lehreinheit' has special values

core.navScroll(nav, key, dontTrigger)

Scroll date- or phase-navigation to an active element

Kind: static method of core

ParamTypeDescription
navobjectNodeElement of the navigation or NodeElement in the navigation
keynumberID of the active element, always ensures that's visible
dontTriggerbooleanIf truthy, skip triggering the active element

core.updateTabsTermin(element, activetermin, activephase, reloadSelect, veranst)

Update all date-tabs in content-planning-view

Kind: static method of core

ParamTypeDescription
elementobjectNodeElement of the panel-body with the content-planning view
activeterminnumberWhich date is the currently active one, caps at length of dates, defaults to 1
activephasenumberWhich phase is the currently active one in the currently active date, caps at length of phases in the date, defaults to 1
reloadSelectbooleanForces to reload all selects
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object

core.checkOrder(lehreinh) ⇒ object

Modify lehreinh.order-array to remove not-active and duplicates (in reverse order)

Kind: static method of core
Returns: object - Lehreinheit-Object with modified order

ParamTypeDescription
lehreinhobjectLehreinheit-Object
lehreinh.orderArrayArray to modify

core.updatePhaseRowOrder(element, termin, lehreinh, veranst)

Update order of PhaseRows to the specified order in a [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}

Kind: static method of core

ParamTypeDescription
elementobjectNodeElement of the tab-content with tabtype "termin", of descendent or of ancestor of said NodeElement (looked up in this order, only first hit is used)
terminnumberWhich date is the currently active one, caps at length of terminplanung, defaults to 0
lehreinhnumberWhich phase is the currently active one in the currently active date, caps at length of phases in the date, defaults to 0
veranstobjectVeranstaltung-Object, defaults to currently selected Veranstaltung-Object

core.checkSubcontentOrder(subcontent, row) ⇒ object

Modify subcontent-array to remove duplicates

Kind: static method of core
Returns: object - subcontent-Object with modified order

ParamTypeDescription
subcontentobjectsubcontent-Object
rowstringspecify which subcontent in the object (subcontent[row])

core.updateSubContentOrder(element, termin, lehreinh, row, veranst)

Update order of subcontents to the specified order in a [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}

Kind: static method of core

ParamTypeDescription
elementobjectNodeElement of the tab-content with tabtype "termin", of descendent or of ancestor of said NodeElement (looked up in this order, only first hit is used)
terminnumberWhich date is the currently active one, caps at length of terminplanung, defaults to 0
lehreinhnumberWhich phase is the currently active one in the currently active date, caps at length of phases in the date, defaults to 0
rowstringWhich subcontent order in the phase has to be updated, defaults to 'phasecontent'
veranstobjectVeranstaltung-Object, defaults to currently selected Veranstaltung-Object

core.makeCKEditorForActive(termin, lehreinheit, veranst)

Make all CKEditor in active or given termin

Kind: static method of core

ParamTypeDescription
terminnumberWhich date is the currently active one, caps at length of terminplanung, defaults to 1
lehreinheitnumberWhich phase is the currently active one in the currently active date, caps at length of phases in the date, defaults to 1
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object

core.createPaneLehreinh(element, terminindex, lehreinhindex, veranst)

Update all lehreinheit-Panels for a date in content-planning-view

Kind: static method of core

ParamTypeDescription
elementobjectNodeElement of the panel-body with the content-planning view
terminindexnumberWhich date is the currently active one, defaults to 1
lehreinhindexnumberWhich phase is the currently active one in the currently active date, caps at length of phases in the date, defaults to 1
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object

core.createTabReflex(element, terminkey, veranst)

Create and update the content-planning-view

Kind: static method of core

ParamTypeDescription
elementobjectNodeElement of the panel-body with the content-planning view
terminkeynumberWhich date is the currently active one, defaults to 1
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently

core.createOverviewRahmenbedingungen(veranst)

Create and update the Rahmenbedinugunen-view

Kind: static method of core

ParamTypeDescription
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currentl

core.createOverviewKompetenzen(veranst)

Show the overview of competences which have an outcome

Kind: static method of core

ParamTypeDescription
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently

core.createOverviewTerminplanung(veranst)

Create and show the overview of the content-planning

Kind: static method of core

ParamTypeDescription
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently

core.createPDF(options, callback, veranst)

Create pdf to an [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}

Kind: static method of core

ParamTypeDescription
optionsobjectSettings-Object
options.lehrplanbooleanShow small-print "Lehrplan"
options.orientationstring'portrait'
options.layoutstring'table'
options.coverstringIf truthy, pass to convertHtmlToPdf and use that output for the first page, disabling default cover-page
options.tocbooleanIf truthy, print table of contents
options.rinstitutebooleanInclude institute in PDF
options.rstudiengangbooleanInclude studiengang in PDF
options.rfacultybooleanInclude faculty in PDF
options.rnrbooleanInclude event number in PDF
options.rtypbooleanInclude event type in PDF
options.rnamebooleanInclude event name in PDF
options.rdatesbooleanInclude dates, date rhythm and time in overview in PDF
options.rbeschreibungbooleanInclude the instructional context in PDF
options.rgesamtzielbooleanInclude the overall objective
options.kompetenzenbooleanInclude competences
options.phasecontentbooleanInclude the content description for each phase
options.tphasebooleanIf truthy, include the phase-header for content planning; only relevant if ttermindatephase falsy
options.tterminbooleanIf truthy, include the date-header for content planning; only relevant if ttermindatephase and ttermindate falsy
options.tdatebooleanIf truthy, include the date of a session for content planning; only relevant if ttermindatephase and ttermindate falsy
options.tthemabooleanInclude the topic of the session
options.tcategorybooleanInclude the category of a session
options.tbreakbooleanInclude break-phases
options.tzeitbooleanInclude the start- and endtime of phases
options.ttechnikbooleanInclude devices
options.ttaxzielbooleanInclude both taxonomy-values and outcomes; if truthy, ignore ttax and tziel
options.ttaxbooleanInclude selected taxonomy levels of phases; only relevant if ttaxziel falsy
options.tzielbooleanInclude learning outcomes; only relevant if ttaxziel falsy
options.tmethodebooleanInclude learning method; only relevant if tmethodeaktiv falsy
options.tappsbooleanInclude applications
options.tmaterialsbooleanInclude materials
options.taktivbooleanInclude learning activities; only relevant if tmethodeaktiv falsy
options.tmethodeaktivbooleanInclude both learning method and learning outcome; if truthy, ignore tmethode and taktiv
options.tpmethodebooleanInclude assessment methods; only relevant if tpmethodebesch falsy
options.tpmethodebeschbooleanInclude assessment method and the description of the learning success test in the PDF; if truthy, ignore tpmethode and tpruefung
options.tpruefungbooleanInclude the description of the learning success; only relevant if tpmethodebesch is falsy
options.tpruefungsfragebooleanInclude assessment tasks
options.tarbeitsblattbooleanInclude the worksheet in the PDF
options.turlbooleanInclude linked URLs in the PDF
options.tfeedbackbooleanInclude linked Feedback-Systems in the PDF
options.tliteraturebooleanInclude the literature list in the PDF
options.notizenbooleanInclude the notes in the PDF
options.rreflexionterminbooleanInclude the reflection of each session in the PDF
options.rreflexiongesamtbooleanInclude the reflection for the whole class in the PDF
callbackfunctionFunction to call when createPDF finished
veranstobjectVeranstaltung-Object, defaults to currently selected Veranstaltung-Object

core.createPDFCollection(options, callback, altCollection)

Create pdf to an Collection, including all [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} included

Kind: static method of core

ParamTypeDescription
optionsobjectSettings-Object
options.lehrplanbooleanShow small-print "Lehrplan"
options.orientationstring'portrait'
options.layoutstring'table'
options.coverstringIf truthy, pass to convertHtmlToPdf and use that output for the first page, disabling default cover-page
options.tocbooleanIf truthy, print table of contents
options.rinstitutebooleanInclude institute in PDF
options.rstudiengangbooleanInclude studiengang in PDF
options.rfacultybooleanInclude faculty in PDF
options.rnrbooleanInclude event number in PDF
options.rtypbooleanInclude event type in PDF
options.rnamebooleanInclude event name in PDF
options.rdatesbooleanInclude dates, date rhythm and time in overview in PDF
options.rbeschreibungbooleanInclude the instructional context in PDF
options.rgesamtzielbooleanInclude the overall objective
options.kompetenzenbooleanInclude competences
options.phasecontentbooleanInclude the content description for each phase
options.tphasebooleanIf truthy, include the phase-header for content planning; only relevant if ttermindatephase falsy
options.tterminbooleanIf truthy, include the date-header for content planning; only relevant if ttermindatephase and ttermindate falsy
options.tdatebooleanIf truthy, include the date of a session for content planning; only relevant if ttermindatephase and ttermindate falsy
options.tthemabooleanInclude the topic of the session
options.tcategorybooleanInclude the category of a session
options.tbreakbooleanInclude break-phases
options.tzeitbooleanInclude the start- and endtime of phases
options.ttechnikbooleanInclude devices
options.ttaxzielbooleanInclude both taxonomy-values and outcomes; if truthy, ignore ttax and tziel
options.ttaxbooleanInclude selected taxonomy levels of phases; only relevant if ttaxziel falsy
options.tzielbooleanInclude learning outcomes; only relevant if ttaxziel falsy
options.tmethodebooleanInclude learning method; only relevant if tmethodeaktiv falsy
options.tappsbooleanInclude applications
options.tmaterialsbooleanInclude materials
options.taktivbooleanInclude learning activities; only relevant if tmethodeaktiv falsy
options.tmethodeaktivbooleanInclude both learning method and learning outcome; if truthy, ignore tmethode and taktiv
options.tpmethodebooleanInclude assessment methods; only relevant if tpmethodebesch falsy
options.tpmethodebeschbooleanInclude assessment method and the description of the learning success test in the PDF; if truthy, ignore tpmethode and tpruefung
options.tpruefungbooleanInclude the description of the learning success; only relevant if tpmethodebesch is falsy
options.tpruefungsfragebooleanInclude assessment tasks
options.tarbeitsblattbooleanInclude the worksheet in the PDF
options.turlbooleanInclude linked URLs in the PDF
options.tfeedbackbooleanInclude linked Feedback-Systems in the PDF
options.tliteraturebooleanInclude the literature list in the PDF
options.notizenbooleanInclude the notes in the PDF
options.rreflexionterminbooleanInclude the reflection of each session in the PDF
options.rreflexiongesamtbooleanInclude the reflection for the whole class in the PDF
callbackfunctionFunction to call when createPDF finished
altCollectionobjectCollection-Object, defaults to eLP.collections[0]

core.createDoc(options, callback, veranst)

Create text-document to an [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} Soon-ish will be .docx-document, for now an old .doc-document

Kind: static method of core

ParamTypeDescription
optionsobjectSettings-Object
options.lehrplanbooleanShow small-print "Lehrplan"
options.orientationstring'portrait'
options.layoutstring'table'
options.coverstringIf truthy, pass to convertHtmlToPdf and use that output for the first page, disabling default cover-page
options.tocbooleanIf truthy, print table of contents
options.rinstitutebooleanInclude institute in PDF
options.rstudiengangbooleanInclude studiengang in PDF
options.rfacultybooleanInclude faculty in PDF
options.rnrbooleanInclude event number in PDF
options.rtypbooleanInclude event type in PDF
options.rnamebooleanInclude event name in PDF
options.rdatesbooleanInclude dates, date rhythm and time in overview in PDF
options.rbeschreibungbooleanInclude the instructional context in PDF
options.rgesamtzielbooleanInclude the overall objective
options.kompetenzenbooleanInclude competences
options.phasecontentbooleanInclude the content description for each phase
options.tphasebooleanIf truthy, include the phase-header for content planning; only relevant if ttermindatephase falsy
options.tterminbooleanIf truthy, include the date-header for content planning; only relevant if ttermindatephase and ttermindate falsy
options.tdatebooleanIf truthy, include the date of a session for content planning; only relevant if ttermindatephase and ttermindate falsy
options.tthemabooleanInclude the topic of the session
options.tcategorybooleanInclude the category of a session
options.tbreakbooleanInclude break-phases
options.tzeitbooleanInclude the start- and endtime of phases
options.ttechnikbooleanInclude devices
options.ttaxzielbooleanInclude both taxonomy-values and outcomes; if truthy, ignore ttax and tziel
options.ttaxbooleanInclude selected taxonomy levels of phases; only relevant if ttaxziel falsy
options.tzielbooleanInclude learning outcomes; only relevant if ttaxziel falsy
options.tmethodebooleanInclude learning method; only relevant if tmethodeaktiv falsy
options.tappsbooleanInclude applications
options.tmaterialsbooleanInclude applications
options.taktivbooleanInclude learning activities; only relevant if tmethodeaktiv falsy
options.tmethodeaktivbooleanInclude both learning method and learning outcome; if truthy, ignore tmethode and taktiv
options.tpmethodebooleanInclude assessment methods; only relevant if tpmethodebesch falsy
options.tpmethodebeschbooleanInclude assessment method and the description of the learning success test in the PDF; if truthy, ignore tpmethode and tpruefung
options.tpruefungbooleanInclude the description of the learning success; only relevant if tpmethodebesch is falsy
options.tpruefungsfragebooleanInclude assessment tasks
options.tarbeitsblattbooleanInclude the worksheet in the PDF
options.turlbooleanInclude linked URLs in the PDF
options.tfeedbackbooleanInclude linked Feedback-Systems in the PDF
options.tliteraturebooleanInclude the literature list in the PDF
options.notizenbooleanInclude the notes in the PDF
options.rreflexionterminbooleanInclude the reflection of each session in the PDF
options.rreflexiongesamtbooleanInclude the reflection for the whole class in the PDF
callbackfunctionFunction to call when createDoc finished
veranstobject[Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object

core.saveVeranstaltung(veranst, defaultName)

Save [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} as json-File

Kind: static method of core

ParamTypeDescription
veranstobject | stringVeranstaltung-Object or key of one to save
defaultNamestringString to use as defaultName-parameter for eLP.core.getVeranstaltungTitle, defaults to eLP.core.translate('save_defaultname')

core.saveCollection(collection, defaultName)

Save Collection-Object as json-File

Kind: static method of core

ParamTypeDescription
collectionobject | stringCollection-Object or key of one to save
defaultNamestringString to use if collection.name is falsy, defaults to eLP.core.translate('save_defaultname')

core.checkChildrenCheckboxType1(elem)

To use on input-checkbox which has "children"-checkboxes in the ul-element next after the parent element, checks the "children"-checkbox to change properties "checked" and "indeterminate" for "parent"-checkbox Afterwards calls eLP.core.checkChildrenCheckboxType2 on sibling-checkbox with nth-type(2) of elem

Kind: static method of core

ParamTypeDescription
elemobject | stringNodeElement(s) or jQuery-Selector of "parent"-checkboxes

core.checkChildrenCheckboxType2(elem)

To use on secondary "parent"-checkbox which has "children"-checkboxes in the ul-element next after the parent element, only consideres secondary checkboxes if appropriate primary checkbox is checked, if no primary checkbox is checked, disables elem

Kind: static method of core

ParamTypeDescription
elemobject | stringNodeElement(s) or jQuery-Selector of secondary "parent"-checkboxes

core.deleteVeranst(veranstId)

Delete [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, looking through collections to delete there too and fixing Veranstaltungsliste-view and Calendar-view

Kind: static method of core

ParamTypeDescription
veranstIdstringID of Veranstaltung-Object to delete

core.selectVeranst(veranstId, stay)

Select [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}

Kind: static method of core

ParamTypeDescription
veranstIdstringID of Veranstaltung-Object to select
staybooleanIf falsy, change to rahmenbedingungen-view after selecting the Veranstaltung-Object

core.deselectVeranst()

De-Select currently selected [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}

Kind: static method of core

core.createVeranst(opts)

Create new [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} by opening a vex-dialog

Kind: static method of core

ParamTypeDescription
optsobjectOptions-Object with pre-selected Values
opts.startobject | *Moment-Object or moment-castable value, to use as start-date and -time, defaults to current time
opts.endobject | *Moment-Object or moment-castable value, to use as end-date and -time, defaults to current time plus 2 hours
opts.collectionstringKey for Collection-Object in eLP.collections of which the new Veranstaltung-Object is part of

core.editVeranst(veranst)

Open vex-dialog to change [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}

Kind: static method of core

ParamTypeDescription
veranstobjectVeranstaltung-Object to change, defaults to currently selected Veranstaltung-Object

core.veranstChangeDates(newDates, veranst)

Change the Dates-Object in the Veranstaltung-Object and apply appropriate changes to Terminplanung-Array:

  • Terminplanung-Array is at least dates.count long
  • Termin.termine becomes nth-entry in eLP.core.datesToArray(dates)
  • Starttime of first phase in each Termin-Object becomes appropriate date.time1
  • Endtime of last phase in each Termin-Object becomes appropriate date.time2

Kind: static method of core

ParamTypeDescription
newDatesobjectNew Dates-Object
veranstobjectVeranstaltung-Object, defaults to currently selected Veranstaltung-Object

core.createCollection()

Create new Collection-Object, append it to eLP.collections and update Veranstaltungsliste-view

Kind: static method of core

core.getVeranstaltungTitle(veranst, defaultName) ⇒ string

Get (short) title of [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, uses name or nummer or defaultName

Kind: static method of core
Returns: string - (Short) title of the Veranstaltung-Object

ParamTypeDescription
veranstobjectVeranstaltung-Object, defaults to currently selected Veranstaltung-Object
defaultNamestringString to use if Veranstaltung-Object doesn't specify name or nummer, defaults to 'Veranstaltung'

core.getVeranstaltungTitleFull(veranst) ⇒ string

Get full title of [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to eLP.core.translate('lecture')

Kind: static method of core
Returns: string - Full title of the Veranstaltung-Object

ParamTypeDescription
veranstobjectVeranstaltung-Object, defaults to currently selected Veranstaltung-Object

eLP.calendar : object

Namespace for the Calendar-view of loaded Veranstaltungen

Kind: static namespace of eLP

calendar.$ : object

fullCalendar-instance on the Calendar-view

Kind: static property of calendar

calendar.fillCollections(element)

Fill collections-list and free-events-list in Veranstaltungsliste-view

Kind: static method of calendar

ParamTypeDescription
elementobject | stringNodeElement or jQuery-Selector of NodeElement, defaults to the body-element