Skip to content

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:

  1. 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
  1. 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
  1. 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
  1. 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
  1. Created new Panel SessionInfoPanel for the optional information
  • the structure is similar to the „SessionExportToPublicPanel.js“
  • inherits different fields:
    1. creatorName --> Name of the author
    2. email --> Email of the author
    3. sessionName --> Name of the session
    4. sessionShortName --> Short name of the session
    5. description --> Description of the session (Only speaker sees this field)
    6. markdownEditPanel --> Description of the session as compiled markdown (Only user sees this field)
    7. university --> University for the session
    8. faculty --> Faculty of the University
    9. subject --> Subject for the studies
    10. licence --> Licence
    11. level --> Level (Degree)
    12. logo --> Logo
  • Several checks are implemented (Only show editable for speaker, users can only read, etc.)
  • Save Button is only shown to speaker
  1. 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.
  1. 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
  1. 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

Merge request reports