Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions postgresqleu/confreg/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1939,6 +1939,12 @@ def callforpapers_edit(request, confname, sessionid):
slidesurlform = SessionSlidesUrlForm()
slidesfileform = SessionSlidesFileForm()

feedbackqrcode = None
if session.status in (1, 4):
# 1 = confirmed, so render
# 4 = reserve, so render
feedbackqrcode = generate_base64_qr('{0}/events/{1}/feedback/{2}/'.format(settings.SITEBASE, confname, session.id), None, 300)

return render_conference_response(request, conference, 'cfp', 'confreg/session_feedback.html', {
'session': session,
'feedbackcount': feedbackcount,
Expand All @@ -1949,6 +1955,7 @@ def callforpapers_edit(request, confname, sessionid):
'slidesurlform': slidesurlform,
'slidesfileform': slidesfileform,
'slides': ConferenceSessionSlides.objects.filter(session=session),
'feedbackqrcode': feedbackqrcode,
})

if session.id:
Expand Down
14 changes: 13 additions & 1 deletion template.jinja/confreg/session_feedback.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,19 @@ <h2>Slides</h2>
<input type="submit" name="submit" value="Upload slides">
</form>

{%if feedbackcount%}
{% if feedbackcount or feedbackqrcode %}
<h2>Feedback</h2>

{% if feedbackqrcode %}
<h3>Feedback link</h3>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if this should be conditional on if speaker feedback is open. We want the QR code to be available early enough so that speakers include it in their slide deck, so long before the conference starts

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's reasonable to show the QR code as soon as the session is approved (but not for sessions that are not approved, such as pending or rejected of course).

But but instead we should remove the QR code maybe on the combination of "speaker feedback is closed but we are past the end date of the conference"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the QR-Code once it is there? What purpose does this serve to hide the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the patch to hide the QR code if the session is approved or on the reserve list but otherwise hide it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to not catch that in my first high level overview, but -- comparisons should be made on the status code, not the status string. In case we ever (unlikely, I know) get a translation. But also, that's the pattern that other comparison use.

I think we should also try to avoid generating the qrcode if it's not going to be used, as that's probably the more expensive of all the parts of generating the page. So maybe putting the filter in the code to only generate it when it's needed, and then conditional it on whether it was generated or not, could be a way forward from that that would solve both those at once?

<p>
Attendees will be able to leave <a href="/events/{{conference.urlname}}/feedback/{{session.id}}/">feedback</a> on your talk.
This link will work once your talk has started. You can include the below QR code in your slides to increase the response rate.
</p>
<p class="feedback-qrcode"><img src="data:image/png;base64,{{ feedbackqrcode }}"></p>
{%endif%}

{%if feedbackcount%}
{%if conference.feedbackopen%}
<h3>Preliminary feedback!</h3>
<p>
Expand Down Expand Up @@ -105,6 +116,7 @@ <h5>{{f.title}}</h5>
{%endfor%}
{%endif%}

{%endif%}
{%endif%}
{%endblock%}