-
Notifications
You must be signed in to change notification settings - Fork 83
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
Slip Calculator Jobs for Assignment and Course #1148
Open
epai
wants to merge
11
commits into
master
Choose a base branch
from
enhancement/epai/slipdays
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b7d01a5
add slipcalc form
epai 9f0fe75
add link to calculate slips
epai d6cbe8c
setup basic job scaffold
epai 5d5e6a9
logic for slip calculation
epai 82c50fa
output csv string
epai a10376a
save csf file - complete assign route
epai 8ef25c9
Merge branch 'master' of https://github.com/Cal-CS-61A-Staff/ok
epai 28d916d
add course slips form
epai 4073666
fix validation errors
epai ddd9e40
cleaup function names
epai 0fab8ba
finish course slips job
epai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add course slips form
- Loading branch information
commit 28d916dd49663f644518233800d0f236be97f703
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -559,13 +559,22 @@ class ExportAssignment(BaseForm): | |
description="Enable to remove identifying information from submissions") | ||
|
||
|
||
class SlipCalculatorForm(BaseForm): | ||
class AssignSlipCalculatorForm(BaseForm): | ||
timescale = SelectField('Time Scale', default="Days", | ||
choices=[(c, c.title()) for c in TIMESCALES], | ||
validators=[validators.required()], | ||
description="Time scale for slip calculation.") | ||
show_results = BooleanField('Show Results', default=False) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if this is useful as an option. We should either always show the results, or don't |
||
|
||
class CourseSlipCalculatorForm(BaseForm): | ||
timescale = SelectField('Time Scale', default="Days", | ||
choices=[(c, c.title()) for c in TIMESCALES], | ||
validators=[validators.required()], | ||
description="Time scale for slip calculation.") | ||
assigns = MultiCheckboxField('Assignments', | ||
description="Select which assignments to calculate slips for.") | ||
show_results = BooleanField('Show Results', default=False) | ||
|
||
########## | ||
# Canvas # | ||
########## | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{% extends "staff/base.html" %} | ||
{% import "staff/_formhelpers.html" as forms %} | ||
|
||
{% block title %} Calculate Slips for {{ current_course.display_name }} {% endblock %} | ||
|
||
{% block main %} | ||
<section class="content-header"> | ||
<h1> | ||
Calculate Slips for {{ current_course.display_name }} | ||
<small>{{ current_course.offering }}</small> | ||
</h1> | ||
<ol class="breadcrumb"> | ||
<li><a href="{{ url_for(".course", cid=current_course.id) }}"> | ||
<i class="fa fa-university"></i> {{ current_course.offering }} | ||
</a></li> | ||
<li><a href="{{ url_for('.course_assignments', cid=current_course.id) }}"> | ||
<i class="fa fa-list"></i> Assignments</a> | ||
</li> | ||
<li><a href="{{ url_for(".course_jobs", cid=current_course.id) }}"> | ||
<i class="fa fa-list"></i>Jobs | ||
</a></li> | ||
<li class="active"><a href="#"> | ||
<i class="fa fa-inbox"></i>Calculate Slips</a> | ||
</li> | ||
</ol> | ||
</section> | ||
<section class="content"> | ||
{% include 'alerts.html' %} | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<div class="box"> | ||
<div class="box-body"> | ||
<p> Calculate slips and save as a .csv file. </p> | ||
{% call forms.render_form(form, action_text='Calculate Slips') %} | ||
{{ forms.render_field(form.timescale) }} | ||
{{ forms.render_checkbox_field(form.assigns) }} | ||
{{ forms.render_checkbox_field(form.show_results) }} | ||
{% endcall %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
{% endblock %} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest keeping the timescale lowercase, so it matches up with the TIMESCALES enum. And you won't need the
.lower()
on L16 in slips.py