Function
Static Public Summary | ||
public |
The landing page for activities. |
|
public |
ActivityList(setGoToActivity: function): Object Component for making the activity list in main menu |
|
public |
Method for making avatar |
|
public |
AvatarHappySticker(props: Object): Object Round sticker with happy user avatar |
|
public |
BackSquareButton(props: Object): Object Component displaying a square "back" button. |
|
public |
BaseDrawingButton(props: Object): Object The base button used in the drawing and free text menu. |
|
public |
BaseRoundButtonShadow(props: Object): Object Component representing the base for a round button with shadow. |
|
public |
BaseRoundSticker(props: Object): Object An ImageWrapper component containing a sticker |
|
public |
BaseSquareButton(props: Object): Object Component representing the base for a square button with shadow. |
|
public |
BaseSquareButtonLeftIcon(props: Object): Object Component representing the base for a square button with shadow. |
|
public |
BookShelfStickerSvgr(props: Object): Object SVGR component depicting a bookshelf sticker. |
|
public |
ClearAllButton(props: Object): Object The button clicked when clearing the drawing. |
|
public |
CloseIconSvgr(props: Object): Object SVGR component representing a round "close" icon. |
|
public |
CloseRoundButton(props: Object): Object Close button, round button with shadow |
|
public |
ColorSelectorHorizontal(props: Object): Object The menu used to select a color, with horizontal scroll. |
|
public |
ConfirmationBoxOverlay(props: Object): Object Component displaying an overlay on a view with a confirmation box. |
|
public |
ConfirmationMenu(props: Object): Object Menu shown when user is exiting, prompting user to save the drawing |
|
public |
DateCalendar(props: Object): Object Component that display the date with year, month, day and weekday like on single page single day calendars |
|
public |
DeleteSquareButton(props: Object): Object Component displaying a square "delete" button. |
|
public |
DetailsIconSvgr(props: Object) SVGR component representing a round "see details" icon. |
|
public |
DetailsRoundButton(props: Object): Object Details button, round button with shadow |
|
public |
DiaryCover(): Object Front cover of the diary |
|
public |
Component displaying the right page of the diary with all the answers to assessment for an activity session. |
|
public |
View showing the diary |
|
public |
DrawButton(props: Object): Object The button clicked when activating the pen. |
|
public |
Component displaying the drawing made by the user, on a diary page. |
|
public |
DrawingDetails(props: Object): Object Detailed view of drawing |
|
public |
DrawingView(setShowDrawingView: boolean): Object The view where the user can draw. |
|
public |
EraserButton(props: Object): Object The button to activate the eraser. |
|
public |
EraserIconSvgr(props: Object): Object SVGR component depicting an eraser. |
|
public |
Component for each face in Grading. |
|
public |
FontColorButton(props: Object): Object The button to change the color of the font. |
|
public |
FontColorIconSvgr(props: Object): Object SVGR component representing the "font color" symbol. |
|
public |
Component displaying the free text element on the diary page. |
|
public |
FreeTextDetails(props: Object): Object Detailed view of free text |
|
public |
FreeTextView(setShowFreeText: function): Object The view where the user can write free text. |
|
public |
GradingCard(props: Object): Object Component displaying the front size of a grading card. |
|
public |
GradingCardBack(props: Object): Object Component displaying the backside of a grading card in the diary. |
|
public |
GradingsOverview(props: Object): Object Component displaying an overview of all answers to questions related to an activity. |
|
public |
Header of the diary. |
|
public |
Component displaying the header of the journal, with info on the user currently logged in and logout button. |
|
public |
HelperAvatar(props: Object): Object Returns the avatar of the lion with the given expression. |
|
public |
HomeIconSvgr(props: Object): Object SVGR component depicting the round "home" icon. |
|
public |
HomeRoundButton(props: Object): Object Home round button with shadow |
|
public |
ImageWrapper(props: Object): Object Wrapper for image. |
|
public |
InfoBoxOverlay(props: Object): Object Component displaying an overlay on a view with an information box and a single close button |
|
public |
JournalAlertBoxOverlay(props: Object): Object Component displaying an overlay view with alert box for login to journal. |
|
public |
JournalAssessmentScreen(props: Object): Object View displaying an assessment on an activity session in the journal. |
|
public |
JournalButton(props: Object, label: string, style: Object): Object Component displaying a square button for the journal module, with the specified label. |
|
public |
JournalLoginView(props: Object): Object Component displaying the login page of the journal. |
|
public |
JournalView(props: Object): Object Component displaying the landing view of the journal module, after successfull login. |
|
public |
LabelTextInput(props: Object): Object Component displaying the label of a text input. |
|
public |
LeftArrowSvgr(props: Object): Object SVGR component representing an arrow pointing to the left. |
|
public |
The left side menu of FreeTextView and DrawingView. |
|
public |
LionCuriousHelpSvgr(props: Object): Object SVGR component depicting a lion that looks curious. |
|
public |
LionDoubtWarningSvgr(props: Object): Object SVGR component depicting a lion that looks in doubt, with a warning sign on its overalls. |
|
public |
LionHappyHelpSvgr(props: Object): Object SVGR component depicting a happy lion with a question mark on its overall. |
|
public |
LionRestingSvgr(props: Object): Object SVGR component depicting a lion resting and in laying position. |
|
public |
LionSatisfiedHelpSvgr(props: Object): Object SVGR component depicting a satisfied lion with a question mark on its overall. |
|
public |
LionSittingHelpSvgr(props: Object): Object SVGR component depicting a lion with a question mark on its overall, in sitting posture. |
|
public |
LionThumbUpHelpSvgr(props: Object): Object SVGR component depicting a lion with a thumb up, and a question mark on its overall. |
|
public |
LionThumbUpSvgr(props: Object): Object SVGR component depicting a lion with a thumb up. |
|
public |
LockIconSvgr(props: Object): Object SVGR component representing a lock. |
|
public |
LoginSquareButton(props: Object): Object Component displayin a square login button |
|
public |
The assessment menu where the user can go to Grading, Freetext, Drawing or back to StartView. |
|
public |
Makes an icon in the assessment menu. |
|
public |
NavNextPage(props: Object): Object Diary menu bar to navigate to next page. |
|
public |
NavPreviousPage(props: Object): Object Diary menu bar to navigate to previous page. |
|
public |
NavToStart(props: Object): Object Component displaying the menu to navigate to the cover page. |
|
public |
NextIconSvgr(props: Object): Object SVGR component representing the "next" round icon |
|
public |
NextRoundButton(props: Object): Object Next button, round with shadow |
|
public |
NotificationText(props: Object): Object Component displaying a notification message. |
|
public |
OkIconSvgr(props: Object): Object SVGR component representing the "ok" round icon. |
|
public |
OkRoundButton(props: Object): Object Ok button, round button with shadow |
|
public |
Component displaying the title of a diary page. |
|
public |
PaperColorButton(props: Object): Object The button to change the color of the paper. |
|
public |
PaperColorIconSvgr(props: Object): Object SVGR component representing the "paper color" symbol. |
|
public |
PenIconSvgr(props: Object): Object SVGR component representing the "pen" symbol. |
|
public |
PhotoCornerBottomLeft(props: Object): Object SVGR component depicting the bottom left photo corner. |
|
public |
PhotoCornerBottomRight(props: Object): Object SVGR component depicting a bottom right photo corner. |
|
public |
PhotoCornerTopLeft(props: Object): Object SVGR component depicting the top left photo corner. |
|
public |
PhotoCornerTopRight(props: Object): Object SVGR component depicting the top right photo corner. |
|
public |
PictureActivity(props: Object): Object Component displaying the picture of the activity with photo corners. |
|
public |
PreviousIconSvgr(props: Object): Object SVGR component representing the "previous" round icon |
|
public |
PreviousRoundButton(props: Object): Object "Previous" round button with shadow |
|
public |
RedCrossIconSvgr(props: Object): Object SVGR component representing a red cross symbol. |
|
public |
SafeAreaWrapper(props: Object): Object SafeArea Wrapper |
|
public |
SaveAlertBoxOverlay(props: Object): Object Component displaying an overlay on a view with an alert box. |
|
public |
SaveIconWhiteSvgr(props: Object): Object SVGR component representing the "save" symbol. |
|
public |
SaveSquareButton(props: Object): Object Component displaying a Square save button. |
|
public |
The Landing page showing the main menu |
|
public |
StrokeWidthIndicator(props: Object): Object Component displaying the size of the drawing stroke. |
|
public |
StrokeWidthSlider(props: Object): Object Component with slider controlling the width of the pen stroke, and an indicator displaying the stroke size. |
|
public |
SvgAnsiktIkkeLyst(props: Object): Object Not happy face |
|
public |
SvgAnsiktLittLyst(props: Object): Object Medium happy face |
|
public |
SvgAnsiktVeldigLyst(props: Object): Object Happy face |
|
public |
SvgAvatarIkkeLyst(props: Object): Object Not happy avatar |
|
public |
SvgAvatarLittLyst(props: Object): Object Medium happy avatar |
|
public |
SvgAvatarVeldigLyst(props: Object): Object Very happy avatar |
|
public |
SvgAvatarVetIkke(props: Object): Object Unsure avatar |
|
public |
Component representing a cell in a table. |
|
public |
TableTitle(props: Object): Object Component displaying the title cell of a table. |
|
public |
TeddyBearSticker(props: Object): Object SVGR component depicting a teaddy bear sticker. |
|
public |
ToDiaryButton(props: Object): Object Component representing the button to navigate to diary. |
|
public |
ToJournalButton(props: Object): Object Component representing the button to navigate to journal. |
|
public |
ToStartIconSvgr(props: Object): Object SVGR component representing the "back to start" round icon. |
|
public |
ToStartRoundButton(props: Object): Object "Go to start" button, round button with shadow |
|
public |
TrashIconSvgr(props: Object): Object SVGR component depicting a trash can symbol. |
|
public |
UndoButton(props: Object): Object The button to undo a drawing action. |
|
public |
UndoIconSvgr(props: Object): Object SVGR component representing the "undo" symbol. |
|
public |
If the activity is already defined, update it If the activity is not assessed, add assessment |
|
public |
Resets the assessment |
|
public |
convertDate(dateString: string): string[] Convert a date in ISO format to an array of strings containing weekDay, day, month and year. |
|
public |
formatTitleAndName(name: string): string Return the title of the diary with the specified name as part of the title. |
|
public |
getActivity(activityId: number): Object Returns activity with given id |
|
public |
Returns the activity create date |
|
public |
Returns the activity id |
|
public |
Returns the activity type |
|
public |
getAllActivites(): Object[] Return all activites |
|
public |
getAllQuestions(id: number): string[] Returns all questions |
|
public |
getAssessment(assessmentID: number): Object Gets the assessment with given assessmentID |
|
public |
Returns the assessment object |
|
public |
Returns the assessment id |
|
public |
getAssessments(): Object[] Gets all of the assessments in the user object |
|
public |
Function to convert CSS colors (first letter capitalized) to React colors (all lowercase) |
|
public |
getComment(): Object Returns the comment object |
|
public |
getDrawing(): string Returns the drawing path |
|
public |
getEmojiImage(grading: number): Object Get the source of the image of the emoji corresponding to the specified grading. |
|
public |
getFilename(id: number): string Gets the filename of activity picture |
|
public |
getGrading(): Object Returns the grading object |
|
public |
getIdFromUsername(username: string): number Looks for the given username in the database and returns the id if found. |
|
public |
Get the legend of the corresponding grading. |
|
public |
Returns the activity name |
|
public |
Returns the name of the activity type |
|
public |
getPicture(activityId: number): Object Returns the activity picture |
|
public |
getPicture(id: number): Object Returns the picture of the activity type |
|
public |
getPropertiesWithHelp(help: Object): Object[] Returns properties of the lion corresponding to the given help-object. |
|
public |
getQuestion(activityId: number, questionId: number): Object Returns question with given questoinIdd from activity with given activityId |
|
public |
getQuestion(id: number, questionId: number): Object Returns the question with the given activity type id and question id |
|
public |
Get the speech sound for the specified grading |
|
public |
Gets the image from the therapist object with given id |
|
public |
Gets the name of a therapist with given id |
|
public |
Gets the user object |
|
public |
handleLogin(username: String, setUsername: function, password: String, setPassword: function, therapistId: number, setTherapistId: function, setIsValidConnection: function, setShowErrorMsg: function, setGoToJournal: function): function Process the login and set the variables to the correct value. |
|
public |
handleLogout(setIsLoggedOut: function, setIsValidConnection: function, setGoToJournal: function): Object Set values to the given states to process log out. |
|
public |
Return properties of the help object with the given id |
|
public |
iosPlaySound(filename: string) Preferred way of playing sound on ios |
|
public |
Check if the given id is valid |
|
public |
isValidPassword(therapistId: number, password: string): boolean Checks if the given password is the correct password for the given therapist id. |
|
public |
Returns the number of assessmetns |
|
public |
numberOfQuestions(id: number): number Returns the number of questions |
|
public |
Plays the .wav soundfile corresponding to the filename. |
|
public |
setActivityCreateDate(date: Date) Sets the activityCreateDate |
|
public |
setActivityId(activityId: number) Sets the id of the Activity |
|
public |
setActivityType(activityType: Object) Sets the activity type |
|
public |
setAssessment(a: Object) Overwrite assessment. |
|
public |
setAssessmentId(id: number) Sets the id of the assessment |
|
public |
setBorderStyle(paperColor: string, styles: Object): Object[] Set the color of the border and add it to the specified style |
|
public |
setComment(content: string, textColor: string, paperColor: string) Sets the comment which consists of content, and colors. |
|
public |
setCreateDate(date: Date) Sets the createDate |
|
public |
setDrawing(drawing: string) Sets the drawing |
|
public |
setGrading(grading: Object) Sets the grading for a question. |
|
public |
smileyometerAnimationDelay(grading: boolean, comment: boolean, drawing: boolean): number[] Receives parts of assessment, and returns timer delay values based on true or false |
|
public |
Stops the currently playing sound. |
|
public |
timedEvent(func: function, time: number, id: number) A timed event. |
Static Public
public Activity(activity: Object, setGoToActivity: function): Object source
import Activity from 'aktivitetsmodulrn/src/views/assessment/ActivityView.js'
The landing page for activities.
public ActivityList(setGoToActivity: function): Object source
import ActivityList from 'aktivitetsmodulrn/src/views/startview/components/ActivityList.js'
Component for making the activity list in main menu
Params:
Name | Type | Attribute | Description |
setGoToActivity | function | If set to true, the user is redirected to ActivityView |
public Avatar(mood: number, full: boolean): Object source
import Avatar from 'aktivitetsmodulrn/src/components/avatar/Avatar.js'
Method for making avatar
public AvatarHappySticker(props: Object): Object source
import AvatarHappySticker from 'aktivitetsmodulrn/src/components/stickers/AvatarHappySticker.js'
Round sticker with happy user avatar
public BackSquareButton(props: Object): Object source
import BackSquareButton from 'aktivitetsmodulrn/src/components/buttons/BackSquareButton.js'
Component displaying a square "back" button.
public BaseDrawingButton(props: Object): Object source
import BaseDrawingButton from 'aktivitetsmodulrn/src/views/assessment/components/buttons/BaseDrawingButton.js'
The base button used in the drawing and free text menu.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.componentStyle | Object | The style of the button |
|
props.position | ButtonPosition | Positioning of the button |
|
props.onPress | function | Action for the button |
|
props.children | Object | Child components of the button |
public BaseRoundButtonShadow(props: Object): Object source
import BaseRoundButtonShadow from 'aktivitetsmodulrn/src/components/buttons/BaseRoundButtonShadow.js'
Component representing the base for a round button with shadow.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.buttonSize | RoundButtonSize | Size of the button |
|
props.componentStyle | Object | Styling of component |
|
props.onPress | function | Action to be executed when the button is pressedz |
|
props.children | Object | Content of the button |
public BaseRoundSticker(props: Object): Object source
import BaseRoundSticker from 'aktivitetsmodulrn/src/components/stickers/BaseRoundSticker.js'
An ImageWrapper component containing a sticker
public BaseSquareButton(props: Object): Object source
import BaseSquareButton from 'aktivitetsmodulrn/src/components/buttons/BaseSquareButton.js'
Component representing the base for a square button with shadow.
public BaseSquareButtonLeftIcon(props: Object): Object source
import BaseSquareButtonLeftIcon from 'aktivitetsmodulrn/src/components/buttons/BaseSquareButtonLeftIcon.js'
Component representing the base for a square button with shadow. Used in dialog boxes.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.icon | Object | Icon of the button |
|
props.label | string[] | Text label of the button |
|
props.componentStyle | Object | Styling of component |
|
props.labelStyle | Object | Styling of label |
|
props.onPress | function | Action to be executed when the button is pressed |
public BookShelfStickerSvgr(props: Object): Object source
import BookShelfStickerSvgr from 'aktivitetsmodulrn/src/assets/stickersSvgr/BookshelfStickerSvgr.js'
SVGR component depicting a bookshelf sticker.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public ClearAllButton(props: Object): Object source
import ClearAllButton from 'aktivitetsmodulrn/src/views/assessment/components/buttons/ClearAllButton.js'
The button clicked when clearing the drawing.
public CloseIconSvgr(props: Object): Object source
import CloseIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/CloseIconSvgr.js'
SVGR component representing a round "close" icon.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public CloseRoundButton(props: Object): Object source
import CloseRoundButton from 'aktivitetsmodulrn/src/components/buttons/CloseRoundButton.js'
Close button, round button with shadow
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.buttonSize | RoundButtonSize | Size of the button |
|
props.containerStyle | Object | Styling of the container |
|
props.onPress | function | Action to be executed when the button is pressed |
public ColorSelectorHorizontal(props: Object): Object source
import ColorSelectorHorizontal from 'aktivitetsmodulrn/src/views/assessment/components/ColorSelectorHorizontal.js'
The menu used to select a color, with horizontal scroll.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.showsPaperColorMenu | boolean | Whether or not the color of paper is to be changed |
|
props.showsBrushColorMenu | boolean | Whetehr or not the color of the brush is to be changed |
|
props.updatePaperColor | function | The function to change the color of the paper |
|
props.updateBrushColor | funciton | The function to change the color of the brush |
public ConfirmationBoxOverlay(props: Object): Object source
import ConfirmationBoxOverlay from 'aktivitetsmodulrn/src/components/dialogBoxes/ConfirmationBoxOverlay.js'
Component displaying an overlay on a view with a confirmation box. Contains a single ok button.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.message | string | Message displayed in the confirmation box. |
|
props.modalVisible | boolean | Defines if the overlay is shown. Shown if true |
|
props.onModalRequestCloseAction | function | Action to be executed when the device "back" button is pressed |
|
props.onPressOkButtonAction | function | Action to be executed when the ok button is pressed |
public ConfirmationMenu(props: Object): Object source
import ConfirmationMenu from 'aktivitetsmodulrn/src/views/assessment/components/ConfirmationMenu.js'
Menu shown when user is exiting, prompting user to save the drawing
public DateCalendar(props: Object): Object source
import DateCalendar from 'aktivitetsmodulrn/src/views/diary/components/DateCalendar.js'
Component that display the date with year, month, day and weekday like on single page single day calendars
public DeleteSquareButton(props: Object): Object source
import DeleteSquareButton from 'aktivitetsmodulrn/src/components/buttons/DeleteSquareButton.js'
Component displaying a square "delete" button.
public DetailsIconSvgr(props: Object) source
import DetailsIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/DetailsIconSvgr.js'
SVGR component representing a round "see details" icon.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public DetailsRoundButton(props: Object): Object source
import DetailsRoundButton from 'aktivitetsmodulrn/src/components/buttons/DetailsRoundButton.js'
Details button, round button with shadow
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.buttonSize | RoundButtonSize | Size of the button |
|
props.containerStyle | Object | Styling of the container |
|
props.onPress | function | Action to be executed when the button is pressed |
public DiaryCover(): Object source
import DiaryCover from 'aktivitetsmodulrn/src/views/diary/components/DiaryCover.js'
Front cover of the diary
public DiaryPage(): Object source
import DiaryPage from 'aktivitetsmodulrn/src/views/diary/components/DiaryPage.js'
Component displaying the right page of the diary with all the answers to assessment for an activity session. The page/assessment that is displayed is given by the context (page number).
public DiaryView(props: Object): Object source
import DiaryView from 'aktivitetsmodulrn/src/views/diary/DiaryView.js'
View showing the diary
public DrawButton(props: Object): Object source
import DrawButton from 'aktivitetsmodulrn/src/views/assessment/components/buttons/DrawButton.js'
The button clicked when activating the pen.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.position | ButtonPosition | Positioning of the button |
|
props.fillColor | string | Color to fill the tip of the pen |
|
props.onPress | function | Action for the button |
public Drawing(props: Object): Object source
import Drawing from 'aktivitetsmodulrn/src/views/diary/components/Drawing.js'
Component displaying the drawing made by the user, on a diary page.
- If none, displays a sticker instead.
- If drawing is not null, but not a valid name, a message saying that the drawing cannot be displayed will be shown.
public DrawingDetails(props: Object): Object source
import DrawingDetails from 'aktivitetsmodulrn/src/views/diary/components/DrawingDetails.js'
Detailed view of drawing
public DrawingView(setShowDrawingView: boolean): Object source
import DrawingView from 'aktivitetsmodulrn/src/views/assessment/drawing/DrawingView.js'
The view where the user can draw.
Params:
Name | Type | Attribute | Description |
setShowDrawingView | boolean | If set to false, user is redirected back to menu |
public EraserButton(props: Object): Object source
import EraserButton from 'aktivitetsmodulrn/src/views/assessment/components/buttons/EraserButton.js'
The button to activate the eraser.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.componentStyle | Object | The style of the button |
|
props.position | ButtonPosition | Positioning of the button |
|
props.onPress | function | Action for the button |
public EraserIconSvgr(props: Object): Object source
import EraserIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/EraserIconSvgr.js'
SVGR component depicting an eraser.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public Face(mood: number, question: number, setAnswered: function): Object source
import Face from 'aktivitetsmodulrn/src/views/assessment/grading/components/Face.js'
Component for each face in Grading.
public FontColorButton(props: Object): Object source
import FontColorButton from 'aktivitetsmodulrn/src/views/assessment/components/buttons/FontColorButton.js'
The button to change the color of the font.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.componentStyle | Object | The style of the button |
|
props.position | ButtonPosition | Positioning of the button |
|
props.fillColor | string | The active color of the font, used to color the icon |
|
props.onPress | function | Action for the button |
public FontColorIconSvgr(props: Object): Object source
import FontColorIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/FontColorIconSvgr.js'
SVGR component representing the "font color" symbol.
public FreeText(props: Object): Object source
import FreeText from 'aktivitetsmodulrn/src/views/diary/components/FreeText.js'
Component displaying the free text element on the diary page. If there is no free text, the image of a sticker is displayed instead.
public FreeTextDetails(props: Object): Object source
import FreeTextDetails from 'aktivitetsmodulrn/src/views/diary/components/FreeTextDetails.js'
Detailed view of free text
public FreeTextView(setShowFreeText: function): Object source
import FreeTextView from 'aktivitetsmodulrn/src/views/assessment/freetext/FreeTextView.js'
The view where the user can write free text.
Params:
Name | Type | Attribute | Description |
setShowFreeText | function | If set to false, the user is redirected back to menu |
public GradingCard(props: Object): Object source
import GradingCard from 'aktivitetsmodulrn/src/views/diary/components/GradingCardFront.js'
Component displaying the front size of a grading card. It displays the question number and the grad, shown with an emoticon having the corresponding mood.
public GradingCardBack(props: Object): Object source
import GradingCardBack from 'aktivitetsmodulrn/src/views/diary/components/GradingCardBack.js'
Component displaying the backside of a grading card in the diary.
public GradingsOverview(props: Object): Object source
import GradingsOverview from 'aktivitetsmodulrn/src/views/diary/components/GradingsOverview.js'
Component displaying an overview of all answers to questions related to an activity. The number of questions the user has answered to is also displayed.
public Header(props: Object): Object source
import Header from 'aktivitetsmodulrn/src/views/diary/components/Header.js'
Header of the diary.
public Header(props: Object): Object source
import Header from 'aktivitetsmodulrn/src/views/journal/components/Header.js'
Component displaying the header of the journal, with info on the user currently logged in and logout button.
public HelperAvatar(props: Object): Object source
import HelperAvatar from 'aktivitetsmodulrn/src/components/helper/HelperAvatar.js'
Returns the avatar of the lion with the given expression. Function (help, warning) is combined with expression to make it simple, but they should be separated in next version.
public HomeIconSvgr(props: Object): Object source
import HomeIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/HomeIconSvgr.js'
SVGR component depicting the round "home" icon.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public HomeRoundButton(props: Object): Object source
import HomeRoundButton from 'aktivitetsmodulrn/src/components/buttons/HomeRoundButton.js'
Home round button with shadow
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.buttonSize | RoundButtonSize | Size of the button |
|
props.containerStyle | Object | Styling of the container |
|
props.onPress | function | Action to be executed when the button is pressed |
public ImageWrapper(props: Object): Object source
import ImageWrapper from 'aktivitetsmodulrn/src/components/wrappers/ImageWrapper.js'
Wrapper for image.
public InfoBoxOverlay(props: Object): Object source
import InfoBoxOverlay from 'aktivitetsmodulrn/src/components/dialogBoxes/InfoBoxOverlay.js'
Component displaying an overlay on a view with an information box and a single close button
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.onModalRequestCloseAction | function | Action to be executed when the device "back" button is pressed |
|
props.onPressButtonAction | function | Action to be executed when close button is pressed |
|
props.modalVisible | boolean | Defines if the overlay is shown. Shown if true |
|
props.children | Object | Content of the information box |
public JournalAlertBoxOverlay(props: Object): Object source
import JournalAlertBoxOverlay from 'aktivitetsmodulrn/src/components/dialogBoxes/JournalAlertBoxOverlay.js'
Component displaying an overlay view with alert box for login to journal. Contains a button to go back to the previous view and another to login.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.onModalRequestCloseAction | function | Action to be executed when the device "back" button is pressed |
|
props.onPressOkButtonAction | function | Action to be executed when the ok button is pressed |
|
props.onPressCancelButtonAction | function | Action to be executed when the cancel button is pressed |
|
props.modalVisible | boolean | Defines if the overlay is shown. Shown if true |
public JournalAssessmentScreen(props: Object): Object source
import JournalAssessmentScreen from 'aktivitetsmodulrn/src/views/journal/AssessmentView.js'
View displaying an assessment on an activity session in the journal. It shows details about the assessment.
public JournalButton(props: Object, label: string, style: Object): Object source
import JournalButton from 'aktivitetsmodulrn/src/components/buttons/JournalButton.js'
Component displaying a square button for the journal module, with the specified label.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.lightness | ButtonLightness | Lightness of the color of the button |
|
props.length | ButtonLength | Length of the button |
|
label | string | Text label of the button |
|
style | Object | Styling of the component |
|
props.onPress | function | Action for the button |
public JournalLoginView(props: Object): Object source
import JournalLoginView from 'aktivitetsmodulrn/src/views/journal/JournalLoginView.js'
Component displaying the login page of the journal.
public JournalView(props: Object): Object source
import JournalView from 'aktivitetsmodulrn/src/views/journal/JournalView.js'
Component displaying the landing view of the journal module, after successfull login. Shows an overview of all assessments of the user that is logged in.
public LabelTextInput(props: Object): Object source
import LabelTextInput from 'aktivitetsmodulrn/src/views/journal/components/LabelTextInput.js'
Component displaying the label of a text input.
public LeftArrowSvgr(props: Object): Object source
import LeftArrowSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/LeftArrowSvgr.js'
SVGR component representing an arrow pointing to the left.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public LeftMenu(props: Object): Object source
import LeftMenu from 'aktivitetsmodulrn/src/views/assessment/components/LeftMenu.js'
The left side menu of FreeTextView and DrawingView.
public LionCuriousHelpSvgr(props: Object): Object source
import LionCuriousHelpSvgr from 'aktivitetsmodulrn/src/assets/helpSvgr/LionCuriousHelpSvgr.js'
SVGR component depicting a lion that looks curious.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public LionDoubtWarningSvgr(props: Object): Object source
import LionDoubtWarningSvgr from 'aktivitetsmodulrn/src/assets/helpSvgr/LionDoubtWarningSvgr.js'
SVGR component depicting a lion that looks in doubt, with a warning sign on its overalls.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public LionHappyHelpSvgr(props: Object): Object source
import LionHappyHelpSvgr from 'aktivitetsmodulrn/src/assets/helpSvgr/LionHappyHelpSvgr.js'
SVGR component depicting a happy lion with a question mark on its overall.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public LionRestingSvgr(props: Object): Object source
import LionRestingSvgr from 'aktivitetsmodulrn/src/assets/helpSvgr/LionRestingSvgr.js'
SVGR component depicting a lion resting and in laying position.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public LionSatisfiedHelpSvgr(props: Object): Object source
import LionSatisfiedHelpSvgr from 'aktivitetsmodulrn/src/assets/helpSvgr/LionSatisfiedHelpSvgr.js'
SVGR component depicting a satisfied lion with a question mark on its overall.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public LionSittingHelpSvgr(props: Object): Object source
import LionSittingHelpSvgr from 'aktivitetsmodulrn/src/assets/helpSvgr/LionSittingHelpSvgr.js'
SVGR component depicting a lion with a question mark on its overall, in sitting posture.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public LionThumbUpHelpSvgr(props: Object): Object source
import LionThumbUpHelpSvgr from 'aktivitetsmodulrn/src/assets/helpSvgr/LionThumbUpHelpSvgr.js'
SVGR component depicting a lion with a thumb up, and a question mark on its overall.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public LionThumbUpSvgr(props: Object): Object source
import LionThumbUpSvgr from 'aktivitetsmodulrn/src/assets/helpSvgr/LionThumbUpSvgr.js'
SVGR component depicting a lion with a thumb up.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public LockIconSvgr(props: Object): Object source
import LockIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/LockIconSvgr.js'
SVGR component representing a lock.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public LoginSquareButton(props: Object): Object source
import LoginSquareButton from 'aktivitetsmodulrn/src/components/buttons/LoginSquareButton.js'
Component displayin a square login button
public Menu(setGoToActivity: function): Object source
import Menu from 'aktivitetsmodulrn/src/views/assessment/menu/MenuView.js'
The assessment menu where the user can go to Grading, Freetext, Drawing or back to StartView.
Params:
Name | Type | Attribute | Description |
setGoToActivity | function | If set to false, the user is redirected back to main menu (StartView) |
public MenuIcon(delay: number, onPress: function, png: string): Object source
import MenuIcon from 'aktivitetsmodulrn/src/views/assessment/menu/components/MenuIcon.js'
Makes an icon in the assessment menu.
public NavNextPage(props: Object): Object source
import NavNextPage from 'aktivitetsmodulrn/src/views/diary/components/NavNextPage.js'
Diary menu bar to navigate to next page. Button is visible if props.isVisible is true.
public NavPreviousPage(props: Object): Object source
import NavPreviousPage from 'aktivitetsmodulrn/src/views/diary/components/NavPreviousPage.js'
Diary menu bar to navigate to previous page. Button and background image are displayed if the props.isVisible is true.
public NavToStart(props: Object): Object source
import NavToStart from 'aktivitetsmodulrn/src/views/diary/components/NavToStart.js'
Component displaying the menu to navigate to the cover page. Button is displayed if props.isVisible is true.
public NextIconSvgr(props: Object): Object source
import NextIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/NextIconSvgr.js'
SVGR component representing the "next" round icon
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public NextRoundButton(props: Object): Object source
import NextRoundButton from 'aktivitetsmodulrn/src/components/buttons/NextRoundButton.js'
Next button, round with shadow
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.buttonSize | RoundButtonSize | Size of the button |
|
props.containerStyle | Object | Styling of the container |
|
props.onPress | function | Action to be executed when the button is pressed |
public NotificationText(props: Object): Object source
import NotificationText from 'aktivitetsmodulrn/src/views/journal/components/NotificationText.js'
Component displaying a notification message. The style (color) depends on the type of notification.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.value | string | Text of the notification |
|
props.type | NotificationType | Type of notification |
public OkIconSvgr(props: Object): Object source
import OkIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/OkIconSvgr.js'
SVGR component representing the "ok" round icon.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public OkRoundButton(props: Object): Object source
import OkRoundButton from 'aktivitetsmodulrn/src/components/buttons/OkRoundButton.js'
Ok button, round button with shadow
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.buttonSize | RoundButtonSize | Size of the button |
|
props.containerStyle | Object | Styling of the container |
|
props.onPress | function | Action to be executed when the button is pressed |
public PageTitle(props: Object): Object source
import PageTitle from 'aktivitetsmodulrn/src/views/diary/components/PageTitle.js'
Component displaying the title of a diary page.
public PaperColorButton(props: Object): Object source
import PaperColorButton from 'aktivitetsmodulrn/src/views/assessment/components/buttons/PaperColorButton.js'
The button to change the color of the paper.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.componentStyle | Object | The style of the button |
|
props.position | ButtonPosition | Positioning of the button |
|
props.fillColor | string | The active color of the paper, used to color the icon |
|
props.onPress | function | Action for the button |
public PaperColorIconSvgr(props: Object): Object source
import PaperColorIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/PaperColorIconSvgr.js'
SVGR component representing the "paper color" symbol.
public PenIconSvgr(props: Object): Object source
import PenIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/PenIconSvgr.js'
SVGR component representing the "pen" symbol.
public PhotoCornerBottomLeft(props: Object): Object source
import PhotoCornerBottomLeft from 'aktivitetsmodulrn/src/assets/itemsSvgr/PhotoCornerBottomLeftSvgr.js'
SVGR component depicting the bottom left photo corner.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public PhotoCornerBottomRight(props: Object): Object source
import PhotoCornerBottomRight from 'aktivitetsmodulrn/src/assets/itemsSvgr/PhotoCornerBottomRightSvgr.js'
SVGR component depicting a bottom right photo corner.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public PhotoCornerTopLeft(props: Object): Object source
import PhotoCornerTopLeft from 'aktivitetsmodulrn/src/assets/itemsSvgr/PhotoCornerTopLeftSvgr.js'
SVGR component depicting the top left photo corner.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public PhotoCornerTopRight(props: Object): Object source
import PhotoCornerTopRight from 'aktivitetsmodulrn/src/assets/itemsSvgr/PhotoCornerTopRightSvgr.js'
SVGR component depicting the top right photo corner.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public PictureActivity(props: Object): Object source
import PictureActivity from 'aktivitetsmodulrn/src/views/diary/components/PictureActivity.js'
Component displaying the picture of the activity with photo corners.
public PreviousIconSvgr(props: Object): Object source
import PreviousIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/PreviousIconSvgr.js'
SVGR component representing the "previous" round icon
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public PreviousRoundButton(props: Object): Object source
import PreviousRoundButton from 'aktivitetsmodulrn/src/components/buttons/PreviousRoundButton.js'
"Previous" round button with shadow
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.buttonSize | RoundButtonSize | Size of the button |
|
props.containerStyle | Object | Styling of the container |
|
props.onPress | function | Action to be executed when the button is pressed |
public RedCrossIconSvgr(props: Object): Object source
import RedCrossIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/RedCrossIconSvgr.js'
SVGR component representing a red cross symbol.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public SafeAreaWrapper(props: Object): Object source
import SafeAreaWrapper from 'aktivitetsmodulrn/src/components/wrappers/SafeAreaWrapper.js'
SafeArea Wrapper
public SaveAlertBoxOverlay(props: Object): Object source
import SaveAlertBoxOverlay from 'aktivitetsmodulrn/src/components/dialogBoxes/SaveAlertBoxOverlay.js'
Component displaying an overlay on a view with an alert box. Contains a three buttons: cancel, delete changes, save changes.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.message | string | Message to be displayed in the alert box |
|
props.modalVisible | boolean | Defines if the overlay is shown. Shown if true |
|
props.onModalRequestCloseAction | function | Action to be executed when the device "back" button is pressed |
|
props.onPressCancelButtonAction | function | Action to be executed when the cancel button is pressed |
|
props.onPressSaveButtonAction | function | Action to be executed when the save button is pressed |
|
props.onPressDeleteButtonAction | function | Action to be executed when the delete button is pressed |
public SaveIconWhiteSvgr(props: Object): Object source
import SaveIconWhiteSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/SaveIconWhiteSvgr.js'
SVGR component representing the "save" symbol.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public SaveSquareButton(props: Object): Object source
import SaveSquareButton from 'aktivitetsmodulrn/src/components/buttons/SaveSquareButton.js'
Component displaying a Square save button.
public StartView(): Object source
import StartView from 'aktivitetsmodulrn/src/views/startview/StartView.js'
The Landing page showing the main menu
public StrokeWidthIndicator(props: Object): Object source
import StrokeWidthIndicator from 'aktivitetsmodulrn/src/views/assessment/drawing/components/StrokeWidthIndicator.js'
Component displaying the size of the drawing stroke.
public StrokeWidthSlider(props: Object): Object source
import StrokeWidthSlider from 'aktivitetsmodulrn/src/views/assessment/drawing/components/StrokeWidthSlider.js'
Component with slider controlling the width of the pen stroke, and an indicator displaying the stroke size.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.componentStyle | Object | The style for this component |
|
props.brushColor | string | The current color of the brush |
|
props.strokeWidth | number | The current width of the stroke |
|
props.minimumStrokeWidth | number | The minimum width of the stroke |
|
props.maximumStrokeWidth | number | The maximum width of the stroke |
|
props.updateStrokeWidth | function | Function to update stroke width |
public SvgAnsiktIkkeLyst(props: Object): Object source
import SvgAnsiktIkkeLyst from 'aktivitetsmodulrn/src/svgr-components/Ansikt_IkkeLyst.js'
Not happy face
Params:
Name | Type | Attribute | Description |
props | Object |
public SvgAnsiktLittLyst(props: Object): Object source
import SvgAnsiktLittLyst from 'aktivitetsmodulrn/src/svgr-components/Ansikt_LittLyst.js'
Medium happy face
Params:
Name | Type | Attribute | Description |
props | Object |
public SvgAnsiktVeldigLyst(props: Object): Object source
import SvgAnsiktVeldigLyst from 'aktivitetsmodulrn/src/svgr-components/Ansikt_VeldigLyst.js'
Happy face
Params:
Name | Type | Attribute | Description |
props | Object |
public SvgAvatarIkkeLyst(props: Object): Object source
import SvgAvatarIkkeLyst from 'aktivitetsmodulrn/src/svgr-components/Avatar_IkkeLyst.js'
Not happy avatar
Params:
Name | Type | Attribute | Description |
props | Object |
public SvgAvatarLittLyst(props: Object): Object source
import SvgAvatarLittLyst from 'aktivitetsmodulrn/src/svgr-components/Avatar_LittLyst.js'
Medium happy avatar
Params:
Name | Type | Attribute | Description |
props | Object |
public SvgAvatarVeldigLyst(props: Object): Object source
import SvgAvatarVeldigLyst from 'aktivitetsmodulrn/src/svgr-components/Avatar_VeldigLyst.js'
Very happy avatar
Params:
Name | Type | Attribute | Description |
props | Object |
public SvgAvatarVetIkke(props: Object): Object source
import SvgAvatarVetIkke from 'aktivitetsmodulrn/src/svgr-components/Avatar_VetIkke.js'
Unsure avatar
Params:
Name | Type | Attribute | Description |
props | Object |
public TableCell(props: Object): Object source
import TableCell from 'aktivitetsmodulrn/src/views/journal/components/TableCell.js'
Component representing a cell in a table.
public TableTitle(props: Object): Object source
import TableTitle from 'aktivitetsmodulrn/src/views/journal/components/TableTitle.js'
Component displaying the title cell of a table.
public TeddyBearSticker(props: Object): Object source
import TeddyBearSticker from 'aktivitetsmodulrn/src/assets/stickersSvgr/TeddyBearStickerSvgr.js'
SVGR component depicting a teaddy bear sticker.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public ToDiaryButton(props: Object): Object source
import ToDiaryButton from 'aktivitetsmodulrn/src/components/buttons/ToDiaryButton.js'
Component representing the button to navigate to diary.
public ToJournalButton(props: Object): Object source
import ToJournalButton from 'aktivitetsmodulrn/src/components/buttons/ToJournalButton.js'
Component representing the button to navigate to journal.
public ToStartIconSvgr(props: Object): Object source
import ToStartIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/ToStartIconSvgr.js'
SVGR component representing the "back to start" round icon.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public ToStartRoundButton(props: Object): Object source
import ToStartRoundButton from 'aktivitetsmodulrn/src/components/buttons/ToStartRoundButton.js'
"Go to start" button, round button with shadow
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.buttonSize | RoundButtonSize | Size of the button |
|
props.containerStyle | Object | Styling of the container |
|
props.onPress | function | Action to be executed when the button is pressed |
public TrashIconSvgr(props: Object): Object source
import TrashIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/TrashIconSvgr.js'
SVGR component depicting a trash can symbol.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public UndoButton(props: Object): Object source
import UndoButton from 'aktivitetsmodulrn/src/views/assessment/components/buttons/UndoButton.js'
The button to undo a drawing action.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
|
props.componentStyle | Object | The style of the button |
|
props.position | ButtonPosition | Positioning of the button |
|
props.onPress | function | Action for the button |
public UndoIconSvgr(props: Object): Object source
import UndoIconSvgr from 'aktivitetsmodulrn/src/assets/iconsSvgr/UndoIconSvgr.js'
SVGR component representing the "undo" symbol.
Params:
Name | Type | Attribute | Description |
props | Object | Properties |
public addAssessment() source
import {addAssessment} from 'aktivitetsmodulrn/src/database/UsersDAO.js'
If the activity is already defined, update it If the activity is not assessed, add assessment
public clearAssessment() source
import {clearAssessment} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Resets the assessment
public convertDate(dateString: string): string[] source
import {convertDate} from 'aktivitetsmodulrn/src/utils/FormatterUtils.js'
Convert a date in ISO format to an array of strings containing weekDay, day, month and year.
Params:
Name | Type | Attribute | Description |
dateString | string | A string with the date (YYY-MM-DD) |
public formatTitleAndName(name: string): string source
import {formatTitleAndName} from 'aktivitetsmodulrn/src/utils/FormatterUtils.js'
Return the title of the diary with the specified name as part of the title.
Params:
Name | Type | Attribute | Description |
name | string | The name to be formated |
public getActivity(activityId: number): Object source
import {getActivity} from 'aktivitetsmodulrn/src/database/ActivitiesDAO.js'
Returns activity with given id
Params:
Name | Type | Attribute | Description |
activityId | number | the id of the activity |
public getActivityCreateDate(): Date source
import {getActivityCreateDate} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Returns the activity create date
public getActivityId(): number source
import {getActivityId} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Returns the activity id
public getActivityType(): Object source
import {getActivityType} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Returns the activity type
public getAllActivites(): Object[] source
import {getAllActivites} from 'aktivitetsmodulrn/src/database/ActivitiesDAO.js'
Return all activites
public getAllQuestions(id: number): string[] source
import {getAllQuestions} from 'aktivitetsmodulrn/src/database/ActivityTypesDAO.js'
Returns all questions
Params:
Name | Type | Attribute | Description |
id | number | the activity id |
public getAssessment(assessmentID: number): Object source
import {getAssessment} from 'aktivitetsmodulrn/src/database/UsersDAO.js'
Gets the assessment with given assessmentID
Params:
Name | Type | Attribute | Description |
assessmentID | number | The id of the assessment that should be returned |
public getAssessment(): Object source
import {getAssessment} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Returns the assessment object
public getAssessmentId(): number source
import {getAssessmentId} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Returns the assessment id
public getAssessments(): Object[] source
import {getAssessments} from 'aktivitetsmodulrn/src/database/UsersDAO.js'
Gets all of the assessments in the user object
public getColors(): string[] source
import {getColors} from 'aktivitetsmodulrn/src/utils/ColorUtils.js'
Function to convert CSS colors (first letter capitalized) to React colors (all lowercase)
public getComment(): Object source
import {getComment} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Returns the comment object
public getDrawing(): string source
import {getDrawing} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Returns the drawing path
public getEmojiImage(grading: number): Object source
import {getEmojiImage} from 'aktivitetsmodulrn/src/utils/GradingScale.js'
Get the source of the image of the emoji corresponding to the specified grading.
Params:
Name | Type | Attribute | Description |
grading | number | The grading of the object contiaining the emoji |
public getFilename(id: number): string source
import {getFilename} from 'aktivitetsmodulrn/src/database/ActivityTypesDAO.js'
Gets the filename of activity picture
Params:
Name | Type | Attribute | Description |
id | number | the activity id |
public getGrading(): Object source
import {getGrading} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Returns the grading object
public getIdFromUsername(username: string): number source
import {getIdFromUsername} from 'aktivitetsmodulrn/src/database/TherapistsDAO.js'
Looks for the given username in the database and returns the id if found.
Params:
Name | Type | Attribute | Description |
username | string | username of therapist |
Return:
number | the id number if the therapist is found. -1 if username is empty string -2 if username is not found in the database. |
public getLegend(grading: number): string source
import {getLegend} from 'aktivitetsmodulrn/src/utils/GradingScale.js'
Get the legend of the corresponding grading.
Params:
Name | Type | Attribute | Description |
grading | number | The grading of the object contiaining the legend |
public getName(activityId: number): string source
import {getName} from 'aktivitetsmodulrn/src/database/ActivitiesDAO.js'
Returns the activity name
Params:
Name | Type | Attribute | Description |
activityId | number | id of activity |
public getName(id: number): string source
import {getName} from 'aktivitetsmodulrn/src/database/ActivityTypesDAO.js'
Returns the name of the activity type
Params:
Name | Type | Attribute | Description |
id | number | the activity id |
public getPicture(activityId: number): Object source
import {getPicture} from 'aktivitetsmodulrn/src/database/ActivitiesDAO.js'
Returns the activity picture
Params:
Name | Type | Attribute | Description |
activityId | number | id of activity |
public getPicture(id: number): Object source
import {getPicture} from 'aktivitetsmodulrn/src/database/ActivityTypesDAO.js'
Returns the picture of the activity type
Params:
Name | Type | Attribute | Description |
id | number | the activity id |
public getPropertiesWithHelp(help: Object): Object[] source
import {getPropertiesWithHelp} from 'aktivitetsmodulrn/src/objects/LionAvatars.js'
Returns properties of the lion corresponding to the given help-object.
Params:
Name | Type | Attribute | Description |
help | Object | Help object |
Return:
Object[] | Array containing the posture corresponding to the given parameter, and the image. Returns null if the paramter is undefined. |
public getQuestion(activityId: number, questionId: number): Object source
import {getQuestion} from 'aktivitetsmodulrn/src/database/ActivitiesDAO.js'
Returns question with given questoinIdd from activity with given activityId
public getQuestion(id: number, questionId: number): Object source
import {getQuestion} from 'aktivitetsmodulrn/src/database/ActivityTypesDAO.js'
Returns the question with the given activity type id and question id
public getSpeech(grading: number): string source
import {getSpeech} from 'aktivitetsmodulrn/src/utils/GradingScale.js'
Get the speech sound for the specified grading
Params:
Name | Type | Attribute | Description |
grading | number | The grading of the object contiaining the speech |
public getTherapistImageFromId(id: number): Object source
import {getTherapistImageFromId} from 'aktivitetsmodulrn/src/database/TherapistsDAO.js'
Gets the image from the therapist object with given id
Params:
Name | Type | Attribute | Description |
id | number | therapist id |
public getTherapistNameFromId(id: number): string source
import {getTherapistNameFromId} from 'aktivitetsmodulrn/src/database/TherapistsDAO.js'
Gets the name of a therapist with given id
Params:
Name | Type | Attribute | Description |
id | number | therapist id |
public getUser(): Object source
import {getUser} from 'aktivitetsmodulrn/src/database/UsersDAO.js'
Gets the user object
public handleLogin(username: String, setUsername: function, password: String, setPassword: function, therapistId: number, setTherapistId: function, setIsValidConnection: function, setShowErrorMsg: function, setGoToJournal: function): function source
import {handleLogin} from 'aktivitetsmodulrn/src/utils/AuthenticationUtils.js'
Process the login and set the variables to the correct value.
Params:
Name | Type | Attribute | Description |
username | String | Username of the user |
|
setUsername | function | Set the username of the user (string) |
|
password | String | Password of the user |
|
setPassword | function | Set the password of the user (string) |
|
therapistId | number | Id of the therapist |
|
setTherapistId | function | Set the id of the therapist (number) |
|
setIsValidConnection | function | Set the validity of the connection (boolean, true for valid) |
|
setShowErrorMsg | function | Set the code of the error message to be displayed (number) |
|
setGoToJournal | function | Set the visibility of the journal (boolean, true to show) |
public handleLogout(setIsLoggedOut: function, setIsValidConnection: function, setGoToJournal: function): Object source
import {handleLogout} from 'aktivitetsmodulrn/src/utils/AuthenticationUtils.js'
Set values to the given states to process log out.
public initHelp(id: number): Object[] source
import {initHelp} from 'aktivitetsmodulrn/src/objects/Help.js'
Return properties of the help object with the given id
Params:
Name | Type | Attribute | Description |
id | number | id of help object |
public iosPlaySound(filename: string) source
import {iosPlaySound} from 'aktivitetsmodulrn/src/utils/SoundUtils.js'
Preferred way of playing sound on ios
Params:
Name | Type | Attribute | Description |
filename | string | name of file that is to be played |
public isValidId(id: number): boolean source
import {isValidId} from 'aktivitetsmodulrn/src/utils/AuthenticationUtils.js'
Check if the given id is valid
Params:
Name | Type | Attribute | Description |
id | number | The id to be checked. |
public isValidPassword(therapistId: number, password: string): boolean source
import {isValidPassword} from 'aktivitetsmodulrn/src/database/TherapistsDAO.js'
Checks if the given password is the correct password for the given therapist id.
public numberOfAssessments(): number source
import {numberOfAssessments} from 'aktivitetsmodulrn/src/database/UsersDAO.js'
Returns the number of assessmetns
public numberOfQuestions(id: number): number source
import {numberOfQuestions} from 'aktivitetsmodulrn/src/database/ActivityTypesDAO.js'
Returns the number of questions
Params:
Name | Type | Attribute | Description |
id | number | the activity id |
public playSound(filename: string) source
import {playSound} from 'aktivitetsmodulrn/src/utils/SoundUtils.js'
Plays the .wav soundfile corresponding to the filename.
Params:
Name | Type | Attribute | Description |
filename | string | name of file that is to be played |
public setActivityCreateDate(date: Date) source
import {setActivityCreateDate} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Sets the activityCreateDate
Params:
Name | Type | Attribute | Description |
date | Date | new activityCreateDate |
public setActivityId(activityId: number) source
import {setActivityId} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Sets the id of the Activity
Params:
Name | Type | Attribute | Description |
activityId | number | the new id |
public setActivityType(activityType: Object) source
import {setActivityType} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Sets the activity type
Params:
Name | Type | Attribute | Description |
activityType | Object | the activity type |
public setAssessment(a: Object) source
import {setAssessment} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Overwrite assessment. Used if user already have an assessment for current activity
Params:
Name | Type | Attribute | Description |
a | Object | assessment that should overwrite the assessment object |
public setAssessmentId(id: number) source
import {setAssessmentId} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Sets the id of the assessment
Params:
Name | Type | Attribute | Description |
id | number | the new id |
public setBorderStyle(paperColor: string, styles: Object): Object[] source
import {setBorderStyle} from 'aktivitetsmodulrn/src/utils/FormatterUtils.js'
Set the color of the border and add it to the specified style
public setComment(content: string, textColor: string, paperColor: string) source
import {setComment} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Sets the comment which consists of content, and colors. Need colors to display comment in diary
public setCreateDate(date: Date) source
import {setCreateDate} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Sets the createDate
Params:
Name | Type | Attribute | Description |
date | Date | new createDate |
public setDrawing(drawing: string) source
import {setDrawing} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Sets the drawing
Params:
Name | Type | Attribute | Description |
drawing | string | The path to the drawing |
public setGrading(grading: Object) source
import {setGrading} from 'aktivitetsmodulrn/src/objects/Assessment.js'
Sets the grading for a question. Overwrites previous gradings for same question
Params:
Name | Type | Attribute | Description |
grading | Object | new grading |
public smileyometerAnimationDelay(grading: boolean, comment: boolean, drawing: boolean): number[] source
import {smileyometerAnimationDelay} from 'aktivitetsmodulrn/src/utils/TimerUtils.js'
Receives parts of assessment, and returns timer delay values based on true or false
Return:
number[] | Array of timer delay values as ints [gradingDelay, commentDelay, drawingDelay, complimentDelay] |
public stopSound() source
import {stopSound} from 'aktivitetsmodulrn/src/utils/SoundUtils.js'
Stops the currently playing sound.
public timedEvent(func: function, time: number, id: number) source
import {timedEvent} from 'aktivitetsmodulrn/src/utils/TimerUtils.js'
A timed event. Runs function after time