WE Offshore Sprint: Session Info Feature
We had the task to implement a Session-Info Form, where the speaker could add more information to a session, which is already created or to add more information to a session which is created at that moment.
Moreover we had the task to implement the rule, that the user can only read these optional information of a session. We also added a compiled markdown area, where the student can see videos, links, etc.
To use the new Session-Infos, we had to implement two new buttons, one which is shown during the "create new session process" and the other one on the overview page of a session behind the Session-ID.
To accomplish these tasks, we did the following code changes and additions:
- Added update Method for Session-Controller
- calls update Method of Model (Session)
- if the update was successful: sets local storage to new values of session
- if the update was not successful: error message is displayed
- added new fields to create Method as well
- Added update Method for Session-Model
- calls the updateSession Method of the RestProxy
- the changed values, the session is the first parameter for the call
- the callbacks (success and failure) are the second parameter for the call
- Added updateSession Method for RestProxy
- uses an “Arsjax“ Request with the URL “session/'keyword'“
- uses the PUT Method
- the data of the session is used for the jsonData which is parsed
- Added new Button for "Optional Information" to NewSessionPanel (Create new session process)
- sessionInfoButton
- opens the new sessionInfoPanel
- If values for the session name and/or shortName where already entered, these values are transferred
- Created new Panel SessionInfoPanel for the optional information
- the structure is similar to the „SessionExportToPublicPanel.js“
- inherits different fields:
- creatorName --> Name of the author
- email --> Email of the author
- sessionName --> Name of the session
- sessionShortName --> Short name of the session
- description --> Description of the session (Only speaker sees this field)
- markdownEditPanel --> Description of the session as compiled markdown (Only user sees this field)
- university --> University for the session
- faculty --> Faculty of the University
- subject --> Subject for the studies
- licence --> Licence
- level --> Level (Degree)
- logo --> Logo
- Several checks are implemented (Only show editable for speaker, users can only read, etc.)
- Save Button is only shown to speaker
- Added new SessionInfo-Button to Speaker and User InClass
- changed the layout of the button, so that it is shown directly at the side of the „Session-ID“
- as a speaker: Opens the new SessionInfoPanel for the speaker, to edit the current session
- as a user: Opens the new SessionInfoPanel for the user, to view the current session but not to edit anything
- as a user: Markdown is now compiled so that the user has the „nice“ view of videos, links, etc.
- Language changes/additions in internationalization.js
- SESSION_INFO_TITLE for the Title of the new SessionInfoPanel (if the screen is big enough)
- SESSION_OPTIONAL_INFO for optional Information Button
- bug fix of wrong spelling
- Style changes: Added .sessionInfoButton into _general.scss
- uses the same grey color as the text of „Session-ID“
- uses no border
- uses a transparent background