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

Add Student Model for Migration #1

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
323ce35
simple clean up
onlyphantom Apr 9, 2019
ef2d4d4
first phase of caching
onlyphantom Apr 15, 2019
ddbb123
Merge pull request #25 from onlyphantom/caching
onlyphantom Apr 15, 2019
101b490
update to jinja 2.10.1 / vulnerability patch
onlyphantom Apr 15, 2019
04561ab
Merge pull request #26 from onlyphantom/caching
onlyphantom Apr 15, 2019
c7cb7f1
inexpensive homepage
onlyphantom Apr 16, 2019
5731cb3
Merge pull request #27 from onlyphantom/caching
onlyphantom Apr 16, 2019
869bf9e
code refactoring on accomplishment page
onlyphantom Apr 17, 2019
4c5c6ac
more human-friendly names in leaderboard #14
onlyphantom Apr 17, 2019
bf4bcf9
Merge pull request #29 from onlyphantom/caching
onlyphantom Apr 17, 2019
f54e335
refactoring #28
onlyphantom Apr 18, 2019
b42339a
Merge pull request #32 from onlyphantom/caching
onlyphantom Apr 18, 2019
b1e09e2
implemented caching #22
onlyphantom Apr 18, 2019
d31641b
Merge pull request #33 from onlyphantom/caching
onlyphantom Apr 18, 2019
6afc635
update dependencies file
onlyphantom Apr 19, 2019
7637261
README and config cleanup
onlyphantom Apr 20, 2019
90162f8
extended admin privileges for backend portal
onlyphantom Apr 20, 2019
c0d44d4
Merge pull request #34 from onlyphantom/veteran
onlyphantom Apr 20, 2019
26f713c
team analytics page sleleton
onlyphantom Apr 21, 2019
6bfde56
Merge pull request #35 from onlyphantom/veteran
onlyphantom Apr 21, 2019
27ff662
added team analytics table
onlyphantom Apr 22, 2019
00abd90
fixed caching
onlyphantom Apr 23, 2019
cf72746
Merge pull request #36 from onlyphantom/veteran
onlyphantom Apr 23, 2019
a649c3a
improved recommendation section
onlyphantom Apr 23, 2019
331e217
added feature for #7 and fixed #37
onlyphantom Apr 24, 2019
5b0e2be
Merge pull request #38 from onlyphantom/veteran
onlyphantom Apr 24, 2019
262f62d
change config setup for modularity
onlyphantom Apr 25, 2019
64cba88
1 less env variables; constructed through string formatting
onlyphantom May 1, 2019
70c97ab
reset cache timeout and use fstring
onlyphantom May 2, 2019
36cf0ea
Bump werkzeug from 0.14.1 to 0.15.3
dependabot[bot] Nov 2, 2019
42c6bb1
Merge pull request #45 from onlyphantom/dependabot/pip/werkzeug-0.15.3
onlyphantom Nov 5, 2019
6401943
logo and homepage improvements
onlyphantom Nov 18, 2019
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
16 changes: 12 additions & 4 deletions app/analytics.py
Original file line number Diff line number Diff line change
@@ -94,6 +94,8 @@ def class_size_hours():
'workshop_category',
scale=alt.Scale(range=['#7dbbd2cc', '#bbc6cbe6', '#6eb0ea', '#d1d8e2', '#1a1d21', '#8f9fb3' ]),legend=None),
tooltip=['workshop_category', 'sum(value)']
).configure_axis(
grid=False
).properties(
width=250
)
@@ -105,7 +107,9 @@ def class_size_hours():
def accum_global():
chart = alt.Chart(g.accum).mark_area().encode(
column=alt.Column('workshop_category', title=None, sort="descending",
header=alt.Header(titleColor='red', labelColor='red', titleAnchor="end")),
header=alt.Header(
labelColor='#ffffff',
titleAnchor="start")),
x=alt.X("workshop_start", title="Date"),
y=alt.Y("cumsum:Q", title="Cumulative"),
color=alt.Color("variable",
@@ -114,11 +118,15 @@ def accum_global():
legend=None
),
tooltip=['variable', 'cumsum:Q']
).properties(width=350).configure_axis(
labelColor='#bbc6cbe6',titleColor='#bbc6cbe6'
).properties(width=350).configure_axis(
labelColor='#bbc6cbe6',
titleColor='#bbc6cbe6',
grid=False
)

return chart.to_json()


@app.route('/data/accum_global_line')
@cache.cached(timeout=86400, key_prefix='gt_line')
def accum_global_line():
@@ -197,7 +205,7 @@ def punchcode():
).properties(
width=300, height=320
).configure_axis(
labelColor='#bbc6cbe6', titleColor='#bbc6cbe6'
labelColor='#bbc6cbe6', titleColor='#bbc6cbe6', grid=False
)
return chart.to_json()

2 changes: 1 addition & 1 deletion app/routes.py
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ def before_request():
@app.route('/index')
def index():
stats=global_total_stats()
return render_template('index.html', employee=g.employee, stats=stats)
return render_template('index.html', stats=stats)

@app.route('/accomplishment')
@login_required
37 changes: 12 additions & 25 deletions app/templates/index.html
Original file line number Diff line number Diff line change
@@ -25,13 +25,7 @@ <h1 class="display-4">{{ stats['students'] }} Students</h1>
</div>
</div>
<hr class="mt-4 col-md-12">
{% if g.employee is none %}
<small>You're not currently registered as an instructor.</small>
{% else %}
<p> You're currently logged in as {{ g.employee.email }}</p>
<a class="btn btn-dark btn-sm" href="{{ url_for('accomplishment') }}" role="button">Accomplishment</a>
<a class="btn btn-secondary btn-sm" href="{{ url_for('analytics') }}" role="button">Analytics</a>
{% endif %}
<small>This project is under active development. <br/> Feature request or report a bug <a href="https://github.com/onlyphantom/pedagogy/issues" class="text-warning">on the project's repo.</a></small>
</div>
<div class="row">
<div class="col-md-10 col-lg-5 col-sm-10">
@@ -52,25 +46,18 @@ <h2>Leaderboard</h2>
<h2>Hours by Category</h2>
<div class="plot" id="vis_home_3"></div>
<hr>
{% if g.employee is none %}
<h2><i class="large material-icons">lock</i> Personal Statistics</h2>
<div>
<p>You're not currently registered as an instructor.</p>
<p>As an instructor, you unlock detailed performance statistics under the Accomplishment page:</p>
<ul>
<li>Personal Accomplishments</li>
<li>Accumulative Statistics</li>
<li>Key Milestones</li>
<li>Performance Indicators</li>
<li>Student Reviews</li>
</ul>
</div>
{% else %}
<h2><i class="large material-icons">insert_chart_outlined</i> Personal Statistics</h2>
<p>You're currently logged in as {{ g.employee.email }}</p>
<a class="btn btn-dark btn-sm" href="{{ url_for('accomplishment') }}" role="button">Accomplishment</a>
<a class="btn btn-secondary btn-sm" href="{{ url_for('analytics') }}" role="button">Analytics</a>
{% endif %}
<p>Registered as an instructor on Pedagogy? <br>
Log in and view detailed performance statistics:</p>
<ul>
<li>Personal Accomplishments</li>
<li>Accumulative Statistics</li>
<li>Key Milestones</li>
<li>Performance Indicators</li>
<li>Student Reviews</li>
</ul>
<a class="btn btn-dark btn-sm" href="{{ url_for('accomplishment') }}" role="button">Accomplishment</a>
<a class="btn btn-secondary btn-sm" href="{{ url_for('analytics') }}" role="button">Analytics</a>
</div>
</div>
<div class="col-md-10 col-lg-7 col-sm-10 mt-4">