Skip to content

Commit

Permalink
fix: update survey links for production
Browse files Browse the repository at this point in the history
  • Loading branch information
becdavid authored and ztraboo committed Sep 10, 2024
1 parent b7a2e97 commit 942507d
Showing 1 changed file with 56 additions and 67 deletions.
123 changes: 56 additions & 67 deletions lms/templates/dashboard/_dashboard_program_surveys.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,79 +8,68 @@

<%namespace name='static' file='../static_content.html'/>

<% show_program_survey = False
course_institution = ''%>
% for enrollment in course_enrollments:
<% course_overview = CourseOverview.get_from_id(enrollment.course_id) %>
% if course_overview.org == "CUCWD":
<% show_program_survey = True %>
% if course_overview.course_institution:
<% course_institution = course_overview.course_institution %>
% endif
% endif
% endfor
<!-- Ensure that program surveys are only shown to learners who are enrolled in courses from CA organization -->
<%
show_program_survey = False
course_institution = ''

<!-- What is needed for qualtrics url pass:
course_overview.org
course_overview.course_institution
user.username
user.email
course_institution = OrganizationInstitution.get(short_name=course_overview.course_institution)
course_institution.short_name
course_institution.name
course_institution.city
course_institution.state
course_institution.zipcode
-->
for enrollment in course_enrollments:
course_overview = CourseOverview.get_from_id(enrollment.course_id)
if course_overview.org == "CA":
show_program_survey = True

% if show_program_survey:
<% course_institution = OrganizationInstitution.get_by_shortname(short_name=course_overview.course_institution)
%>
% if user.is_anonymous:
<% anonymous_user_id = user.id %>
% else:
<%
anonymous_user_id = AnonymousUserId.objects.filter(user=user).order_by('-id')
anonymous_user_id = anonymous_user_id[0].anonymous_user_id
%>
% endif
<% platform_anonymous_user_id_string = "platform_anonymous_user_id=" + anonymous_user_id
username_string = "platform_username=" + user.username
user_email_string = "platform_email=" + user.email
org_institution_name_string = "org_institution_name=" + course_institution.name
org_institution_shortname_string = "org_institution_short_name=" + course_institution.short_name
org_institution_city_string = "org_institution_city=" + course_institution.city
org_institution_state_string = "org_institution_state=" + course_institution.state
org_institution_zipcode_string = "org_institution_zipcode=" + course_institution.zipcode
if course_overview.course_institution:
course_institution = course_overview.course_institution
break
%>

<div class="program-survey">
<h2 class="program-survey-header">
Aviation Mechanic General
</h2>
<div class="program-details">
<p>This program of courses equips learners for entry into the FAA mechanic pathway. Upon completion, they gain foundational knowledge in mathematics, aircraft drawings, weight and balance, aircraft materials, processes and tools, physics, electricity, inspection, ground operations, and FAA regulations governing maintenance technician certification and work.</p>
</div>
<!-- If program surveys are being shown to learner, start building strings to pass organization and institution information to qualtrics -->
% if show_program_survey:
<%
course_institution = OrganizationInstitution.get_by_shortname(short_name=course_overview.course_institution)

<div class="survey-details-wrapper">
<div class="survey-wrapper">
<h2 class="survey-title">Pre-Program Survey</h2>
<hr>
<p class="survey-instructions">Answer this survey prior to taking any course content</p>
<p class="survey-details">This will help us understand your career awareness and interest, gauge where you are with FAA General maintenance knowledge and skill confidence, career plans, and demographic information.</p>
<a class="provide-feedback-btn" href="https://clemson.yul1.qualtrics.com/jfe/preview/previewId/bd5378b8-6946-4afe-b865-ccd3c38f791a/SV_3C2RY5TuB0uIZ70?Q_CHL=preview&Q_SurveyVersionID=current&display_meta=1&${username_string}&${user_email_string}&${platform_anonymous_user_id_string}&${org_institution_name_string}&${org_institution_shortname_string}&${org_institution_city_string}&${org_institution_state_string}&${org_institution_zipcode_string}">
Provide Feedback</a>
if user.is_anonymous:
anonymous_user_id = user.id
else:
anonymous_user_id = AnonymousUserId.objects.filter(user=user, course_id=None).order_by('-id')
anonymous_user_id = anonymous_user_id[0].anonymous_user_id

platform_anonymous_user_id_string = "platform_anonymous_user_id=" + (anonymous_user_id or "")
username_string = "platform_username=" + (user.username or "")
user_email_string = "platform_email=" + (user.email or "")
org_institution_name_string = "org_institution_name=" + (course_institution.name or "")
org_institution_shortname_string = "org_institution_short_name=" + (course_institution.short_name or "")
org_institution_city_string = "org_institution_city=" + (course_institution.city or "")
org_institution_state_string = "org_institution_state=" + (course_institution.state or "")
org_institution_zipcode_string = "org_institution_zipcode=" + (course_institution.zipcode or "")
%>

<div class="program-survey">
<h2 class="program-survey-header">
Aviation Mechanic General
</h2>
<div class="program-details">
<p>This program of courses equips learners for entry into the FAA mechanic pathway. Upon completion, they gain foundational knowledge in mathematics, aircraft drawings, weight and balance, aircraft materials, processes and tools, physics, electricity, inspection, ground operations, and FAA regulations governing maintenance technician certification and work.</p>
</div>

<div class="survey-wrapper">
<h2 class="survey-title">Post-Program Survey</h2>
<hr>
<p class="survey-instructions">Answer this survey after you have completed most of this program's courses</p>
<p class="survey-details">This will help us understand your completion of FAA General maintenance program, career awareness and interest, kwowledge and skill confidence, and demographic information.</p>
<a class="provide-feedback-btn" href="https://clemson.yul1.qualtrics.com/jfe/preview/previewId/bd5378b8-6946-4afe-b865-ccd3c38f791a/SV_3C2RY5TuB0uIZ70?Q_CHL=preview&Q_SurveyVersionID=current&display_meta=1&${username_string}&${user_email_string}&${platform_anonymous_user_id_string}&${org_institution_name_string}&${org_institution_shortname_string}&${org_institution_city_string}&${org_institution_state_string}&${org_institution_zipcode_string}">
Provide Feedback</a>
<div class="survey-details-wrapper">
<div class="survey-wrapper">
<h2 class="survey-title">Pre-Program Survey</h2>
<hr>
<p class="survey-instructions">Answer this survey prior to taking any course content</p>
<p class="survey-details">This will help us understand your career awareness and interest, gauge where you are with FAA General maintenance knowledge and skill confidence, career plans, and demographic information.</p>
<a class="provide-feedback-btn" href="https://clemson.qualtrics.com/jfe/form/SV_3C2RY5TuB0uIZ70?${username_string}&${user_email_string}&${platform_anonymous_user_id_string}&${org_institution_name_string}&${org_institution_shortname_string}&${org_institution_city_string}&${org_institution_state_string}&${org_institution_zipcode_string}">
Provide Feedback</a>
</div>

<div class="survey-wrapper">
<h2 class="survey-title">Post-Program Survey</h2>
<hr>
<p class="survey-instructions">Answer this survey after you have completed most of this program's courses</p>
<p class="survey-details">This will help us understand your completion of FAA General maintenance program, career awareness and interest, kwowledge and skill confidence, and demographic information.</p>
<a class="provide-feedback-btn" href="https://clemson.qualtrics.com/jfe/form/SV_1Al5SpJgWVv6bFI?${username_string}&${user_email_string}&${platform_anonymous_user_id_string}&${org_institution_name_string}&${org_institution_shortname_string}&${org_institution_city_string}&${org_institution_state_string}&${org_institution_zipcode_string}">
Provide Feedback</a>
</div>
</div>
</div>
</div>

% endif
% endif

0 comments on commit 942507d

Please sign in to comment.