diff options
| author | Waref Haque <warefhaque@Warefs-MacBook-Pro.local> | 2016-07-19 23:21:20 +0000 |
|---|---|---|
| committer | Waref Haque <warefhaque@Warefs-MacBook-Pro.local> | 2016-07-19 23:21:20 +0000 |
| commit | 5dccd5e1c80450375b1f32869d0a4f8d0c7689ba (patch) | |
| tree | 1702e366b2ee2a141e6f6e4f85686149a9c848ba | |
| parent | daefddd8dc45e7044e83bd40706cfdca36471fe9 (diff) | |
added the id to exams passed
| -rw-r--r-- | .idea/workspace.xml | 167 | ||||
| -rw-r--r-- | routes/index.js | 15 |
2 files changed, 145 insertions, 37 deletions
diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a15a1d8..98b079d 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,7 +2,7 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="4718d530-71c3-46c6-9a25-2c29293cab58" name="Default" comment=""> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app.js" afterPath="$PROJECT_DIR$/app.js" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/routes/index.js" afterPath="$PROJECT_DIR$/routes/index.js" /> </list> <ignored path="solutions_repo.iws" /> @@ -24,31 +24,41 @@ </component> <component name="FileEditorManager"> <leaf> - <file leaf-file-name="index.js" pinned="false" current-in-tab="false"> + <file leaf-file-name="index.js" pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/routes/index.js"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="1136"> - <caret line="109" column="1" selection-start-line="109" selection-start-column="1" selection-end-line="109" selection-end-column="1" /> + <state relative-caret-position="120"> + <caret line="53" column="14" selection-start-line="53" selection-start-column="14" selection-end-line="53" selection-end-column="14" /> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="www.js" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/bin/www.js"> + <file leaf-file-name="node_simple.js" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/node_simple.js"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="195"> - <caret line="13" column="0" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" /> + <state relative-caret-position="-300"> + <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="app.js" pinned="false" current-in-tab="true"> - <entry file="file://$PROJECT_DIR$/app.js"> + <file leaf-file-name="index.hbs" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/views/index.hbs"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="341"> - <caret line="34" column="0" selection-start-line="34" selection-start-column="0" selection-end-line="34" selection-end-column="0" /> + <state relative-caret-position="-120"> + <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="script.js" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/assets/js/script.js"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="250"> + <caret line="57" column="9" selection-start-line="57" selection-start-column="9" selection-end-line="57" selection-end-column="9" /> <folding /> </state> </provider> @@ -62,8 +72,8 @@ <component name="IdeDocumentHistory"> <option name="CHANGED_PATHS"> <list> - <option value="$PROJECT_DIR$/routes/index.js" /> <option value="$PROJECT_DIR$/app.js" /> + <option value="$PROJECT_DIR$/routes/index.js" /> </list> </option> </component> @@ -154,6 +164,38 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="solutions_repo" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="solutions_repo" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="assets" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="js" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="solutions_repo" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="solutions_repo" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="assets" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> </subPane> </pane> </panes> @@ -166,11 +208,56 @@ <property name="nodejs_interpreter_path" value="/usr/local/bin/node" /> <property name="javascript.nodejs.core.library.configured.version" value="6.2.2" /> <property name="settings.editor.splitter.proportion" value="0.2" /> + <property name="js-jscs-nodeInterpreter" value="/usr/local/bin/node" /> </component> <component name="RunManager"> + <configuration default="true" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application"> + <method /> + </configuration> + <configuration default="true" type="DartTestRunConfigurationType" factoryName="Dart Test"> + <method /> + </configuration> + <configuration default="true" type="JavaScriptTestRunnerKarma" factoryName="Karma"> + <config-file value="" /> + <node-interpreter value="project" /> + <envs /> + <method /> + </configuration> + <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug"> + <method /> + </configuration> <configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" working-dir=""> <method /> </configuration> + <configuration default="true" type="cucumber.js" factoryName="Cucumber.js"> + <option name="cucumberJsArguments" value="" /> + <option name="executablePath" /> + <option name="filePath" /> + <method /> + </configuration> + <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js"> + <method /> + </configuration> + <configuration default="true" type="js.build_tools.npm" factoryName="npm"> + <command value="run-script" /> + <scripts /> + <node-interpreter value="project" /> + <envs /> + <method /> + </configuration> + <configuration default="true" type="mocha-javascript-test-runner" factoryName="Mocha"> + <node-interpreter>project</node-interpreter> + <node-options /> + <working-directory /> + <pass-parent-env>true</pass-parent-env> + <envs /> + <ui>bdd</ui> + <extra-mocha-options /> + <test-kind>DIRECTORY</test-kind> + <test-directory /> + <recursive>false</recursive> + <method /> + </configuration> </component> <component name="ShelveChangesManager" show_recycled="false"> <option name="remove_strategy" value="false" /> @@ -182,12 +269,12 @@ <option name="number" value="Default" /> <option name="presentableId" value="Default" /> <updated>1468901747117</updated> - <workItem from="1468901749320" duration="256000" /> + <workItem from="1468901749320" duration="2238000" /> </task> <servers /> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="256000" /> + <option name="totallyTimeSpent" value="2238000" /> </component> <component name="ToolWindowManager"> <frame x="4" y="23" width="1276" height="777" extended-state="6" /> @@ -198,18 +285,18 @@ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> <window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> - <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.329927" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> + <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.44233575" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" /> + <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> - <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> - <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> </layout> </component> <component name="VcsContentAnnotationSettings"> @@ -220,10 +307,10 @@ <watches-manager /> </component> <component name="editorHistoryManager"> - <entry file="file://$PROJECT_DIR$/routes/index.js"> + <entry file="file://$PROJECT_DIR$/app.js"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="1136"> - <caret line="109" column="1" selection-start-line="109" selection-start-column="1" selection-end-line="109" selection-end-column="1" /> + <state relative-caret-position="341"> + <caret line="34" column="0" selection-start-line="34" selection-start-column="0" selection-end-line="34" selection-end-column="0" /> <folding /> </state> </provider> @@ -236,10 +323,42 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/app.js"> + <entry file="file://$PROJECT_DIR$/views/exams.hbs"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="341"> - <caret line="34" column="0" selection-start-line="34" selection-start-column="0" selection-end-line="34" selection-end-column="0" /> + <state relative-caret-position="300"> + <caret line="20" column="0" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/views/index.hbs"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="-120"> + <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/assets/js/script.js"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="250"> + <caret line="57" column="9" selection-start-line="57" selection-start-column="9" selection-end-line="57" selection-end-column="9" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/node_simple.js"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="-300"> + <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/routes/index.js"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="120"> + <caret line="53" column="14" selection-start-line="53" selection-start-column="14" selection-end-line="53" selection-end-column="14" /> <folding /> </state> </provider> diff --git a/routes/index.js b/routes/index.js index 1406143..72e6c5b 100644 --- a/routes/index.js +++ b/routes/index.js @@ -59,7 +59,8 @@ router.get('/exams/:id', function(req, res, next) { term:toProperCase(exams[i].term), instructors:exams[i].instructors, type:toProperCase(exams[i].type) + " Examination", - title:exams[i].title + title:exams[i].title, + id:exams[i]._id }; //console.log(minExamInfo); minExamInfoArray.push(minExamInfo); @@ -91,18 +92,6 @@ app.get('/exams.html', function (req,res) { res.sendFile(__dirname+'/exams.html'); });*/ - -function getExamsForCourseCode(courseCode) { - dbFile.get_all_exams(courseCode, function (exams) { - if (exams.length == 0){ - console.log("Nothing was found"); - } - else { - console.log(exams); - } - }); -} - module.exports = router; function toProperCase(string) { |
