You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was a request from the last global meeting, Olivier had asked if there was a way to export the students with and average grade per skill in a pdf file. This isn't a possibility currently, however I think it is something good to implement as partner organizations often ask for details. I looked into a potential solution for this with the wicked_pdf gem.
The text was updated successfully, but these errors were encountered:
We should probably go with the browser generating the pdf so we don't burden our servers with it.
Let's do a barebones proof of concept with this ticket.
We should create another menu option in the main menu in the sidebar called reports. Menu is done in the SidebarComponent in our app so we need another entry there with an svg icon that can be downloaded from Tailwind UI. Find an icon that makes sense for reports, like idk a piece of paper or something.
We need a new route in routes.rb. This route should only have :index (/reports) and :show (/reports/:id) routes. In the index route we will put a dropdown that lets you select a group, once you select it you will be redirected to the show route which should generate the report as an html page with no sidebar or header.
So in routes.rb we will need resources :reports, only: %i[index show]
We need a reports_controller.rb with index and show routes.
We will also need another layout in views/layouts so that we don't render a sidebar menu for the show route.
You can render with a different layout by calling render layout: "reports" if there is reports.html.erb in the layouts directory.
In the show route we will render the report that includes some basic information about the group:
Date of first lesson and the group average on first lesson
Date of last lesson and the group average on that day
Date of "middle" lesson (a mid point) and the average on that day
Graph of the last 30 lessons
Graph of group lifetime (all lessons)
Table with student average marks on first, middle, and last lesson
Once the webpage is generated we should just automatically open up the browsers print menu via javascript window.print();
This was a request from the last global meeting, Olivier had asked if there was a way to export the students with and average grade per skill in a pdf file. This isn't a possibility currently, however I think it is something good to implement as partner organizations often ask for details. I looked into a potential solution for this with the wicked_pdf gem.
The text was updated successfully, but these errors were encountered: