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

Grading panel #527

Merged
merged 42 commits into from
May 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
016a98e
Added a new TA role
vakrao Jun 2, 2018
f98ea02
Changed how to edit course
vakrao Jun 20, 2018
aef8649
fixed merge conflicts
vakrao Jun 20, 2018
f29f4fe
Merge branch 'dev' into roles
vakrao Jun 20, 2018
84aebfa
Making changes to sectionform to add TA class to course
vakrao Jul 11, 2018
9131340
TA changes
vakrao Jul 17, 2018
b96028f
Fixed search error. Added TA HTML.
vakrao Jul 26, 2018
b8da8a6
Added new section and user endpoints. Currently whitescreens after se…
vakrao Aug 9, 2018
31742b5
Able to now see studentsin dropdown box
vakrao Aug 12, 2018
93af091
TA Add works, but, does not persist into DB.
vakrao Aug 13, 2018
18089c6
SectionForm controller now works for adding a TA to a section
vakrao Aug 15, 2018
60f2511
Teaching Assistant attributes persists to database
vakrao Aug 16, 2018
6628954
Fixed conflicts
ra0s Sep 25, 2018
12ebf27
Full backend functionality added.
vakrao Oct 2, 2018
a258c2b
fixed conflicts
ra0s Oct 2, 2018
0fb7b36
Small changes on the way to having a grading panel
ra0s Oct 20, 2018
9d0f506
TA Navbar working
ra0s Oct 30, 2018
eb6d70a
Added some seed data
ra0s Oct 30, 2018
920431e
updating student gradeview
ra0s Nov 2, 2018
0869fea
Added TA folder
ra0s Nov 2, 2018
165a880
Reverting some changes
ra0s Nov 27, 2018
0a779e5
Accounted for TAs in submission model
ra0s Nov 27, 2018
b4726db
small changes
ra0s Dec 12, 2018
93e8a98
Adding server/access.log
nums11 Jan 25, 2019
e59b57d
fixed issue where students could verify their own submission
Mar 12, 2019
76c381f
fixed issue where students could verify their own submission
Mar 12, 2019
28c3ecb
Allowing Student's to be Added as TAs
nums11 Mar 14, 2019
afd9122
Making student submissions visible to TAs
nums11 Mar 14, 2019
6bf4694
Allowing TAs to validate student submissions
nums11 Mar 14, 2019
679beea
Removing test alert message
nums11 Mar 21, 2019
133a329
Fixing roles merge conflicts
nums11 Mar 21, 2019
4d5f73a
Fixing error message for pull request
nums11 Apr 9, 2019
f50ddf9
Fixing Merge Conflicts
nums11 Apr 9, 2019
346b414
Merge branch 'dev' into grading_panel
nums11 Apr 9, 2019
e8e67a2
Merge branch 'dev' of https://github.com/rcos/venue into dev
nums11 Apr 15, 2019
d0c29b7
merging with dev
nums11 Apr 15, 2019
691f923
Adding seed for Grading Panel Test
nums11 Apr 15, 2019
e2aef15
Adding Foo's Submission To seeds
nums11 Apr 15, 2019
e6a26d1
Restricting TAs from verifying their own submissions
nums11 Apr 17, 2019
0b87c3f
Commenting seed changes for testing
nums11 Apr 23, 2019
6b45e5f
Updating user model test for new seeded event
nums11 May 7, 2019
b0cc10c
Fixing merge conflicts
nums11 May 8, 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
1 change: 0 additions & 1 deletion client/app/courses/sections/edit/sectionedit.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default class SectionEditCtrl {
}, section => {
$scope.course = section.course;
$scope.section = section;

}, () =>{
$location.path('/courses');
});
Expand Down
4 changes: 4 additions & 0 deletions client/app/courses/sections/view/sectionview.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ export default class SectionViewCtrl {
withSectionsCourse:true,
withSectionsEvent: true,
withSectionsInstructors: true,
withSectionsAssistants: true,
withSectionsStudents: true,
withEnrollmentStatus: true,
studentId: $scope.user._id
}, section => {
$scope.course = section.course;
$scope.section = section;
console.log(section.teachingAssistants)
}, () =>{
$location.path('/courses');
});
Expand All @@ -27,6 +29,7 @@ export default class SectionViewCtrl {
$location.path('instructor/courses/'+$routeParams.id+'/sections/'+$routeParams.sectionId);
}
loadSection();

});

$scope.selecteEvent = function(event){
Expand All @@ -44,6 +47,7 @@ export default class SectionViewCtrl {
});
};
$scope.viewCourse = function(){
console.log(section)
$location.path('/courses/'+$routeParams.id);
};
}
Expand Down
9 changes: 9 additions & 0 deletions client/app/courses/sections/view/sectionview.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ <h4 class="no-spacing">Section Info</h4>
</span>
</td>
</tr>
<tr>
<td class="text-right">Teaching Assistants<span ng-show="section.assistants.length > 1">s</span></td>
<td class="text-left">
<span ng-repeat="ta in section.assistants">
<span ng-show="$last && !$first">& </span>{{ta.firstName}} {{ta.lastName}}<span ng-hide="$last">, </span>
</span>
</td>
</tr>
<tr>
<td class="text-right">Section Number<span ng-show="section.sectionNumbers.length > 1">s</span></td>
<td class="text-left">
Expand All @@ -60,6 +68,7 @@ <h4 class="no-spacing">Section Info</h4>
<td class="text-right">Enrollment Policy</td>
<td class="text-left">{{(section.enrollmentPolicy === "approvalRequired")?"approval":section.enrollmentPolicy}}</td>
</tr>

</table>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions client/app/courses/view/courseview.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default class CourseViewCtrl {
id: $routeParams.id,
withSections:true,
withSectionInstructors: true,
withSectionAssistants: true,
withSectionEnrollmentStatus: true,
studentid: user._id,
checkRoles: true
Expand Down
17 changes: 15 additions & 2 deletions client/app/courses/view/courseview.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ <h4 ng-show="!course.sections.length" class="no-spacing">No Sections Created</h4

<table class="course-section text-center table table-hover" ng-show="course.sections.length">
<tr>
<th class="text-center">Number</th>
<th class="text-center">Instructor</th>
<th char="" lass="text-center">Number</th>
<th class="text-center">Instructor</th>
<th class="text-center">Teaching Assistants</th>
<th class="text-center">Students</th>
<th class="text-center">Pending</th>
<th class="text-center">Info</th>
Expand All @@ -62,6 +63,12 @@ <h4 ng-show="!course.sections.length" class="no-spacing">No Sections Created</h4
{{instructor.firstName}} {{instructor.lastName}}<span ng-hide="$last">, </span>
</span>
</td>

<td>
<span ng-repeat="assistant in section.teachingAssistants">
{{assistant.firstName}} {{assistant.lastName}}<span ng-hide="$last">, </span>
</span>
</td>
<td>
<span class='studentCount'>{{section.students.length}}</span>
</td>
Expand All @@ -84,6 +91,7 @@ <h4 ng-show="!course.sections.length">No Sections Avalible</h4>
<tr>
<th class="text-center">Number</th>
<th class="text-center">Instructor</th>
<th class="text-center">Teaching Assistants</th>
<th class="text-center">Students</th>
<th class="text-center">Enrollment Policy</th>
<th class="text-center">Info</th>
Expand All @@ -97,6 +105,11 @@ <h4 ng-show="!course.sections.length">No Sections Avalible</h4>
{{instructor.firstName}} {{instructor.lastName}}
</span>
</td>
<td>
<span ng-repeat="assistant in section.teachingAssistants">
{{assistant.firstName}} {{assistant.lastName}}<span ng-hide="$last">, </span>
</span>
</td>
<td>
<span class='studentCount'>{{section.students.length}}</span>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default class InstructorSectionViewCtrl implements OnInit{
withSectionsInstructors: true,
withSectionsStudents: true,
withSectionsPendingStudents: true,
withSectionsAssistants: true,
withEnrollmentStatus: true,
studentId: $scope.user._id
}, section => {
Expand Down
10 changes: 9 additions & 1 deletion client/app/instructor/courses/sections/sectionview.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class='container instructor'>
<div class='container instructor'>
<div class="instructorSectionview">
<course-title-banner section="section" course="course" link="/courses/{{course._id}}"></course-title-banner>

Expand All @@ -18,6 +18,14 @@ <h4><a href="/login">Log in</a> to learn more</h4>
<span ng-show="$last && !$first">& </span>{{instructor.firstName}} {{instructor.lastName}}<span ng-hide="$last">, </span>
</span>
</td>
</tr>
<tr>
<td class="text-right section-info">Teaching Assistant(s)<span ng-show="section.teachingAssistants.length > 1">s</span></td>
<td class="text-left section-info">
<span ng-repeat="ta in section.teachingAssistants">
<span ng-show="$last && !$first">& </span>{{ta.firstName}} {{ta.lastName}}<span ng-hide="$last">, </span>
</span>
</td>
</tr>
<tr>
<td class="text-right">Section Number<span ng-show="section.sectionNumbers.length > 1">s</span></td>
Expand Down
28 changes: 28 additions & 0 deletions client/app/student/dashboard/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@
<div class="row">
<div class="col-sm-12 dashboard">
<h1 class="page-header">Dashboard</h1>
<div class="col-sm-12 top-rowst" ng-show="isTA" ng-cloak>
<h3>TA Sections</h3>
<h4 ng-hide="sections.length">You don't have any sections yet</h4>
<table class="course-section text-center table table-hover" ng-show="sections.length">
<tr>
<th class="text-center">Course</th>
<th class="text-center">Section</th>
<th class="text-center">Pending</th>
<th class="text-center">Students</th>
<th class="text-center">Edit</th>
</tr>
<tr class='btn-row-sm' ng-repeat="section in sections" ng-show="section.pendingStudents.length > 0">
<td>
<span class='studentCount'>{{section.course.name}}</span>
</td>
<td><span ng-repeat="number in section.sectionNumbers"><span ng-show="$last && !$first">& </span>{{number}}<span ng-hide="$last">, </span></span></td>
<td>
<span>{{section.pendingStudents.length}}</span>
</td>
<td>
<span>{{section.students.length}}</span>
</td>
<td>
<a href="#" class="btn btn-default btn-sm" ng-href="{{ viewSection(section) }}" role="button">View</a>
</td>
</tr>
</table>
</div>
<div class="row">
<div class="col-md-6 events" ng-cloak>
<h3> Upcoming Events </h3>
Expand Down
18 changes: 18 additions & 0 deletions client/app/student/grading/grading.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';
export default class GradingCtrl {

/*@ngInject*/
constructor($scope, $location, User, Auth, Submission) {
$scope.refreshSubmissions = function() {
Submission.getAll({'onlyTA':'me', 'withStudents': true, 'withSection':true, 'withSectionCourse':true}, (submissions)=>{
$scope.submissions = submissions;
});
}

$scope.refreshSubmissions();

$scope.goToEvent = (event) => {
$location.path("/events/" + event._id);
};
}
}
21 changes: 21 additions & 0 deletions client/app/student/grading/grading.controller.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use strict';

describe('Controller: GradingCtrl', function () {

// load the controller's module
beforeEach(module('venueApp'));

var GradingCtrl, scope;

// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
GradingCtrl = $controller('GradingCtrl', {
$scope: scope
});
}));

it('should ...', function () {
expect(1).to.equal(1);
});
});
19 changes: 19 additions & 0 deletions client/app/student/grading/grading.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div class='container student'>
<div class='row'>
<div class='col-sm-12 grading-panel' ng-cloak>
<h1 class="page-header">Grading</h1>
<h3 ng-hide="submissions.length">No student submissions yet</h3>
<h4 ng-hide="submissions.length">Contact your instructor to create an event</h4>
<div ng-show="submissions.length">
<uib-tabset active="active">
<uib-tab index="0" heading="Images" select="refreshSubmissions()">
<submission-card class="col-md-6" ng-repeat='submission in submissions | orderBy: "-createdAt"' data="submission" click="goToEvent(submission.sectionEvent)" short="false" />
</uib-tab>
<uib-tab index="1" heading="List" select="refreshSubmissions()">
<br/>
<submissionview></submissionview>
</uib-tab>
</uib-tabset>
</div>
</div>
</div>
Empty file.
12 changes: 12 additions & 0 deletions client/app/student/grading/grading.routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';

