forked from HackFSU/hackfsu-2018
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
working /hacks; working grade results (with manually added data); adm…
…in fixes
- Loading branch information
Showing
13 changed files
with
209 additions
and
25 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
api/migrations/0026_remove_judgingcriteria_devpost_name.py
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,19 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.10.4 on 2017-02-19 08:56 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api', '0025_auto_20170219_0255'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='judgingcriteria', | ||
name='devpost_name', | ||
), | ||
] |
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,32 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.10.4 on 2017-02-19 09:07 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api', '0026_remove_judgingcriteria_devpost_name'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='judgingassignment', | ||
name='judge', | ||
field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='api.JudgeInfo'), | ||
preserve_default=False, | ||
), | ||
migrations.AlterField( | ||
model_name='hack', | ||
name='extra_judging_criteria', | ||
field=models.ManyToManyField(blank=True, to='api.JudgingCriteria'), | ||
), | ||
migrations.AlterField( | ||
model_name='judgingcriteria', | ||
name='criteria_type', | ||
field=models.SmallIntegerField(choices=[(0, 'Overall'), (1, 'Superlative'), (2, 'Manual')]), | ||
), | ||
] |
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
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
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
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
Empty file.
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,18 @@ | ||
extends ../../_pug/standardLayout.pug | ||
|
||
block vars | ||
- | ||
var pageName = "Submitted Hacks" | ||
var viewDir = "/static/views/hacks" | ||
var DataTables = true | ||
block append scripts | ||
script(src=`${viewDir}/script.js`) | ||
|
||
block content | ||
h1 Submitted Hacks | ||
p If you do not see yourself or something is wrong, notify an organizer! This list was exported from Devpost and then imported into our internal judging system. Our system will ensure that your hack is graded in a fair and timely manner. Good luck! | ||
p When it is not your turn to expo, check out the other hackers' projects! | ||
p: b: i IF YOU ARE NOT AT YOUR TABLE YOU MAY BE DISQUALIFIED, STAY THERE. | ||
|
||
table#hacks.table.table-striped.table-bordered(cellspacing="0" width="100%") |
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,9 @@ | ||
""" | ||
Public hack roster | ||
""" | ||
|
||
from hackfsu_com.views.generic import PageView | ||
|
||
|
||
class HacksPage(PageView): | ||
template_name = 'hacks/index.html' |
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,81 @@ | ||
/** | ||
* Mentor help request view page | ||
*/ | ||
|
||
(function($) { | ||
'use strict'; | ||
|
||
var table = $('table#hacks'); | ||
|
||
var COLS = { | ||
'Table Number': { data: 'table_number' }, | ||
'Hack Name': { data: 'name' }, | ||
'Expo': { data: 'expo' }, | ||
'Opt-In Prizes' : { data: 'criteria'} | ||
}; | ||
|
||
/** | ||
* Formats the table html | ||
*/ | ||
function createTable(table, colData) { | ||
var tableHead = $('<thead><tr></tr></thead>'); | ||
var tableHeadRow = tableHead.find('tr'); | ||
|
||
Object.keys(colData).forEach(function(columnName) { | ||
tableHeadRow.append('<th>'+columnName+'</th>'); | ||
}); | ||
|
||
table.append(tableHead); | ||
table.append('<tbody></tbody>'); | ||
} | ||
|
||
/** | ||
* Retrieves data | ||
*/ | ||
function getData() { | ||
var dfd = $.Deferred(); | ||
|
||
$.ajaxGet({ | ||
url: '/api/judge/get/hacks_with_criteria' | ||
}) | ||
.done(function(res) { | ||
dfd.resolve(res['hacks']); | ||
}) | ||
.fail(function(err) { | ||
dfd.reject(err); | ||
}); | ||
|
||
return dfd.promise(); | ||
} | ||
|
||
/** | ||
* Populates the DataTable with help requests | ||
*/ | ||
function populateTable(table, colData, data) { | ||
var colNames = Object.keys(colData); | ||
|
||
table.DataTable({ | ||
dom: | ||
"<'row flex-align-center flex-wrap'<'col-sm-6'l><'col-sm-6'f>>" + | ||
"<'row'<'col-sm-12'tr>>" + | ||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", | ||
responsive: true, | ||
lengthMenu: [[25, 50, 100, -1], [25, 50, 100, 'All']], | ||
data: data, | ||
columns: $.map(colData, function(data) { | ||
return data; | ||
}), | ||
order: [ | ||
[colNames.indexOf('Table Number'), 'asc'] | ||
] | ||
}); | ||
} | ||
|
||
// Create page | ||
createTable(table, COLS); | ||
getData().done(function(data) { | ||
populateTable(table, COLS, data); | ||
}); | ||
|
||
|
||
})(jQuery); |