Skip to content

Commit

Permalink
Merge dev into master (#357)
Browse files Browse the repository at this point in the history
* Delete PULL_REQUEST_TEMPLATE.md

* update pullapprove for team RESTless (#66)

* update pullapprove for team RESTless

* don't use teams

* Revert "adjust indentation"

This reverts commit f7a91e002e461db844dd81ef391bd58d688da378.

* add new poll field to lecture view and lecture to poll_params in controller

* Include code review feedback

* Integrate rubocop style

* add polls as nested resources for #18 (destroying not working yet)

* Add lecturer-lecture relation.

* remove destroy dependency

so a lecture does not get destroyed when one of it's polls is destroyed

* make that students can not create polls

* Implement #40.

* Implement #38.

* Corrected rubocop offenses.

* Test for student or lecturer

* show current lectures view not to lecturers

* Add lecturer (one user) to lecture and fix tests

* Add description attribute

* Add n:m relation between users and lectures

* Add tests for description of lecture

* fix usage of current_user variable

* adjust polls controller spect to new model structure

* add lecture to poll factory

* fix polls_spec in routes

* adjust routing and request spect for polls to new model structure

* adjust view poll tests to new model structure

* add react component that alerts when number of options in new poll form is changed

* Add react component that renders poll options

* The number of options can be selected by the user
* The inital number is 2

* add options to poll on creation and on show view

* fix save value of poll options

* add is_active attribute to poll everywhere

* add edit functionality for polls and allow only one active poll

- edit view takes existing data
- edit works
- only one poll per lecture can be active

* adjust specs to new poll structure

- adjust polls index specs
- adjust naming in PollOptions react component
- let options without descriptions be valid
- add params to poll controller spec because attributes do not work for
create and edit

* fix style

* add blockage for students from editing and creating polls

* apply some requested changes

* Update spec/views/polls/show.html.erb_spec.rb

Co-Authored-By: Lasse Jahn <[email protected]>

* adjust nil "" consistency

* fix some broken tests

* fix broken tests

* fix poll validation that only one poll can be active #20

* fix formatting #18

* bundle exec rubocop

* remove unused code

* remove unused code

* Update schema.rb

* add permission check so only the lecturer can edit a lecture

* bundle exec rubocop --auto-correct

* feature/Questions (#81)

* add question scaffold generated model

* Fix failing question creation test #9

* Implement first draft of react question component with ActionCable

* Add submit page for questions

* Implement basic question pushing/pulling behaviour using ActionCable

* Change ActionCable subscription behaviour from react-actioncable-provider to App.cable.subscriptions.create

* Sort questions by creation date descending, remove unused question controller definitions

* Add conditional form in questions component

* Sort questions by creation date descending in react to prevent wrong order due to notification delay

* Pass parameter ìs_student' to QuestionsList React component

* Add authentification by user id to cable connection

* Add conditional style for questions

* Delete unnecessary generated specs

* Add failing test for questions view

* Update questions model to reference user table as author

* Add tests covering routing and model of questions, implement few refactorings

* Trim message content on receive

* Add first question controller and question api controller tests

* Adapt dependency of question according to the new attribute is_student

* Implement QuestionsApiController tests, including first ActionCable test

* Move QuestionsApiController to Api Namespace, change React Questions component to take correct props

* Fix rubocop offenses

* Change question page design according to mockups, add question submitting on enter key down

* Adjust question input field to get focused on page load

* Delete unused questions view spec

* Add word break to question list view element

* Reformat question typescript code using Prettier

* Revert change to .gitignore

* Change typescript code to pass rails tests

* Create ActionCable subscription inside React component

* check lectures controller action for lecturer login and filter /lectures
to only show lectures of current Lecturer

* Update pull_request_template.md (#67)

Update pull_request_template to
* support automated closing of issues by merge
* provide Link to ER-diagram
* use checkboxes instead of bulletpoints

* Add Check for authenticated user and extend tests to be logged in via tag

* Add tests for authentication

* Add rubocop linting

* Lecturer can't access lectures of other lecturers

* Lecturers cannot start/end/delete a another lecturers lecture

* Feature/#31 student feedback (#63)

* [#31] Add feedback model

Updated Rubocop and changed tests to fit the lecture reference of a feedback

* Add tab view

Co-authored-by: jeriox <[email protected]>
Co-authored-by: Jasperhino <[email protected]>

* [#31] Add feedback model

Updated Rubocop and changed tests to fit the lecture reference of a feedback

* Add tab view

Co-authored-by: jeriox <[email protected]>
Co-authored-by: Jasperhino <[email protected]>

* [#31] Add feedback model to git

* [#31] Add feedback files to git

* [#31] Add feedback create and show to lecture feedback tab

* [#31] Add migration and robucop style guides

* [#31] Fix test for lecture show

The test validates the existence of the navbar tabs

* [#31] Add correct test description

* Add role checking to lectures view page, setting are hidden for student\n\n\nCo-authored-by: LucPrestin <[email protected]>\nCo-authored-by: jeriox <[email protected]>

* Fix Merge

* Add submitting feedback without page reload

* [#31] Fixed tests for the lecture overview

* [#31] Add test for feedback model and add factory for feedback

* Feature/#35 Add tab view (#60)

* [#31] Add feedback model

Updated Rubocop and changed tests to fit the lecture reference of a feedback

* Add tab view

Co-authored-by: jeriox <[email protected]>
Co-authored-by: Jasperhino <[email protected]>

* [#31] Add feedback model

Updated Rubocop and changed tests to fit the lecture reference of a feedback

* Add tab view

Co-authored-by: jeriox <[email protected]>
Co-authored-by: Jasperhino <[email protected]>

* [#31] Add feedback model to git

* [#31] Add feedback files to git

* [#31] Add feedback create and show to lecture feedback tab

* [#31] Add migration and robucop style guides

* [#31] Fix test for lecture show

The test validates the existence of the navbar tabs

* [#31] Add correct test description

* Add role checking to lectures view page, setting are hidden for student\n\n\nCo-authored-by: LucPrestin <[email protected]>\nCo-authored-by: jeriox <[email protected]>

* Fix Merge

* Add submitting feedback without page reload

* [#31] Fixed tests for the lecture overview

* [#31] Add test for feedback model and add factory for feedback

* Add usefull tests for tabs

Co-authored-by: LucPrestin <[email protected]>

* Remove duplicate line

Co-authored-by: LucPrestin <[email protected]>

* Add votes attribut to poll options db schema

* Fixed continuous deployment. (#102)

* Allowed cd to run from this branch for testing purposes.

* Abort build when docke rbuild fails with error.

* Run travis on this branch too.

* Fixed login command.

* Fixed syntax.

* Removed unnecessary steps from DOckerfile.

* Push using docker to prevent heroku container:push to build second image.

* Added migrations to fix dev.

* Removed columns from create table that are added by a migration later.

* Change dev branch back to dev.

* Bump puma from 3.12.1 to 3.12.2 (#93)

Bumps [puma](https://github.com/puma/puma) from 3.12.1 to 3.12.2.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v3.12.1...v3.12.2)

Signed-off-by: dependabot[bot] <[email protected]>

* Update README.md (#82)

* Link class diagram instead of ERD in Pull Template (#104)

* Link class diagram instead of ERD in Pull Template

* Update pull_request_template.md

* implement join lecture, failed to implement tests (#103)

* implement join lecture, failed to implement tests

* adjust current lectures table design

* remove duplicate notice

* redirect to overview after creating a lecture

like it is defined in the prototype

* add join test

* each user can oly participate once in a lecture

* make show page visible for students

* rubocop

* Feature/#15 questions resolving (#105)

* Change questions to only show if they are not yet resolved, broadcast question resolving

* Change request type of question resolving to POST

* Restructer question react code to fit mobx-state-tree

* Fix questions React component behaviour

* Add tests for question resolving

* Change questions React components to functionComponents, refactor questions React mobx store

* Correct rubocop offenses

* Change question resoling route to match configured route in rails

* Prettify resolved button

* Introduce QuestionsUtils to provide ActionCable and API functionality, reenable is_student check in questions

* Refactor QuestionList Model

* Rename RootStore

* Fixed resolved button styling for lecturer

* Refactor RootStoreModel to QuestionsRootStoreModel

* Show resolving only to author or lecturer

* update model

* add leave_lecture to controller

* add button to html

* refactor tests

* make it finally work

* bundle exec rubocop

* remove unnecessary lines

* feature/#47 student leave lecture (#108)

* update model

* add leave_lecture to controller

* add button to html

* refactor tests

* make it finally work

* bundle exec rubocop

* remove unnecessary lines

* redirect after login (#109)

* redirect after login

* Update home_controller_spec.rb

* Feature/#71 question upvotes (#106)

* Change questions to only show if they are not yet resolved, broadcast question resolving

* Change request type of question resolving to POST

* Restructer question react code to fit mobx-state-tree

* Fix questions React component behaviour

* Add tests for question resolving

* Add upvoting relation between question and user

* Add backend upvoting functionality using ActionCable (for #71)

* Change questions React components to functionComponents, refactor questions React mobx store

* Correct rubocop offenses

* Change question resoling route to match configured route in rails

* Prettify resolved button

* Introduce QuestionsUtils to provide ActionCable and API functionality, reenable is_student check in questions

* Refactor QuestionList Model

* Rename RootStore

* Fixed resolved button styling for lecturer

* Add upvotes to Questions, fix migration

* Add upvotes to Question model

* Add upvote to Question with button

* Refactor RootStoreModel to QuestionsRootStoreModel

* Update schema, adjust question upvotes styles

* Adjust question upvote styling to fit design protoype

* Show upvoting only to students that have not upvoted yet and did not as the question

* Refactor canUpvote and canResolve questions logic

* Brighten upvote arrow color when disabled

* Adjust rspec tests to give current_user scope to serializer

* Tests for #38

* Channged index lecture view

Index lecture view now shows multiple tables for created running an
ended lectures, and show no start button for ended lectures

* run rubocop

* add Review Button (#111)

* add Review Button

* adjust button design

* fix merge

* fix failing test

* refactor lectures overview (#117)

* Fix bug and integrate regession test (#114)

* Fix bug and integrate regession test

* Add description to lecture factory

* Add test

* Feature/#72 question upvote sorting (#115)

* Change questions to only show if they are not yet resolved, broadcast question resolving

* Change request type of question resolving to POST

* Restructer question react code to fit mobx-state-tree

* Fix questions React component behaviour

* Add tests for question resolving

* Add upvoting relation between question and user

* Add backend upvoting functionality using ActionCable (for #71)

* Change questions React components to functionComponents, refactor questions React mobx store

* Correct rubocop offenses

* Change question resoling route to match configured route in rails

* Prettify resolved button

* Introduce QuestionsUtils to provide ActionCable and API functionality, reenable is_student check in questions

* Refactor QuestionList Model

* Rename RootStore

* Fixed resolved button styling for lecturer

* Add upvotes to Questions, fix migration

* Add upvotes to Question model

* Add upvote to Question with button

* Refactor RootStoreModel to QuestionsRootStoreModel

* Update schema, adjust question upvotes styles

* Adjust question upvote styling to fit design protoype

* Show upvoting only to students that have not upvoted yet and did not as the question

* Refactor canUpvote and canResolve questions logic

* Brighten upvote arrow color when disabled

* Adjust rspec tests to give current_user scope to serializer

* Add server side sorting of questions according to role of user

* Add tests for upvoting

* Set default sortings for lecturer and student and add sorting component

* Add test for question sorting with upvotes

* Remove whitespace

* Brighten question upvote button when disabled and clickable, darken button when clicked

* Feature/#83 Implement and test file upload. (#116)

* Implement and test file upload.

* Generate scaffold for uploaded_files and adapt output to match requirements.

* Delete everything not required by the task. Adapt route and remaining tests.

* Remove all not required methods from uploaded_files_controller.

* Use require and permit to retrieve params.

* Rename "New Uploaded File" to "Upload file".

* Rubocop clean up.

* install specific bundler version

* unify migrations

* remove comments from generator

* remove duplicate notice entry

* fix indentation in testcase

* adjust wording in new files notice ("created" => "saved")

* shrink table data to prevent overflow

Co-authored-by: Adrian Jost <[email protected]>

* Feature/#45 edit lectures (#110)

* Removed delete button from edit page as required by the ticket.

* Revert "Removed delete button from edit page as required by the ticket."
Misinterpreted the ticket, used the mockup for clarification.

This reverts commit 28586257b510f573a7fb042098e9bf06ddf1d6db.

* Added edit button.

* Implement settings tab.

* Fix rubocop offenses.

* addition to merge, reintroduce edit button

My IDE haven't let me add this to the merge commit I did before.

* make edit page only accessible before a lecture was started

* remove edit button from lecture details view

* install specific bundler version

Co-authored-by: Adrian Jost <[email protected]>

* Feature/#122 file download (#136)

* Implement and test file upload.

* Generate scaffold for uploaded_files and adapt output to match requirements.

* Delete everything not required by the task. Adapt route and remaining tests.

* Remove all not required methods from uploaded_files_controller.

* Use require and permit to retrieve params.

* Rename "New Uploaded File" to "Upload file".

* Rubocop clean up.

* install specific bundler version

* unify migrations

* remove comments from generator

* remove duplicate notice entry

* fix indentation in testcase

* adjust wording in new files notice ("created" => "saved")

* shrink table data to prevent overflow

* Tests for #122

* Implement download for uploaded files

* fix merge

Co-authored-by: Eric Ackermann <[email protected]>
Co-authored-by: Adrian Jost <[email protected]>

* Feature/#74 assign questions to lecture (#139)

* Assign questions react component to lecture ui

* Adjust QuestionsApp to work in lecture UI

* Add update component

* Add lecture to question in rails model

* Add nice UI features

* Assign ActionCable streaming to lectures

* Add UpdateModel, Question.createUpdate

* Remove QuestionsApiController tests

* Adjust UpdatesApp to work with lecture UI

* Refactor stylesheet structure

* Adjust lecture updates according to mockup

* Change production Actioncable to psql

* Makie question in dashboard resolvable

* Add lecture_id as root store call

* Move question checks to question model

* Add type hints

* Remove unused import and var

* Adjust tests to match question-to-lecture assignment

* Fix rspec not finding current user in lecture overview

* Add tests for question-to-lecture assignment

* Remove top margin questions list lecturers view

* Fix rubocop complains

* Change lecture to lecture_id in question channels, adjust lecture verification in QuestionsController

* Move question creation to CurrentQuestion model

* Refactor UpdatesApp to use its own store; currently updating the store not affecting view

* Introduce UpdateItem to hold representation for update item in dynamic update items list

* Sort questions list in updates list according to is_student

Co-authored-by: vxrahn <[email protected]>
Co-authored-by: Fabian Heseding <[email protected]>

* Feature/#21 show poll results (#118)

* add answer page for polls without saving the answers

* add failing test for showing votes

* add implementation for showing votes plus failing test

* finished first implementation for showing votes

* let rubocop catch some offending chars

* add lecture edit template and remove test in poll controller for redirecting

* Fix merge issues

Co-authored-by: Joana Be. <[email protected]>
Co-authored-by: Adrian Jost <[email protected]>

* Feature/#20 poll can be closed (#120)

* add is_active property to polls #20

* fix some tests

* add answer page for polls without saving the answers

* add failing test for showing votes

* return answers

* add implementation for showing votes plus failing test

* fix schema version

* change answer poll to submit all anwsers with auth token

* finished first implementation for showing votes

* let rubocop catch some offending chars

* fix for editing polls

* redirect back to poll after answering

* add logic for single select in answer poll

* add lecture edit template and remove test in poll controller for redirecting

* add link to view lectures in lecture table

* store answers to poll when submitted

* set default poll in specs to be active

* adjust coontroller spec for edit view for students

* rename view link on lectures index page

* remove doubled migration

* add stop functionality to poll

* gather votes for option when submitting answers

* fix diplaying of option descriptions in answer form

* add Lecture column to polls index view

* add specs for start_stop poll controller action

* make rubocop conform

* add specs for save answers

* adjust poll controller spec for edit redirect

* add vote link for active poll of lecture

* #39 only save answers the user has given; remove outer form

* dont track vs code settings

* #39 set previously selected answers check as default for polls

* #39 show selected options in show page of poll

* fix links

* #39 not allowing to answer not active polls

* remove destory poll button for students

* # 39 add index page for polls for students

* fix tests

* add display of old answers when answering poll

* reset polls controller to before merge and adjust specs

* fix tests

* #39 improve feedback messages and remove debug statements

* #39 fix db migration

* fix Gemfile from merge

* remove non-functioning tests for save answers and make rubocop happy

* extract method from save_answers in poll controller

* fix poll index view spec for only one active poll is allowed

* fix extracted method in poll controller save answers

* fix routes

* remove extra line fro polls controller

* fixed newlines in controller for rubocop

* try changing a migation so build does not fail

* add IAnswer interface to AnswerOption component

* #20 try fix type error of tsx import

* refactor poll model

Co-authored-by: MichaelBuessemeyer <[email protected]>
Co-authored-by: Maximilian Mayer <[email protected]>
Co-authored-by: lpfennigschmidt <[email protected]>
Co-authored-by: Joana Be. <[email protected]>
Co-authored-by: Adrian Jost <[email protected]>

* Fix startup crashes on heroku (#140)

* Install sassc without native optimization.

* Allow deployment on this branch (for test purposes).

* Run deployment from dev and master.

* Delete .pullapprove.yml (#130)

Co-authored-by: Eric Ackermann <[email protected]>

* Feature/#92 revert student enrolling (#152)

* [#86] Add course scaffold

* [#86] Add course scaffold

* Add name validation

Co-authored-by: LucPrestin <[email protected]>

* Add test for course having creator

Co-authored-by: LucPrestin <[email protected]>

* Add creator reference to course

Co-authored-by: LucPrestin <[email protected]>
Co-authored-by: jeriox <[email protected]>
Co-authored-by: Marc <[email protected]>
Co-authored-by: phoeinx <[email protected]>

* Add creator reference to course

Co-authored-by: LucPrestin <[email protected]>
Co-authored-by: jeriox <[email protected]>
Co-authored-by: Marc <[email protected]>
Co-authored-by: phoeinx <[email protected]>

* Add course button in home view test

Co-authored-by: LucPrestin <[email protected]>
Co-authored-by: phoeinx <[email protected]>

* Add course button in home view

Co-authored-by: LucPrestin <[email protected]>
Co-authored-by: phoeinx <[email protected]>

* Add only signed in users can see New Course button in view

* [#86] Add current_user in home view

* [#95] Add list of all courses from a lecturer to the homeview

* [#95] Add table view of courses

* [#89] Add home view for students

* [#100] Add participate students for courses

* [#100] Add join table for users and courses

* [#100] Add join button for course in home view

* [#100] Add test for join_course in home_controller

* [#100] Move join_course method to right controller and adapt tests

* [#94] Add references in models and create join table for course and lecture

* [#100] Add correct css classes for courses tables

* [#94] Add nested lecture to resource to course resource to create corresponding routing

* [#94] Fix typo in routes.rb

* [#94] Add reference in course and lecture model and adapt edit form of lecture and index view of lecture

* [#94] Add lecture list course show view with button to create a new lecture

* [#94] Implement basic functionality for create and view lecture in course show

* [#94] Add correct Table Layout in course show and fix paths in lecture show

* [#94] Add buttons with basic lecture functionality in course show and fix corresponding routes

* [#100] Add factory for lectures

* [#100] Add factory for lectures

* [#94] Refactor routes regarding course lecture relationship

* [#94] Refactor tests in for lectures_controller

* [#94] Refactor tests in for polls_controller

* [#94] Refactor tests in for all_lectures_spec

* [#94] Refactor tests in for current_lectures_spec

* [#94] Refactor tests in show_lectures_spec

* [#94] Refactor tests in polls_spec

* [#94] Refactor tests in lectures_routing_spec

* [#94] Refactor tests in polls_routing_spec

* [#94] Refactor tests in edit.html und new.html

* [#94] Refactor tests in current.html

* [#94] Refactor tests for lectures views

* [#94] Refactor tests for polls views

* Add participating courses to home view (#91)

* Fix test

* Improve design

* Fix failing test

* [#92] Add course leave function

* [#92] Add style to table with leave button

* [#92] Refactor course show regarding to PO feedback

* [#92] Refactor back button regarding to PO feedback

* Applied code review changes (1 of n.a.)

Co-authored-by: Jasperhino <[email protected]>

* [#92] Fix tests

* [#92] Add requested changes from pull request

* [#92] Fix failing test

* [#92] Fix failing test

* [#92] Add course to question react files

* [#92] Add course to UpdateApp component

* [#92] Add dummy course parameters for polls

* Fix tests and broken before actions, also broken "Back" Link at Create New Lecture Page

* Add rubocop fixes

* [#92] Redid dummy course parameters for polls

Co-authored-by: Moritz Spranger <[email protected]>
Co-authored-by: Marc  <[email protected]>
Co-authored-by: LucPrestin <[email protected]>
Co-authored-by: Theresa Hradilak <[email protected]>
Co-authored-by: Julian B. <[email protected]>

* Hotfix back link in edit.html (#161)

* Hotfix polls (#162)

* Hotfix back link in edit.html

* Hotfix polls

* Fix is_active migration (#144)

* Do a proper change default migration.

* Restore deleted migration.

* Renamed new migration so it is run at the same point in time.

* Update schema.

* Run deployment from this branch to fix migrations.

* Use db schema from dev.

* Run deployment from dev, not from this branch.

* Fix/#133 column spacing (#180)

* Hotfix back link in edit.html

* [133] Fix column spacing regarding to long lecture names

Co-authored-by: Marc  <[email protected]>

* Fix/#92 add leave course button to dashboard (#181)

* Hotfix back link in edit.html

* [#92] Add a leave course button to the course dashboard

* [#92] Fix leave button only showed to students

Co-authored-by: Marc  <[email protected]>

* Fix/#87 only course creator can create lectures (#183)

* Hotfix back link in edit.html

* [#92] Add a leave course button to the course dashboard

* [#92] Fix leave button only showed to students

* [#87] Add redirect if not creator of the course

* [#87] Fix tests regarding new redirect

Co-authored-by: Marc  <[email protected]>

* Feature/#83 associate file with course (#177)

* Add polymorphic association from course to uploaded file and test.

* Fix rubocop.

Co-authored-by: Adrian Jost <[email protected]>

* Feature/#83 files have authorship timestamps (#179)

* Implement and add tests for Author Assosication of UploadedFiles

* Add index for Author-UploadedFiles-Assosiation

* update tests to include author

Co-authored-by: Adrian Jost <[email protected]>

* Move leave/end lecture button into tabbar (#128)

* Do not show links if lecture is archived

* Validate lecture to false if changed when the lecture is achived

* make disable editing lecture when lecture ended work

* disable lecture editing fields if the lecture ended

* install specific bundler version

* move tabbar into partial

* Ended Lectures that changed are invalid

* Add comment

* Fix tests

* Add tests

* fix tests

* Add edit link to Lecture-Dashboard when lecture is in status created

* Fix HTTP-Method from lectures-edit link

* Fix Test

* fix links

Co-authored-by: MartinBuessemeyer <[email protected]>

* Bump rack from 2.0.7 to 2.0.8 (#137)

Bumps [rack](https://github.com/rack/rack) from 2.0.7 to 2.0.8.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.0.7...2.0.8)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: Adrian Jost <[email protected]>

* refactor course lectures overview to use table (#186)

* refactor course lectures overview to use table

* reintroduce edit link for running lectures

* reintroduce status for lectures

* add some tests

* run rubocop

* Feature/#62 archive ended lectures (#168)

* Do not show links if lecture is archived

* Validate lecture to false if changed when the lecture is achived

* make disable editing lecture when lecture ended work

* disable lecture editing fields if the lecture ended

* Ended Lectures that changed are invalid

* Add comment

* Fix tests

* Add tests

* fix tests

* Add edit link to Lecture-Dashboard when lecture is in status created

* Fix HTTP-Method from lectures-edit link

* Fix Test

* apply some review feedback

* Implement feedback: use readonly instead of validator and adapt tests

* Add another test case

Co-authored-by: Adrian Jost <[email protected]>

* Feature/#176 user profile view (#184)

* Hotfix back link in edit.html

* [#176] Add show view for user

* [#176] Add Show Profile to navbar

* [#176] Add Test for users show

* [#176] Fix formatting

* [#176] Add user profile alignment in navbar to left according PR review

* [#176] Add test for user show on home view

* [#176] Fix heading size on profile regarding PR request

Co-authored-by: Moritz Spranger <[email protected]>
Co-authored-by: LucPrestin <[email protected]>

* Improvement/#146 integrate poll interaction into tabview without react (#182)

* add iframe for poll interaction to tab view

* make poll iframe fitting to page

* dont render navbar when displaying something with polls

* improve poll interaction and views

* fix poll option edit bug

* improve poll interaction and views even more

* adjust poll show view specs

* add new poll button to poll index

* rename display_navbar to hide_navbar

* adjust place between buttons in polls table

* remove comment in polls index student view

Co-authored-by: MichaelBuessemeyer <[email protected]>

* Feature/#174 add date and time to lecture (#185)

* Hotfix back link in edit.html

* [#176] Add show view for user

* [#176] Add Show Profile to navbar

* [#176] Add Test for users show

* [#176] Fix formatting

* [#174] Add date, start and end time to lecture model and view

* [#174] Add Database Migration

* [#176] Add user profile alignment in navbar to left according PR review

* [#174] Add My lectures to home screen

* [#174] Add course name of lecture regarding AC

* [#174] Add switching view - join button in course dashboard by currently running lectures

* [#174] Add css for stying the running lectures on course dashboard

* [#174] Fix right border for view and join button in table row

* [#174] Fix tests regarding new date and time attributes of lecture

* [#176] Add test for user show on home view

* [#176] Fix heading size on profile regarding PR request

* [#174] Add tests for date and time and made changes regarding PR review

* [#174] Add table templates for courses showing only and all but running lectures

* [#174] Remove code not longer needed

* [#174] Remove css not longer needed

* [#174] Remove code in lecture model wich was wrongly in this branch

* [#174] Fix format

Co-authored-by: Moritz Spranger <[email protected]>
Co-authored-by: LucPrestin <[email protected]>

* fix path of poll iframe (#190)

* Feature/#107 design of lecture create page (#121)

* Removed delete button from edit page as required by the ticket.

* Revert "Removed delete button from edit page as required by the ticket."
Misinterpreted the ticket, used the mockup for clarification.

This reverts commit 28586257b510f573a7fb042098e9bf06ddf1d6db.

* Added edit button.

* Implement settings tab.

* Fix rubocop offenses.

* addition to merge, reintroduce edit button

My IDE haven't let me add this to the merge commit I did before.

* polish up lecture edit/create form

* use textarea for description

* increse default height of textarea

* fix broken tests

* install specific bundler version

* fix tests

Co-authored-by: Eric Ackermann <[email protected]>

* Feature/#155 course file view (#189)

* add prototype for filelist

* add download link

*  Tests for #155, remove double tests for show_courses

* Differntiate student and lecturer files and add scroll bar

* Missing test case

* fix merge

Co-authored-by: Adrian Jost <[email protected]>

* #164 make enrollment key optional (#194)

* #164 make enrollment key optional

* fix rubocop errors

* Install Mergify Tool (#187)

* add mergify config

https://mergify.io

* simplify mergify config

* Add mergify badge to README

Co-authored-by: Christoph Matthies <[email protected]>
Co-authored-by: Lasse Jahn <[email protected]>

* add some seed users & lectures (#129)

* add some seed users & lectures

* remove unused var

* adapt seed data to have a course

* Adjust seed data to new DB Schema of lectures

Co-authored-by: Lasse Jahn <[email protected]>

* Feature/#160 remove files course overview (#191)

* add prototype for filelist

* add download link

*  Tests for #155, remove double tests for show_courses

* Differntiate student and lecturer files and add scroll bar

* Missing test case

* Tests for #160 #156

* Implement Deleting of Course Files

* Validate right to delete files from courses

* rubocop

* Remove duplicate section

*  Add lecture file delete validation

* Update app/controllers/uploaded_files_controller.rb

Co-Authored-By: Adrian Jost <[email protected]>

* Update app/controllers/uploaded_files_controller.rb

Co-Authored-By: Adrian Jost <[email protected]>

* Update app/controllers/uploaded_files_controller.rb

Co-Authored-By: Adrian Jost <[email protected]>

* Update app/controllers/uploaded_files_controller.rb

Co-Authored-By: Adrian Jost <[email protected]>

* Update app/controllers/uploaded_files_controller.rb

Co-Authored-By: Adrian Jost <[email protected]>

* Update uploaded_files_controller.rb

* change back variable scope

* change variable scope

Co-authored-by: Adrian Jost <[email protected]>

* Feature/#167 rejoin entered lecture (#198)

* remove participants when first adding a key to lecture

* test removing students

* fix rubocop offense

* Feature/#165 need key to join lecture (#206)

* add form for key insertion

* make notices to alerts in lectures controller

* only require key insertion when key exists

* disable autocomplete on key input

* add join without key input for keyless lectures

* adjust feature test

* add specs for key validation in lectures controller

* add specs for show view for key input

* fix joining and form tag of key input

* add input to home page

* fic rubocop offenses

* adjust comments

* Improvement/#146 make poll views better (#193)

* remove poll index headline

* change number of poll option input to onInput from onBlur

* add back to poll index link to answer poll view

* make destoy buttonn in poll edit destroy poll and not lecture

* adjust poll tab container for notices

* remov useless comment

* fix poll edit view

Co-authored-by: Maximilian Mayer <[email protected]>

* #166 add enrollment key tab for lecturer (#188)

* #166 add enrollment key tab for lecturer

* finish merging dev

Co-authored-by: Maximilian Mayer <[email protected]>

* add notice pages when polls or questions are disabled (#209)

* add notice pages when polls or questions are disabled

* fix spec

Co-authored-by: MichaelBuessemeyer <[email protected]>

* Feature/#125 upload links (#178)

* Implement uploading links.

* Fix rubocop.

* Introduce reusable show uploaded files component.

* Implement showing lecture files.

* Add test that checks if only files of the current lecture are shown.

* Fix rubocop.

* Initialise uploaded files as empty array if nil.

* Add regression test for umlaut issue.

* Fix errors introduced by merge. Also, build one universal component to show uploaded files.

* Fix rubocop.

* Add missing td.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Add question filtering depending on resolve status (#205)

Co-authored-by: Fabian Heseding <[email protected]>
Co-authored-by: @SimonWiet 
Co-authored-by: @FabianGalandi 
Co-authored-by: @LoWanda

* Feature/#80 as a lecturer, i can choose different graphical representations for the responses (#214)

* add answer page for polls without saving the answers

* add failing test for showing votes

* add implementation for showing votes plus failing test

* finished first implementation for showing votes

* let rubocop catch some offending chars

* add lecture edit template and remove test in poll controller for redirecting

* Fix merge issues

* WIP

* Add correct reading from database and table as react component

* add bar and pie chart representations of poll results

* Delete unnecessary files for react database structure

* Add correct updating of poll options

* Fix NaN error

* Fix routes code duplication and refactor controller

* Display charts in a nav view

* Add styling for poll results

* Add finishing touches to poll result styling and add live update of participants count

* moved canvasjs-files to app/javascript/lib

* fix tests

* fix rubocop

* fix Typescript Compiler Error

Co-authored-by: lpfennigschmidt <[email protected]>
Co-authored-by: Adrian Jost <[email protected]>

* Feature/#73 disallow question interaction in archived lecture (#207)

* Enable question interactions only if lecture is readonly

* Enable update interaction only if lecture not readonly

* Adjust styling to hide space before questions list if no form is shown

Co-authored-by: LoWanda <[email protected]>
Co-authored-by: @SimonWiet 
Co-authored-by: @FabianGalandi

* Feature/#147 add comprehension to lecture (#204)

* Add basic React ComprehensionApp

* Add basic implementation of required components

* Add fields to view

* WIP (do not look) do backend timestamp 10s stuff

* Add styling for comprehension view of lecturer

* Fix scheduled calling of comprehension stamp aging routine

* Implement and style students view for comprehension level

* Build API calls for comprehensions

* Add gemfile.lock

* Add spec for lecture_comprehension_model

* Handle no comprehension stamps

* Add route info comments

* Add lecturer comprehension connection to backend

* Start testing of comprehension in lecture controller (unfinished)

* Improve comprehension update and check for expired stamps

* Broadcast only to dedicated channels

* Use axios for requests having csrf token in requests to increase safety

* Fix formatting

* Disable test for update comprehension

* Refactor LectureComprehensionStamp operations

* Remove unused code

* Refactor comprehension stamp updating; change rufus scheduler to singleton

* Broadcast changes of comprehension to lecturer too; use axios instances in react components

* Rubocop styling

* Improve and complete comprehension stamp controller tests

* Add course logic to lecture behaviour

* Adjust tests

* Return connection to pool after scheduler is done

* Rename courseId to course_id

* Add grey indicator if no students have voted so far

* Delete logging info

* Re-add materials view to lecture dashboard

* Add interactions_enabled to UpdatesApp

Co-authored-by: vxrahn <[email protected]>
Co-authored-by: Fabian Heseding <[email protected]>
Co-authored-by: @SimonWiet 
Co-authored-by: @LoWanda 
Co-authored-by: @FabianGalandi

* Bump rack from 2.0.7 to 2.1.1 (#215)

Bumps [rack](https://github.com/rack/rack) from 2.0.7 to 2.1.1.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.0.7...2.1.1)

Signed-off-by: dependabot[bot] <[email protected]>

* Disable upvoting and resolving for resolved questions (#216)

* Feature/#192 list of participating students (#213)

* add list of participating students to entrollment key tab

* add specs for student list

* Hotfix/#174 time for lecture (#219)

* v1.19.2

* vv1.19.2

* [#174] Change location of lecture heading so that it is above the navigation tabs

* Hotfix/#176 acount view (#218)

* v1.19.2

* vv1.19.2

* [#176] Change "back"-button so that it redirects to last page visited

Co-authored-by: Marc  <[email protected]>

* Add button to delete a course in the course settings (#208)

* add button to delete a course in the course settings
 * redirect to course view if the lecture does not exist
 * redirect to root view if the course does not exist
    * done for lecture, polls, questions, feedback
 * added test for redirection

* apply feedback
* add comments
* fix rubocop offenses

* apply feedback

* #164 add (optional )to enrollment key label

* minor adjustments and add missing test

Co-authored-by: Maximilian Mayer <[email protected]>

* Feature/#220 filter ui (#223)

* Move unresolved button

* Change filter button toggle behavior

Co-authored-by: FabianGalandi <[email protected]>
Co-authored-by: @vxrahn 
Co-authored-by: @fabianhe

* Feature/#158 upload files to lectures (#212)

* Implement uploading links.

* Fix rubocop.

* Introduce reusable show uploaded files component.

* Implement showing lecture files.

* Add test that checks if only files of the current lecture are shown.

* Fix rubocop.

* Initialise uploaded files as empty array if nil.

* Add regression test for umlaut issue.

* Fix errors introduced by merge. Also, build one universal component to show uploaded files.

* Fix rubocop.

* Add missing td.

* Uploaded files controller can be referenced from lectures and courses.

* Remove unnecessary route.

* Fix tests and delete links for lecture page.

* Finished stories

* Fix rubocop.

* Fix one broken test.

* move add file btn into tabbar

* adjust file/link upload design

* adjust file form overview for links

* remove unused classes

* improve responsiveness

* fix table responsiveness

* remove create timestamp

* fix tab overflow

* fix course spec

* fix upload file spec

* fix lectures show spec

Co-authored-by: Adrian Jost <[email protected]>

* Disable comprehension voting after the lecture has ended (#224)

Co-authored-by: LoWanda <[email protected]>
Co-authored-by: vxrahn <[email protected]>
Co-authored-by: FabianGalandi <[email protected]>

* Feature/#222 lecturer dashboard statistics (#228)

* Add channel for student statistics

* Add basic statistic app

* Add statistics to dashboard

* Implement statistics styling according to mockup, add live updating of statistics data

* Add test for student statistic broadcasting

* Fix line breaks

Co-authored-by: LoWanda <[email protected]>
Co-authored-by: Fabian Heseding <[email protected]>

* Improve React apps data loading (#231)

* Change react apps to receive beginning state via server side rendering instead of API request

* Adjust tests accordingly

* Refactor react app props

* Change comprehension colors (#232)

* Feature/#169 feedback submit visualized (#217)

* v1.19.2

* vv1.19.2

* [#169] Add migration for user feedback context

* [#169] Add migration for user feedback context

* [#169] Add user to feedback model

* [#169] Add visual feedback for submitting

* [#169] Remove notification disappearance

* [#169] Add prefill content and label if already submitted feedback

* [#169] Delete update in feedbacks controller

* [#169] Refactor position of notification

* [#169] Removed whitespaces in lectures.show

* [#169] Fixed Feedback Factory

* [#169] Fix index.html.erb due to test failure

* [#169] Fix lecture show due to test failures

* [#169] Fix lecture show again due to test failures

* [#169] Fix feedbacks.rb styling

Co-authored-by: Moritz Spranger <[email protected]>

* Feature/#169 feedback submit visualized (#243)

* v1.19.2

* vv1.19.2

* [#169] Add migration for user feedback context

* [#169] Add migration for user feedback context

* [#169] Add user to feedback model

* [#169] Add visual feedback for submitting

* [#169] Remove notification disappearance

* [#169] Add prefill content and label if already submitted feedback

* [#169] Delete update in feedbacks controller

* [#169] Refactor position of notification

* [#169] Removed whitespaces in lectures.show

* [#169] Fixed Feedback Factory

* [#169] Fix index.html.erb due to test failure

* [#169] Fix lecture show due to test failures

* [#169] Fix lecture show again due to test failures

* [#169] Fix feedbacks.rb styling

* [#169] Hotfix for feedback controller

* [#169] Fix Rubocop Offenses

Co-authored-by: Moritz Spranger <[email protected]>

* minor fixes for "add option to delete courses" (#225)

* add button to delete a course in the course settings
 * redirect to course view if the lecture does not exist
 * redirect to root view if the course does not exist
    * done for lecture, polls, questions, feedback
 * added test for redirection

* apply feedback
* add comments
* fix rubocop offenses

* apply feedback

* #164 add (optional )to enrollment key label

* minor adjustments and add missing test

* fix polls when course is deleted; typo fix

Co-authored-by: Maximilian Mayer <[email protected]>
Co-authored-by: grittaweisheit <[email protected]>

* Add course_id properly (#244)

* Add course_id properly

* Fix course id access

Co-authored-by: lpfennigschmidt <[email protected]>

* implement full width dashboard properly (#226)

* implement full width dashboard properly

* wrap sections properly on small devices

* centralize application head

* add spaces and arrow to links suggested in the PR

* fix build

* make tabbar full width like in the design prototype

* Display comprehension items vertical aligned on small screens (#233)

Co-authored-by: LoWanda <[email protected]>
Co-authored-by: @vxrahn

* Fix comprehension disabled after lecture ended (#251)

* Fix issue (#250)

Co-authored-by: lpfennigschmidt <[email protected]>

* Improvement/#210 unify behaviour when kicked from lecture (#211)

* make unjoined student unable to submit feedback

* kick kicked student when trying feedback or question

* fix rubocop offenses

* fix merge dev

* fix feedback

* fit redirect when kicked from lecture

* add kicking for qiúestions

* fix style

Co-authored-by: Maximilian Mayer <[email protected]>

* Feature/#175 calendar feed 3 (#227)

* Merge branch 'dev' of /Users/tam/Documents/5. Semester/SWTII/lecture-portal with conflicts.

* Add webcal url for every user for constant updates of the visited lectures slots.

Add calendar support with "icalendar" gem.
Add IcalController and "/ical" route.
Add hash_id to every user for non guessable urls because webcal calendar feeds need to be able to be accessed without authentification.

* beautify layout of the profile view

Co-authored-by: Jasperhino <[email protected]>

* add tests

Co-authored-by: Jasperhino <[email protected]>

* make tests run and lint

Co-authored-by: Jasperhino <[email protected]>

* remove calendar from schema.rb

Co-authored-by: Jasperhino <[email protected]>

* add hash_id to user factory, remove save_and_open page

* Remove not needed code snippets from previous merges.

Co-authored-by: Theresa Hradilak <[email protected]>
Co-authored-by: Jasperhino <[email protected]>
Co-authored-by: Marc  <[email protected]>

* Feature/#238 semantic headlines (#264)

* correct HTML semantics of alerts

* adjust heading level semantics

* Feature/#202 feedback setting (#263)

* add feedback enabled to lecture model

* make feedback setting available and used

* add notice for feedback when it is disabled

* add enabled validation to feedback controller

* add specs for feature setting in views

* migrate schema

* add spec for feedback controller feedback creation

* give feedback the hash back

* remove hash because it was not supposed to be there

Co-authored-by: lpfennigschmidt <[email protected]>

* Add total numbers on bar chart and fix bug (#265)

Co-authored-by: lpfennigschmidt <[email protected]>

* Feature/#259 remove lecture description (#269)

* remove description from lecture

* adjust everything to removed description

* Feature/#196 automatic lecture (de) activation (#272)

* Add "archived" status and adjust accordingly (To be checked)

* Fix tests according to new lecture status

* Add conditionals for lecture status

* Adjust tests to fit new lecture status logic, implement new interactions enabling conditions

* Add interactions enabled check to comprehensions

* Adjust tests to fit new lecture status logic

Co-authored-by: @SimonWiet 
Co-authored-by: @LoWanda 
Co-authored-by: @FabianGalandi 
Co-authored-by: @vxrahn

* Show edit/review buttons for active lectures too (#273)

* Display comprehension items vertical aligned on small screens

* Show edit and review buttons for active lectures too

* Feature/#230 student dashboard upvote update feed (#261)

* Add upvoting in student dashboard updates

* Fix serializing of questions in questions model and tests, add student and lecturer click to updates item

* Add styling for student question upvoting in lecture dashboard

* Check for already upvoted in Question and Update

Co-authored-by: Fabian Heseding <[email protected]>
Co-authored-by: SimonWiet <[email protected]>

* Feature/#234 review archived lecture (#266)

* Add test for review of ended lectures.

* Small refactoring.

* Fix rubocop

* Remove remaining references to set_inactive.

* Remove tests that rely on a Start button.

* Run db migrations before asset compilation.

* Fix seed data by unique ids + fix until loop (#274)

* Fix seed data by unique ids + fix until loop

* Fix test to test the creation by validation behavior

* Fix that users hash_id is only assigned once and does not change by every validation.

* Fix rubocop

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Rename 'Leave' button for courses to 'Unenroll' (#276)

* unify back button design & position (#267)

* rename link text

* unify back buttons

* small review adjustments

* adjust space

* Update schema.rb

* adjust back button on users page

* fix merge

* adjust student view

* Fix not working lecture status scheduler (#277)

* Display comprehension items vertical aligned on small screens

* Make update lecture status method public for scheduler to call it

* Fix problem in lecture activation due to timezones

* Add check in after_initialize to prevent scheduler in testing/console

Co-authored-by: SimonWiet <[email protected]>

* Feature/#278 lecture title to 142 chars (#290)

* Hotfix back link in edit.html

* [#278] Refactor lecture name length validates from 40 to 142

* Feature/#280 remove sign up when logged in (#289)

* Hotfix back link in edit.html

* [#280] Add check for signed in user on home.index

* [#280] Add else statement due to code review

* Redirect back to course overview instead of detail view after editing a lecture (#292)

* Add functionality and test

* fix linting issue

* Feature/#279 forbid access to course index (#291)

* Hotfix back link in edit.html

* [#279] Add redirect in courses/index and refactor tests

* [#279] Add test for redirect

* [#279] Fix style due to rubocop

* Improvement/#296 restyle student poll views (#297)

* remove show button from student poll index

* adjust headline for show of students own votes

* remove answer link from students poll show view

Co-authored-by: Joana Be. <[email protected]>

* Enhancement/#302 remove comes with many features (#303)

* Hotfix back link in edit.html

* [#302] Removed sentence from home view

* Add check whether database exists (#310)

* Implement core and optional feature and tests (#271)

* Implement core and optional feature and tests

* make link name optional

* rename file

* Add test for optional link name

* Fix placeholders/label naming

Co-authored-by: Adrian Jost <[email protected]>

* Use time_select and date_select to get 24 hour format. (#275)

* Use time_select and date_select to get 24 hour format.

* Fix rubocop.

* Time selects in 5 minute steps.

* fix styles on mobile devices

Co-authored-by: Adrian Jost <[email protected]>

* change download targets to _self (#320)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Delete unused functions (#323)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Adrian Jost <[email protected]>

* save file extensions and append it on download (#324)

* save file extensions and append it on download

* exec rubocop --auto-correct

* Change Add File Button (#330)

* Enhancement/#283 form styling (#313)

* move "back to overview" button next to the submit button

* fix "back to overview" button to not be shown when visiting the edit course page

* fix back button position in course creation and update

* fix back button position in lecture creation

* fix back button position in lecture update

* make poll creation dialog look good

* fix button position in poll update form

* fix button position in user creation form

* fix button position in user login form, make all devise links to outlined buttons

* fix button position in the password reset form

* fix button position in the registration update form

* Improve lecturer feedback design (#195)

* Improve lecturer feedback design

* Add requested changes

* Reset courses.scss to dev

* Reset courses.scss to dev

* Fix lecture feedback tab

Co-authored-by: Adrian Jost <[email protected]>
Co-authored-by: Jasperhino <[email protected]>

* Feature/#196 lecturer status updating tests (#327)

* Add tests

* Add test for lecture scheduler behavior

* Add reload

* Make tests more specific

* Add blocks to travel

* Fix whitespace

Co-authored-by: Fabian Heseding <[email protected]>

* Feature/#258 as a lecturer, when i'm in a course and click edit on a lecture, then back i'm not taken to the detail view of the lecture (#301)

* Add functionality and test

* fix linting issue

* Link back to home page when going back when creating a new course

* fix lint error

* Redirect to courses overview instead of home view

Co-authored-by: grittaweisheit <[email protected]>
Co-authored-by: lpfennigschmidt <[email protected]>

* Feature/#260 display course description (#293)

* try cropping

* add home css to application and add overflow on home view

* remove course description in overview for lecturer

* adjust table col size

* change link to button and vice versa for specs

* add spec for course description display

Co-authored-by: Joana Be. <[email protected]>
Co-authored-by: lpfennigschmidt <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Bugfix/#298 polls orders on deployment (#309)

* add index to poll options and use sorted options for answer view

* add index to poll options and use sorted options for answer view

* add sort by created to polls index

* fix for loop

* adjust sorting in poll tables to index

* redo poll inex sorting because sorting by created at is better

* rename save_poll_options method to specify it processes params

Co-authored-by: Maximilian Mayer <[email protected]>
Co-authored-by: lpfennigschmidt <[email protected]>

* Feature/#281 add defaults for lecture time (#312)

* v1.19.2

* vv1.19.2

* [#281] Add default times for lecture and dynamically adjusting duration

* [#281] Refactor default time with time_select and date_select

Co-authored-by: Marc  <[email protected]>
Co-authored-by: Jasperhino <[email protected]>

* Feature/#254 add qr code (#288)

* add qr code to join lecture on enrollment key tab

* adjust gemfile

* try fixing tests

* fix old test failing due to check if course is joined

* rename uplod_new_file_spec.rb to upload_new_file_spec.rb and fix old test

* rename route to join lecture by url

* fix last test

* add comment for qr code gem

* dont hardcode qrcode url

* try adding test to check enrollment url; fix rubocop

* fix rubocop

* add and fix tests

Co-authored-by: Maximilian Mayer <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Enable polls, feedback according to current lecture status (#314)

* Enable polls, feedback according to current lecture status

* Adjust Ui to lecture status

* Redirect path when editing lectures to settings

* Remove console log

* Rename edit and view buttons

Co-authored-by: vxrahn <[email protected]>
Co-authored-by: Fabian Heseding <[email protected]>
Co-authored-by: @SimonWiet

* Fix bug of dejoining students after status change (#341)

Co-authored-by: @SimonWiet

* Feature/#326 lecturer code (#340)

* Add user secret key.

* Fix rubocop.

* Add note about secret key base.

* Update app/views/users/registrations/new.html.erb

Co-Authored-By: MartinBuessemeyer <[email protected]>

Co-authored-by: MartinBuessemeyer <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Bugfix/#328 remove resend password (#344)

* Remove 'Resend Password instructions' option and 'Forgot your password' buttons

* Add view test for sign-in page

Co-authored-by: Eric Ackermann <[email protected]>

* Restyle start and stop button in polls for the lecture view (#347)

* move start/stop poll button below the title

* seperate words in css classes and ids with '-'

* fix accidental renaming

* reset canvas js

* change renaming mistake

Co-authored-by: grittaweisheit <[email protected]>

* Open polls close on lecture being archived and cannot be opened afterwards anymore (#352)

* Add functionality & tests

* fix lint

Co-authored-by: MichaelBuessemeyer <[email protected]>

* fix removing of students when key is added (#355)

* fix removing of students when key is added

* remove old code

Co-authored-by: Maximilian Mayer <[email protected]>

* Feature/#331 restyle delete unenroll (#348)

* Restyle all "danger" buttons.

* Remove save_and_open

* Restyle remaining "danger" buttons.

* Feature/#197 updating lecture status in soft realtime (#358)

* Add channel for lecture status updating

* Update in soft realtime after lecture status change for lecture dashboard

* Update other pages after lecture status update in soft realtime

Co-authored-by: @vxrahn

* Feature/#345 differentiate created and stopped polls (#356)

* refactor poll is_activ to status

* adjust stop_start of polls controller

* add buttons

* fi duplicated start button

* merge with dev

* refactor poll lecture index view

* fix css class

* fix migrations

* fix spec

* really fix migration

* set date to fix test

* Feature/#342 multiple polls at a time (#362)

* remove check for only one poll running at a time

* fix rubocop complain

* remove old code and add tests for running more than one poll at a time

* Set line back to where it belonged (#365)

* Update lecture.rb (#373)

* Feature/#361 auto update poll list (#372)

* fix merge

* reload poll index for students every 3 seconds

* Update ParticipantsCount.tsx (#375)

Co-authored-by: grittaweisheit <[email protected]>

* Delete double view button (#376)

* Delete unnecessary table rows (#377)

Co-authored-by: grittaweisheit <[email protected]>

* Fix travis build problems (#380)

* Run precompiling assets against test db.

* Fix failing tests because date after 2020-02-02.

* Use a data type postgres understands.

* Compile assets for tests to same directory.

* Swap the actual database config against one that builds against sqlite in production.

* Do not force install of sqlite as it is a dependency for all environments anyway.

* Add comments

* Run deployment from dev instead of this branch.

* fix ordering of options in your vote view (#381)

* Restyle the poll list (Student + lecturer) (#359)

* Add functionality & test

* make linter happy

* Fix tests by changing fixture value back

Co-authored-by: lpfennigschmidt <[email protected]>

* Feature/#360 create polls in lecture created status (#364)

* Allow poll creation when lecture is in 'created' status

* Start lecture overview in 'settings' tab, if status is 'created'

* Adjust test

Co-authored-by: grittaweisheit <[email protected]>

* Feature/#379 seperate page to diplay joined students (#382)

* add student list tab

* add test for student list tab

* Feature/284 nothing here yet labels (#338)

* Add not yet label for file upload

* Add nothing here yet messages for questions and materials.

* Add tests for materials in course and lecture view.

* Remove not working tests for questions

* Fix merge issues.

* Make courses deletable again. (#371)

Co-authored-by: Christopher Aust <[email protected]
  • Loading branch information
1 parent 79e7e6c commit 541cf3c
Show file tree
Hide file tree
Showing 379 changed files with 19,279 additions and 147 deletions.
1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaults
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tmp
.idea
.git
node_modules
Dockerfile
18 changes: 0 additions & 18 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Resolves #number

This PR changes / adds / introduces the feature of ....

Acceptance Criteria:
- [ ] first criteria (maybe a test case)
- [ ] second criteria
- [ ] third citeria


Testing steps:
- first step
- second step
- ....

Steps needed for migration:
- first migration step
- second migration step
- ...

---

Definition Of Done:
- [ ] [Class-Diagram](https://www.lucidchart.com/invitations/accept/705a122b-58a9-4dfa-8b16-c936bc0a46bc) updated

37 changes: 37 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
push:
tags:
- 'v*'

name: Create Release

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Build project
run: |
zip -r release.zip . -x "*.git*"
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release.zip
asset_name: release.zip
asset_content_type: application/zip
19 changes: 19 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# jetbrains: rubymine ignore files
.generators
.idea
.rakeTasks

*.rbc
capybara-*.html
.rspec
Expand Down Expand Up @@ -47,3 +52,17 @@ bower.json
# Ignore node_modules
node_modules/


/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity

# Ignore master key for decrypting credentials and more.
/config/master.key

# ignore assets
public/assets/
.vscode/settings.json
8 changes: 8 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pull_request_rules:
- name: automatic merge on CI success when label is set
conditions:
- label~=ready to merge
actions:
merge:
method: squash
strict: true
7 changes: 4 additions & 3 deletions .rubocop.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ AllCops:
- '**/tmp/**/*'
- '**/vendor/**/*'
- '**/bin/**/*'
- 'node_modules/**/*'

# Prefer assert_not over assert !
Rails/AssertNot:
Expand Down Expand Up @@ -73,7 +74,7 @@ Layout/EmptyLinesAroundModuleBody:
Style/HashSyntax:
Enabled: true

Layout/IndentFirstArgument:
Layout/FirstArgumentIndentation:
Enabled: true

# Method definitions after `private` or `protected` isolated calls need one
Expand Down Expand Up @@ -149,7 +150,7 @@ Layout/Tab:
Enabled: true

# Blank lines should not have any spaces.
Layout/TrailingBlankLines:
Layout/TrailingEmptyLines:
Enabled: true

# No trailing whitespace.
Expand All @@ -176,7 +177,7 @@ Lint/RequireParentheses:
Lint/ShadowingOuterLocalVariable:
Enabled: true

Lint/StringConversionInInterpolation:
Lint/RedundantStringCoercion:
Enabled: true

Lint/UriEscapeUnescape:
Expand Down
3 changes: 1 addition & 2 deletions .rubocop_todo.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2019-11-21 07:37:03 +0100 using RuboCop version 0.76.0.
# on 2019-11-28 10:48:36 +0100 using RuboCop version 0.76.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand All @@ -12,7 +12,6 @@
# SupportedStyles: empty_lines, no_empty_lines
Layout/EmptyLinesAroundBlockBody:
Exclude:
# Because migrating generates schema.db
- 'db/schema.rb'

# Offense count: 36
Expand Down
Empty file modified .ruby-version
100644 → 100755
Empty file.
39 changes: 35 additions & 4 deletions .travis.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
language: ruby
cache: bundler
branches:
only:
- dev
- master
cache:
bundler: true
npm: true
sudo: required
services:
- docker
before_install:
# https://bundler.io/blog/2019/05/14/solutions-for-cant-find-gem-bundler-with-executable-bundle.html
- gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
#install heroku CLI for deployment
before_script:
- export HOME="/home/travis"
- curl https://toolbelt.heroku.com/install.sh | sudo sh
# need node to compile assets
- nvm install 13.1.0
- nvm alias default 13.1.0
- nvm use 13.1.0
script:
- RAILS_ENV=test bundle exec rails db:migrate
- bundle exec rspec spec/
- bundle exec rubocop
# this has to be run before compiling the assets, else rufus fails
- RAILS_ENV=test bundle exec rails db:migrate
# else views with TypeScript components will not render
- RAILS_ENV=test bundle exec rails assets:precompile
- bundle exec rspec spec/
- bundle exec rubocop

deploy:
provider: script
skip_cleanup: true
script: ./deployment.sh
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^(dev|master)$
41 changes: 41 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM ruby:2.5.1
ARG secret=wzfeguzwgfg8924rfgsdvf
ENV SECRET_KEY_BASE=${secret}
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
postgresql-client libpq-dev \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL https://deb.nodesource.com/setup_13.x | bash
RUN apt-get install -y nodejs
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt-get install yarn

WORKDIR /usr/src/app
COPY Gemfile* ./
ENV RAILS_ENV=production
RUN gem install rake -v 13.0.0
RUN gem install bundler -v 2.0.2
ENV BUNDLER_VERSION 2.0.2
# see https://github.com/sass/sassc-ruby/issues/146
RUN gem install sassc -- --disable-march-tune-native
RUN bundle install --without development test

COPY . .
RUN yarn install --check-files
# We need a database to precompile the assets. Compiling at run time is impossible; node fails because there is not enough memory.
# Obviously, we do not want to connect to the real production database from whatever build server we run on.
# So we exchange the real databas econfiguration that points to the Heroku database with one that points to a SQLite database we can quickly create on ephemeral storage.
RUN cp ./config/database.yml ./config/database_real.yml
RUN cp ./config/database_travis_build.yml ./config/database.yml
# db schema needs to be created, so run migrations first
RUN ./bin/rails db:migrate
# now assets can be compiled
RUN ./bin/rails assets:precompile
# revert the change so we speak to the production database later
RUN cp ./config/database_real.yml ./config/database.yml
EXPOSE 3000
ENV RAILS_SERVE_STATIC_FILES=true
ENV RAILS_LOG_TO_STDOUT=true
ENV PORT=3000
CMD ["sh", "-c", "./cmd.sh"]
21 changes: 19 additions & 2 deletions Gemfile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ gem "rails", "~> 5.2.3"
# Use sqlite3 as the database for Active Record. https://www.sqlite.org/index.html
gem "sqlite3"
# Use Puma as the app server. https://github.com/puma/puma
gem "puma", "~> 3.11"
gem "puma", "~> 3.12"
# Use Uglifier as compressor for JavaScript assets. https://github.com/lautis/uglifier
gem "uglifier", ">= 1.3.0"
# See https://github.com/rails/execjs#readme for more supported runtimes
gem "mini_racer", platforms: :ruby
gem "mini_racer", "= 0.2.6", platforms: :ruby
# Turbolinks makes navigating your web application faster. https://github.com/turbolinks/turbolinks
gem "turbolinks", "~> 5"
# Reduces boot times through caching; required in config/boot.rb
Expand All @@ -28,6 +28,7 @@ gem "bootsnap", ">= 1.1.0", require: false
# Additional core gems
#


# Linter / Formatter using Rubocop https://github.com/rubocop-hq/rubocop
gem "rubocop", require: false
# Rails Extension for Rubocop https://github.com/rubocop-hq/rubocop-rails
Expand All @@ -37,6 +38,7 @@ gem "rubocop-rspec", require: false
# Extension for Rubocop https://github.com/rubocop-hq/rubocop-performance
gem "rubocop-performance", require: false


# Flexible authentication solution for Rails with Warden
gem "devise" # https://github.com/plataformatec/devise
gem "devise-i18n" # https://github.com/tigrish/devise-i18n
Expand Down Expand Up @@ -113,6 +115,8 @@ group :test do
# gem 'faker' # https://github.com/stympy/faker
# Code coverage for Ruby
# gem 'simplecov', require: false # https://github.com/colszowka/simplecov
# selectors in tables
gem "capybara_table"
end

group :production do
Expand All @@ -121,3 +125,16 @@ end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem "webpacker"
gem "react-rails"

gem "active_model_serializers"
# Adds support to test action-cable behaviour, see https://github.com/palkan/action-cable-testing
gem "action-cable-testing"
# Adds calendar with support for .ics files
gem "icalendar"
# Easily schedule tasks in ruby <3
gem "rufus-scheduler"

# adds support for qr-codes
gem "rqrcode", "~> 1.1"
Loading

0 comments on commit 541cf3c

Please sign in to comment.