summaryrefslogtreecommitdiff
path: root/postgresqleu/confreg/feedback.py
AgeCommit message (Collapse)Author
2024-02-13Replace Google charts javascript with local SVG chartsMagnus Hagander
These charts are (of course) not quite as advanced as the Google ones, but avoids an external depdendency on Google and indeed the local js completely. Also makes for a much faster rendering of the pages with feedback. This leaves the admin-only time graph as the only jsapi depdendency on google, to be handled later.
2023-03-27Properly handle session feedback on sessions with no speakerMagnus Hagander
2022-10-17Don't crash on feedback report when there is no feedbackMagnus Hagander
If there were no questions we'd be fine, but if there were questions of type "rate answer" but not a single answer, it would crash. That's obviously not right...
2020-07-13Remove unused importsMagnus Hagander
2020-02-09Verify that integer parameters are integers at an early stageMagnus Hagander
Previously we'd in many places pass down the value directly from get or post requests to a lower layer, only to have that layer throw an exception because it wasn't an integer, or we'd ust wrap it in int() which also causes a hard exception when it's not an integer. Instead create a small wrapper for get_int_or_error() which can be called with a parameter that's supposed to be integer, and will then just return a 404 if the parameter doesn't exist or is not an integer. These are all "should never happen" scenarios, so not generating hard crashes and stackdumps are an improvement. None of these were places where the actual bad data would get anywyhere, they would all just cause an ugly exception, but should get fixed regardless. One or two instances spotted by Daniel Gustafsson, and then a lot of grep to try to find most of the rest.
2020-01-25Make the conference feedback query a little less inefficientMagnus Hagander
Instead of firing off one query per question, use an aggregate to bring back all the data at once and do the final round of summarization in the python layer. Can be improved further, but getting rid of the roundtrips is a good start.
2020-01-25Include the response count in the conference feedbackMagnus Hagander
2019-04-01Don't include (speaker) in feedback report when there is no speakerVik Fearing
2019-03-25Make minvotes the minimum number required for feedbackDaniel Gustafsson
The minimum amount votes required for feedback was applied with a > operator which effectively made the minimum to be minvotes + 1. Fix by also testing for equality on minvotes. Reviewed-by: Magnus Hagander
2019-01-10Generic changes for python3 from 2to3Magnus Hagander
2019-01-04Fix sibling importsMagnus Hagander
Sibling imports should be prefixed with a period. Good idea in py2, will eventually become required in py3, so another small step.
2018-12-15Move get_authenticated_conference to util.pyMagnus Hagander
This gets rid of a somewhat nasty circular import in backendviews.
2018-12-14Fix blankline related warningsMagnus Hagander
2018-12-14Fix spaces before/after comma and colonMagnus Hagander
Mostly not important, but getting rid of the PIP warnings will help catch errors in the future.
2018-12-14Fix spacing around operatorsMagnus Hagander
2018-12-14Replace tabs with spacesMagnus Hagander
In an effort to close up with PEP8, we should use spaces for indent rather than tabs... Time to update your editor config!
2018-07-09Basic documentation for confreg systemMagnus Hagander
This adds basic contextual aware documentation to the confreg system (sponsorship system not yet included, but will be at some point in the future). A help link is added to the top right part of the navigation bar, which links to (potentially context aware) help pages. Docs live in markdown format in the repo and are rendered as django views, inside the framework. Graphs that are used are generated using graphviz, but checked into the repo both as .dot and as .svg to not make graphviz a dependency for anything other than actually changing the graphs. The docs view in django basically does the markdown rendering straight up but also knows how to inline the svg graphs specifically.
2018-06-29Remove a number of unused importsMagnus Hagander
2018-04-02Move reports under /events/admin/ urlMagnus Hagander
2018-03-29Refactor conference authentication on the backend sideMagnus Hagander
This removes massive amounts of duplicated code to check that "is the user either a superuser or an admin for this conference". Centralizing that into the get_authenticated_conference() functions simplifies things a lot, and deleted code is always the best type of code.
2018-03-24Render feedback results in the admin templatesMagnus Hagander
Results should be in the same framework as the admin, including breadcrumbs etc. Unlike the user facing side which should of course be in the conference framework.
2018-03-23Use render instead of render_to_response in more appsMagnus Hagander
Now also confreg, confsponsor, confwiki, newsevents, the old invoice system and the root.
2017-01-20Implement jinja2 based templating for confregMagnus Hagander
This implements the ability to render confreg templates (registration, cfp, schedules etc etc) using jinja2 instead of django templates. The important difference is that these templates are rendered in a complete sandbox, so they cannot reach into other parts of the system by exploiting connected objects or by including templates they are not supposed to. Jinja templates are used whenever the "jinjadir" variable is set on a conference. When it is, the variables for basetemplate, templatemodule, templateoverride and templatemediabase are all ignored, as their functionality is either no longer needed or implemented in a different way using the templates. For the time being we support both the old (django based) templates and the new (jinja based) templates. That means that any changes made to the confreg templates must be done twice. At some point not too far in the future we should decide to either desupport old conferences that have the old style templates, or re-render those as static. (For closed conferences most pages aren't reachable anyway, but things like schedule and session descriptions are reachable way past the end of a conference) Along with the templates come a new command called "deploystatic.py", which runs outside the django environment. This command can be used for deployment of static sites based on the jinja templates, similar to how some conference sites have done it before. Since the templates run in a sandbox, this should be much more safe than what's been done before, and therefor access can be granted to more people. This command is made to run standalone so conference template developers can run it locally without having to install full support for django.
2017-01-20Properly render feedback results in the conference contextMagnus Hagander
2016-01-16Remove all support for mixed content (http/https)Magnus Hagander
Instead, as of now we run all content over https always. The enforcment of this is placed in the webserver, which makes it impossible to miss it on some feature. This retires the setting SITEBASE_SSL, and changes SITEBASE to be https. It also retires DISABLE_HTTPS_REDIRECTS, which has no use anymore. And finally, SESSION_COOKIE_SECURE is now set by default, and needs to be turned off in local development environments.
2014-03-25Exclude n/a votes (0) from toplistsMagnus Hagander
2014-03-25Implement conference feedback reportng on the website as wellMagnus Hagander
This removes the need for the last emailing of feedback, as well as the dependency on the old version of the google chart api.