Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update raw survey result with question explanation #46

Merged
merged 1 commit into from
Mar 7, 2024
Merged
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
75 changes: 52 additions & 23 deletions rails_root/app/views/survey_responses/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
<p style="color: green"><%= notice %></p>

<style>
#summary{
margin-left: 6%;
margin-right: 6%;
font-weight: bold;
font-size: 1.25em;
color: #500000
}
#response {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 40%;

width: 100%;
}

#response td, #customers th {
border: 0.5px solid #ddd;
width: 90%;
padding: 8px;
}

Expand All @@ -25,6 +34,7 @@
}
</style>

<% title = ["Part 1. Leadership Behavior - Management", "Part 1. Leadership Behavior - Interpersonal", "Part 2. External Forces", "Part 3. Organizational Structure", "Part 4. Values, Attitudes, and Beliefs"]%>
</head>

<center>
Expand All @@ -35,33 +45,52 @@
The purpose of this qualitative study was to apply the Synergistic Leadership Theory (SLT) to the leadership experiences of five female superintendents leading successful school districts. The SLT is an interactive theory, which includes female experiences, but it applies to men and women. It provides a framework for leaders to align four factors that impact successful leadership: (a) attitudes, values, and beliefs; (b) leadership behaviors; (c) organizational structure; and (d) external forces. Four research questions guided my study: (a) What are the leadership behaviors of the superintendents? (b) Is the organizational structure of each district aligned with the superintendent’s leadership behaviors? (c) How do the leadership behaviors of the superintendent impact the relations between the district and the external forces? (d) Are the attitudes, values, and beliefs of the superintendent aligned to the attitudes, values, and beliefs of the school board member and the administrative team member
</p>

<h3>Your Response</h3>

<% @survey_response = SurveyResponse.find(params[:id])%>
<table id="response">
<thead>
</thead>
<tbody>
<tr style="background-color: #500000; color: white; ">
<td>Part 1: Leadership Behavior - Interpersonal</td>
<td>Response</td>
</tr>
<% @survey_response.answers.map do |answer| %>
<tr>
<td>
<details>
<summary><%= answer.question.text %></summary>

<%= answer.question.explanation %>
</details>
</td>
<td><%= answer.choice %></td>
</tr>
<% end %>
</tbody>

<table style="width: 40%;">
<tr>
<td style="text-align:center"><h2>Your Response</h2></td>
</tr>
<% 5.times do |i|%>
<tr>
<td>
<details>
<summary id ="summary"><%= title[i]%></summary>
<table id="response">
<tbody>
<tr style="background-color: #500000; color: white; ">
<td><%= title[i]%></td>
<td>Response</td>
</tr>

<% @survey_response.answers.map do |answer| %>
<% if answer.question.section == i%>
<tr>
<td>
<details>
<summary><%= answer.question.text %></summary>

<%= answer.question.explanation %>
</details>
</td>
<td><%= answer.choice %></td>
</tr>
<%end%>
<% end %>
</tbody>
</table>
</details>
</td>
</tr>
<%end%>
</table>




<br>

<div>
<%= link_to "Edit this survey response", edit_survey_response_path(@survey_response) %> |
<%= link_to "Back to survey responses", survey_responses_path %>
Expand Down
Loading