export default function routes($routeProvider) {
'ngInject';

$routeProvider
.when('/student/grading', {
template: require('./grading.html'),
controller: 'GradingCtrl',
authenticate: 'student'
});
}
10 changes: 10 additions & 0 deletions client/app/student/grading/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict';
const ngRoute = require('angular-route');
import routing from './grading.routes';

import GradingCtrl from './grading.controller';

export default angular.module('venueApp.grading', ['venueApp.auth', 'venueApp.SubmissionFactory', ngRoute, 'directives.submissionCard'])
.controller('GradingCtrl', GradingCtrl)
.config(routing)
.name;
4 changes: 2 additions & 2 deletions client/app/student/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import dashboard from './dashboard';
import events from './events';
import submissions from './submissions';
import upload from './upload';
import grading from './grading';

export default angular.module('venueApp.student', [ngRoute, courses, dashboard, events, submissions, upload
])
export default angular.module('venueApp.student', [ngRoute, courses, dashboard, events, submissions, upload, grading])
.config(routing)
.name;
23 changes: 21 additions & 2 deletions client/components/auth/auth.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ class User {
$promise = undefined;
}

export function AuthService(Util, $location, $http, $cookies, $q, appConfig, User) {
class Oblah {
name: string = '';
}

export function AuthService(Util, $location, $http, $cookies, $q, appConfig, User, Section) {
'ngInject';
var safeCb = Util.safeCb;
var currentUser: User = new User();
Expand Down Expand Up @@ -229,7 +233,22 @@ export function AuthService(Util, $location, $http, $cookies, $q, appConfig, Use
* @return {Bool}
*/
isStudentSync() {
return currentUser.hasOwnProperty('isInstructor') ? (currentUser.isInstructor === false) : false;
return currentUser.hasOwnProperty('isInstructor') ? (currentUser.isInstructor === false ) : false;
},

isTA(callback: Function = () => {}) {
return Auth.getCurrentUser(undefined)
.then(user => {
var has = user.hasOwnProperty('taSections') ? (user.taSections != undefined && user.taSections.length > 0) : false;
safeCb(callback)(has);
return has;
});
},

isTASync() {
// console.log("TA SECTIONS: " + currentUser.taSections);
// if(currentUser.taSections != undefined) console.log("NUM SECTIONS: " + currentUser.taSections.length);
return currentUser.hasOwnProperty('taSections') ? (currentUser.taSections != undefined && currentUser.taSections.length > 0) : false;
},

/**
Expand Down
13 changes: 10 additions & 3 deletions client/components/auth/user.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export function UserResource($resource) {
'ngInject';

return $resource('/api/users/:id/:controller', {
var User = $resource('/api/users/:id/:controller', {
id: '@_id'
}, {
changePassword: {
Expand Down Expand Up @@ -80,6 +80,13 @@ export function UserResource($resource) {
params: {
controller: 'unenroll'
}
}
},
updateTASections: {
method: 'PUT',
params: {
controller: 'updateTASections'
}
}
});
}
return User;
}
8 changes: 3 additions & 5 deletions client/components/courseform/courseform.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ <h4 ng-show="!updating">You can add sections later</h4>
A course description is required
</p>
</div>

<div class="form-group" ng-if="isSupervisor">
<label>Course Supervisor</label><br>

<a class="list-group-item" style="margin-bottom:10px; width:300px;">{{supervisor.name}}</a>

<div class="instructor-add-field">
Expand All @@ -73,9 +73,7 @@ <h4 ng-show="!updating">You can add sections later</h4>
</div>

</div>





<div class="form-group" ng-class="{ 'has-error': submitted && !file}">
<label>Course Image</label>
Expand Down
Loading