diff --git a/LICENSE.md b/LICENSE.md index 9716a1a..74e0383 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,25 +1,25 @@ The MIT License (MIT) Copyright (c) 2014, Students of UMM Csci 3601, Spring 2014 course offering -Callery,Emma, -Chapman,Josh, -Donatucci,David, -Eberhardt,Jeremy, -Gensch,Brennan, -Harren,Thomas, -Linder,Matthew -Megarry,Henry Thomas, -Mitchell,Brian, -Pagels,David Andrew, -Peterson,Andrew Lawrence, -Rachor,Kristin Marie, -Schuweiler,Michael, -Smolund,Isaac, -Stenberg,Dillon, -Stock,Brandon, -Vink,Zachary, -Walcome,Xavier Sarek, -Yadeau,Justin. +Emma Callery, +Josh Chapman, +David Donatucci, +Jeremy Eberhardt, +Brennan Gensch, +Thomas Harren, +Matthew Linder, +Henry Thomas Megarry, +Brian Mitchell, +David Andrew Pagels, +Andrew Lawrence Peterson, +Kristin Marie Rachor, +Michael Schuweiler, +Isaac Smolund, +Dillon Stenberg, +Brandon Stock, +Zachary Vink, +Xavier Sarek Walcome, +Justin Yadeau. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/public/js/views/dashView.coffee b/public/js/views/dashView.coffee index fda90f3..f4810b7 100644 --- a/public/js/views/dashView.coffee +++ b/public/js/views/dashView.coffee @@ -71,7 +71,7 @@ class window.dashView extends Backbone.View shortTitle += '...' buttonString += buttonString1 + p + buttonString2 + shortTitle + buttonString3 - #append the buttons to the div 'customModels' +# append the buttons to the div 'customModels' $('#customModels').append(buttonString) this @@ -80,7 +80,7 @@ class window.dashView extends Backbone.View window.location.href = '/model-maker' loadYourPrompts: -> - #when you + #when you click any of your made prompts $('.yourPrompts').click -> prompt = this.id thePrompt = new request @@ -123,7 +123,7 @@ class window.dashView extends Backbone.View $('#essayArea').hide() submitEssay: -> - # alerts user if no text has been entered +# alerts user if no text has been entered if $('#essayContents').val() is "" alert "Please enter text to for LightSide to Grade." @@ -137,18 +137,18 @@ class window.dashView extends Backbone.View text: $('#essayContents').val() }).save().done -> - # Post a prediction task to calculate the grade of the essay. +# Post a prediction task to calculate the grade of the essay. thePredictionTask = new predictionTask({ answer_set: theAnswerSet.responseJSON.url trained_model: thePrompt.responseJSON.default_models[0] }).save().done -> - # Adds the prediction task to the process queue +# Adds the prediction task to the process queue theProcess = new request() theProcess.urlRoot = thePredictionTask.responseJSON.process theProcess.save().done -> - # Request for checking status of essay grade calculation every second +# Request for checking status of essay grade calculation every second thePredictionStatus = new request() looping = setInterval (-> @@ -157,7 +157,7 @@ class window.dashView extends Backbone.View if thePredictionStatus.attributes.status == 'S' - # Gets the grade +# Gets the grade thePredictionResult = new predictionResult().fetch().done -> $('#grade').html("Your grade for the submitted essay is " + thePredictionResult.responseJSON.results[0].label + " out of 5.") diff --git a/public/unzip/unzip.js b/public/unzip/unzip.js index f26df0b..f386d3e 100644 --- a/public/unzip/unzip.js +++ b/public/unzip/unzip.js @@ -9,30 +9,30 @@ //Ideally we'd use the API, but as a stop-gap, we tried to use the ZipJs library. It was way beyond my understanding, // so i'll leave this here - -function processEssay(aString) { -//returns one complete line for a csv, given an essay. - var regex = /{#.*}/ - //This regex finds our grade segment - which has the form {#grade1#grade2}. - //It assumes that it is among the first elements of a Essay. - //So similar forms *CAN* be in an essay, but ours *HAS* to be first. - var grades = getGrades(aString.match(regex)) - var csvLine = ""; - for (var i = 0; i <= grades.length; i++){ - csvLine = csvLine + grades[i] + ", "; - } - //here we add the essay to the line, removing our grade construct. - return (csvLine + aString.replace(regex, "") + "\r\n") -} - function getGrades(aString){ - var regex = /#([^#{}\s]*)/gm - //Matches hash tags, globally, with any non hash character in them. + var regex = /#([^#{}\s]*)/gm; + //Matches hashtags, globally, with any non hash character in them. //So the hash ## is *NOT* ok, but all other hashes work. //Even Unicode characters - #漢字 should work! return aString.match(regex); } +function processEssay(aString) { +//returns one complete line for a csv, given an essay. + var regex = /{#.*}/; + //This regex finds our grade segment - which has the form {#grade1#grade2}. + //It assumes that it is among the first elements of a Essay. + //So similar forms *CAN* be in an essay, but ours *HAS* to be first. + var tags = aString.match(regex); + var grades = getGrades(tags[0]); + var csvLine = ""; + for (var i = 0; i < grades.length; i++){ + csvLine = csvLine + grades[i] + ", "; + } + //here we add the essay to the line, removing our grade construct. + return (csvLine + aString.replace(regex, "") + "\r\n"); +} + function dezip(zip){ //get the contents of a zip file //return the compressed contents of a zip. diff --git a/routes/user.coffee b/routes/user.coffee index a152202..1c5582b 100644 --- a/routes/user.coffee +++ b/routes/user.coffee @@ -40,6 +40,7 @@ populateDB = -> email: 'lal@lol.com' firstName: 'Justin' surname: 'YaDeau' + promptArray: ["https://try-api.lightsidelabs.com/api/prompts/449"] }, { password: '9hnMILd23145' diff --git a/routes/user.js b/routes/user.js index 10a6e5e..3a73899 100644 --- a/routes/user.js +++ b/routes/user.js @@ -46,7 +46,8 @@ Module dependencies. password: '4321', email: 'lal@lol.com', firstName: 'Justin', - surname: 'YaDeau' + surname: 'YaDeau', + promptArray: ["https://try-api.lightsidelabs.com/api/prompts/449"] }, { password: '9hnMILd23145', email: 'Ha@lol.com', diff --git a/routes/user.map b/routes/user.map index da22e03..4f183a6 100644 --- a/routes/user.map +++ b/routes/user.map @@ -6,5 +6,5 @@ "user.coffee" ], "names": [], - "mappings": ";AAAA;AAAA;;GAAA;AAAA;AAAA;AAAA,MAAA,gEAAA;;AAAA,EAKA,OAAA,GAAU,OAAA,CAAQ,SAAR,CALV,CAAA;;AAAA,EAMA,IAAA,GAAO,OAAA,CAAQ,uBAAR,CAAgC,CAAC,IANxC,CAAA;;AAAA,EAOA,QAAA,GAAW,OAAA,CAAQ,UAAR,CAPX,CAAA;;AAAA,EAQA,aAAA,GAAgB,OAAA,CAAQ,gBAAR,CAAyB,CAAC,QAR1C,CAAA;;AAAA,EAaA,IAAI,CAAC,KAAL,CAAW,EAAX,EAAc,SAAC,GAAD,EAAM,CAAN,GAAA;AAEZ,IAAA,IAAG,CAAA,KAAK,CAAR;aAEE,UAAA,CAAA,EAFF;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GAAD,EAAM,IAAN,GAAA;AAC1B,QAAA,IAAoB,GAApB;AAAA,iBAAO,IAAA,CAAK,GAAL,CAAP,CAAA;SAAA;AACA,QAAA,IAAA,CAAA,IAAA;AAAA,iBAAO,IAAA,CAAK,IAAL,EAAW,KAAX,CAAP,CAAA;SADA;AAEA,QAAA,IAAgC,IAAI,CAAC,QAAL,KAAiB,QAAjD;AAAA,iBAAO,IAAA,CAAK,IAAL,EAAW,KAAX,CAAP,CAAA;SAFA;eAGA,IAAA,CAAK,IAAL,EAAW,IAAX,EAJ0B;MAAA,CAD9B,CAAA,CADe;IAAA,CAAjB,CAAA,CADF;EAAA,CAJ4B,CAAhC,CAlEA,CAAA;;AAAA,EAkFA,MAAM,CAAC,OAAP,GAAiB,QAlFjB,CAAA;AAAA" } \ No newline at end of file diff --git a/views/partials/dashboard.html b/views/partials/dashboard.html index 86c895a..44a868f 100644 --- a/views/partials/dashboard.html +++ b/views/partials/dashboard.html @@ -3,7 +3,7 @@

Welcome {{user.firstName}}, Select a Model to Use or Edit

- +

Here Is Your Model

@@ -20,6 +20,7 @@

Here is what our Model Reports:

+

Explore Our Ready To Use Models!

+ +
Account @@ -56,4 +59,5 @@

Welcome to the Dashboard, a place where

Custom Models will be built to your specifications and displayed for you to use here on the Dashboard.

+ \ No newline at end of file diff --git a/views/partials/model.html b/views/partials/model.html index 27af9d2..c897b14 100644 --- a/views/partials/model.html +++ b/views/partials/model.html @@ -41,7 +41,7 @@

Please Wait For LightSide To Build Your Model

-

This may take about half an hour, please do not close your browser window if you have not chosen to receive an email notification about your model.

+

This may take about half an hour, please do not close your browser window.


diff --git a/views/partials/welcome.html b/views/partials/welcome.html index 06835ec..245bd33 100644 --- a/views/partials/welcome.html +++ b/views/partials/welcome.html @@ -49,6 +49,7 @@

Sign in to create and use your own models!×

Welcome!!

+ +