Skip to content
Snippets Groups Projects
Commit 111f8c16 authored by robinwilliam.hundt's avatar robinwilliam.hundt
Browse files

Started work on submission notes

parent fa26fc3e
No related branches found
No related tags found
2 merge requests!23Resolve "Logout of tutors after inactivity",!18WIP: Submission notes
......@@ -25,3 +25,6 @@ env/
scripts/
*.csv
.importer*
# node
node_modules
<template>
<table>
<tr>
<th>Submission of student</th>
</tr>
<tr v-for="line in source">
<td><span>{{ line }}</span></td>
</tr>
</table>
</template>
<script>
export default {
name: 'annotated-submission',
data: function () {
return {
source: '//Procedural Programming technique shows creation of Pascal\'s Triangl\n' +
'#include <iostream>\n' +
'#include <iomanip>\n' +
'using namespace std;\n' +
'int** comb(int** a , int row , int col)\n' +
'{\n' +
' int mid = col/2;\n' +
' //clear matrix\n' +
' for( int i = 0 ; i < row ; i++)\n' +
' for( int j = 0 ; j < col ; j++)\n' +
' a[i][j] = 0;\n' +
' a[0][mid] = 1; //put 1 in the middle of first row\n' +
' //build up Pascal\'s Triangle matrix\n' +
' for( int i = 1 ; i < row ; i++)\n' +
' {\n' +
' for( int j = 1 ; j < col - 1 ; j++)\n' +
' a[i][j] = a[i-1][j-1] + a[i-1][j+1];\n' +
' }\n' +
' return a;\n' +
'}\n' +
'void disp(int** ptr, int row, int col)\n' +
'{\n' +
' cout << endl << endl;\n' +
' for ( int i = 0 ; i < row ; i++)\n' +
' {\n' +
' for ( int j = 0 ; j < col ; j++)\n' +
' {\n' +
' if( ptr[i][j] == 0)\n' +
' cout << " ";\n' +
' else\n' +
' cout << setw(4) << right << ptr[i][j];\n' +
' }\n' +
' cout << endl;\n' +
' }\n' +
' cout << endl << endl;\n' +
'}\n' +
'int main()\n' +
'{\n' +
' int **ptr, m, n;\n' +
' cout << "\\nEnter number of rows to draw Pascal\'s Triangle: ";\n' +
' cin >> m;\n' +
' n = 2 * m + 1; //column = 2 * row + 1\n' +
'\n' +
' ptr = new int*[m];\n' +
' for( int i = 0 ; i < m ; i++)\n' +
' ptr[i] = new int[n];\n' +
'\n' +
' ptr = comb(ptr, m, n);//calling function for array creation\n' +
'\n' +
' disp(ptr, m, n);//calling function for array displaying.\n' +
'\n' +
' return 0;\n' +
'}'
}
}
}
</script>
......@@ -6,6 +6,8 @@ import router from './router'
import store from './store/store'
import Vuetify from 'vuetify'
import 'static/google-code-prettify/prettify.js'
import 'static/google-code-prettify/prettify.css'
import 'vuetify/dist/vuetify.min.css'
Vue.use(Vuetify)
......
......@@ -2,6 +2,7 @@ import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import StudentPage from '@/components/student/StudentPage'
import AnnotatedSubmission from '@/components/submission_notes/AnnotatedSubmission'
Vue.use(Router)
......@@ -16,6 +17,11 @@ export default new Router({
path: '/student/',
name: 'student-page',
component: StudentPage
},
{
path: '/student/submission/:id',
name: 'submission',
component: AnnotatedSubmission
}
]
})
......@@ -5846,6 +5846,10 @@ vuetify@^0.16.9:
version "0.16.9"
resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-0.16.9.tgz#fd61f219e4a40d7afe5e24a803df5658a40b38e4"
vuetify@^0.16.9:
version "0.16.9"
resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-0.16.9.tgz#fd61f219e4a40d7afe5e24a803df5658a40b38e4"
vuex@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.0.1.tgz#e761352ebe0af537d4bb755a9b9dc4be3df7efd2"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment