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

PL: session attendance recorded interstitial page #28628

Merged
merged 6 commits into from
May 20, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 31 additions & 0 deletions apps/style/code-studio/pd.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,34 @@ form .form-required-field {
cursor: pointer;
}
}

.workshop-attendance-recorded {
font-size: 14px;
width: 70%;
line-height: 1.5;

.left {
float: left;
width: 28%;
}

.right {
float: left;
width: 72%;
padding-top: 20px;
}

.checkmark {
font-size: 160px;
color: $charcoal;
}

.paragraph {
margin-bottom: 15px;
}

button {
margin-left: 0px;
padding: 10px 20px 10px 20px;
}
}
10 changes: 1 addition & 9 deletions dashboard/app/controllers/pd/session_attendance_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def attend

attendance = Pd::Attendance.find_restore_or_create_by! session: @session, teacher: current_user
attendance.update! marked_by_user: nil, enrollment: enrollment
render_confirmation
render :attendance_recorded
end

# POST pd/attend/:session_code
Expand Down Expand Up @@ -89,12 +89,4 @@ def render_own_workshop

redirect_to CDO.studio_url('/', CDO.default_scheme)
end

def render_confirmation
flash[:notice] = 'Thank you for attending Code.org professional development. '\
"We’ve recorded that you were here on #{@session.formatted_date}. "\
'If your workshop is multiple days, you will mark yourself as attended each day of the workshop'

redirect_to CDO.studio_url('/', CDO.default_scheme)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
- content_for(:head) do
= stylesheet_link_tag 'css/pd', media: 'all'

%h1 Attendance recorded

.workshop-attendance-recorded
.left
.fa.fa-check-square-o.checkmark

.right
.paragraph
We’ve recorded that you were here on #{@session.formatted_date}.

.paragraph
Thank you for attending Code.org professional development.

.paragraph
If your workshop is multiple days, you must record attendance each day.

.paragraph
%a{href: '/home'}
%button
Continue