-
Notifications
You must be signed in to change notification settings - Fork 60
Team Turing Whiteboard final version #241
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
Open
isilien
wants to merge
142
commits into
professor:master
Choose a base branch
from
TeamTuring:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
142 commits
Select commit
Hold shift + click to select a range
f302e33
Add personal information in db/seed.rb
real-davidcs a0b98c8
Add accordion to grading queue
real-davidcs 91f7162
Model for filter by my teams
8f714c6
Merge remote branch 'origin/master'
d3d44ce
Model and view for 'Filter by my teams'
d2d3fae
Add test case for filtering by MY teams/students
real-davidcs 6311da3
Admin should be able to see every deliverable in a course
460ea92
Changing notifiers for Travis
metorino ba27ee5
Adding comment just to sync with Travis
metorino 3bc5b82
Adding team turing for build notifications
metorino 6f8c430
Adding comment just to sync with Travis
metorino 076c205
Adding each team turing members for build notifications
metorino a55beaf
Service test code for spec_no_rails
metorino d62ea71
Updated gitignore to exclude 'logfile'
metorino 5e0e8a7
Refactoring on filter by teams story. Changing SQL to active record. …
metorino 7fa5a9d
Defining GrandingQueue empty class. Otherwise is failing
metorino 5501632
Refactoring deliverables controller spec to match the model refactori…
metorino 42769ad
Refactoring deliverables controller spec to match the model refactori…
metorino 193536d
Refactored 'filter by my teams' to use ActiveRecord instead of SQL. R…
f065d8e
Refactor the accordion panel of grading queue page
real-davidcs d4b24a2
Adding pending tests for grading queue
metorino 2d03c9e
Adding filter by my students
metorino 4ee3929
Intent of test for filter by my students individual deliverables
metorino 94c2531
Individual Deliverable, filtered by teams
1251471
Check variable 'queue' with empty? instead of nil?
985c909
Adding team assignment
metorino 087085d
Merge branch 'master' of http://github.com/TeamTuring/whiteboard
04217b5
Created tests for 'filter by individual deliverables' when there are …
7321fde
Fixed broken Travis due to merge conlict
6bc2d43
Professor should be able to see both team deliverables and individual…
481678d
Refactoring getting default deliverables from helper method
metorino 969a4c5
Adding pending tests for filtering deliverables
metorino 201fed2
preparing test data
metorino d8a8a7a
Filtering deliverables by ungraded by default
metorino 1a5c1ec
Filtering by ungraded
metorino 34826a0
Merge grading page into grading queue w/o testing
real-davidcs 2367543
Filtering by other criterias
metorino 6c5965f
Merge grading page into grading queue w/o test - conflict resolved
real-davidcs 8bece92
Merge branch 'master' of github.com:TeamTuring/whiteboard
real-davidcs df94a1f
Deliverables filtered by a criterion. Tests added for graded only
459667f
Retrieving assignment names to populate drop down list
metorino 937eeda
Solve capybara double thread issue
real-davidcs a58b62f
Merge branch 'master' of github.com:TeamTuring/whiteboard
real-davidcs 00e2e8b
Adding migration to add last graded by to grades table
metorino f4fab4c
Update view for grading queue and deliverables_spec.rb
mia-m 7c50fb9
Getting grading status from page
metorino 5f4c6a7
Merge branch 'master' of https://github.com/TeamTuring/whiteboard
metorino 51063c2
Adding test for filtering by grading status + schema
metorino 4c02fdd
Filter deliverables by name tests
afeb903
Merging the view and the controller for filter by deliverables
088f812
Adding filtering by assignment name
metorino 82dcdeb
Bootstrap javascript library added
103d8ff
Merge branch 'master' of http://github.com/TeamTuring/whiteboard
08bbd6a
Draft: All filtering logic with AJAX missing
a4cfee0
Test for filter by delierable name
metorino 3e34fc0
Merge branch 'master' of https://github.com/TeamTuring/whiteboard
metorino 5fa4a62
Merge grading page into grading queue page w/ tests
real-davidcs a3ca835
Merge branch 'master' of github.com:TeamTuring/whiteboard
real-davidcs cf89635
Merge branch 'master' of https://github.com/TeamTuring/whiteboard
metorino 7b68456
Improved user interface for grading queue for course
08d0d85
Merge branch 'master' of https://github.com/TeamTuring/whiteboard
metorino a261f7f
Integrate last graded by
real-davidcs 1a19f9f
Removing hardcoded data from deliverables controler + hiting the mode…
metorino 0582ed6
Merge branch 'master' of https://github.com/TeamTuring/whiteboard
metorino 876eb61
Default deliverables assignation
metorino 9deaba3
Removing attachments versions from deliverables factories as were cre…
metorino e6656e6
Working javascript for filters in grading page, modified style for th…
6c9f4fc
Add draft for checking tooltip
mia-m b5b0150
Merged last graded by and filtering grading queue
1b92ecf
Migration for last graded by
1f7fac4
Merge branch 'master' of http://github.com/TeamTuring/whiteboard
ce96056
Added sorting for deliverables by task number
7c0ea2e
Added filter by assignment name in drop down menu
4b315ae
Filter by 'everyone' implemented
e169505
Last graded by with link to profile
IraJain 83143e3
Added loading indicator view for AJAX requests
ccf50bd
Grading queue and grading page views merged and styled
de0b52a
Added danger labels to indicate late submissions
9bcabf2
Overriding Bootstraps 'box-sizing: border-box' set via universal sele…
d02b243
Adding skeleton for test to see the last filter options after grading…
metorino f4100c3
Merge branch 'master' of https://github.com/TeamTuring/whiteboard
metorino 9989478
AJAX requests are done 'onclick' rather than using the submit button
ee2149f
Merge branch 'master' of github.com:TeamTuring/whiteboard
e5ac9fb
Keeping filtering options in session
metorino b1a8092
Merge branch 'master' of https://github.com/TeamTuring/whiteboard
metorino 51339dd
Fixing typo
metorino 1a763e6
AJAX call instead of page refresh whenever user hits the save button
126c0a3
Update deliverables_spec to update the expectation, and move task_num…
mia-m 1396736
Merge branch 'master' of https://github.com/TeamTuring/whiteboard
mia-m a9e89eb
Save and Finalize button behavior corrected
aa597f5
Merge branch 'master' of https://github.com/TeamTuring/whiteboard
mia-m 3d207b7
Fixed issue with sliding up panels
f72c533
Merge branch 'master' of github.com:TeamTuring/whiteboard
ec60523
Last graded by student view
IraJain 3f96eaf
adding last graded by test
metorino 403135a
Adding tests for link to last graded by to people link + refactoring …
metorino 0c6ed63
Fixing bug, inverting if/else logic :) on checking for nil grading
metorino 9e50c6b
Enhanced grading queue page view
f5138d7
Removing Not graded yet as default message for ungraded deliverables
metorino 6e29f2e
Removing pending tests from deliverables controller
metorino 485d09e
Fixing failing tests
metorino ed4628f
Firts graded by patch
IraJain 9d0514c
removing save_and_open_page
metorino fec3b8d
Grade Book- Last graded by
IraJain 983fa20
Merge branch 'master' of https://github.com/TeamTuring/whiteboard
IraJain c9398f7
Add grade book confirm box, checkbox and modify button label and posi…
mia-m 5d009a6
Cont. redesign of grading queue
b4617b6
Merge branch 'master' of github.com:TeamTuring/whiteboard
b863f3c
Modifying travis configuration file to run firefox
metorino ac3d49c
Merge branch 'master' of https://github.com/TeamTuring/whiteboard
metorino 2acff4b
Implement search function w/o test
real-davidcs fb6d52e
Merge branch 'master' of github.com:TeamTuring/whiteboard
real-davidcs a3fab98
Grading queue interface changes. Default grading queue behavior chang…
bbe1ce8
Merge branch 'master' of github.com:TeamTuring/whiteboard
1fb5556
Updating tests to meet latest functionality. Hopefully Travis is gree…
metorino b7df9e8
Include professor in grade email for Grade Book and Grade Page
mia-m 535e608
fixing bug of rendering deliverables partial not being updated properly
metorino 5335c01
Merging edit student feedback file
metorino 311eb07
Adding js for ajax request on updating feedback
metorino 4daf341
New style for Grade Book buttons/import/export sections
05e3072
Modify Deliverable Controller: Show everything when no filter options…
real-davidcs e91f1eb
Adding filtering by assignment when updating feedback
metorino ddac28c
Merge branch 'master' of https://github.com/TeamTuring/whiteboard
metorino 0ee75f0
Changing deliverable controller tests to use get_deliverables instead…
metorino 2d434ce
Ajax loading gif for retina display
8e5b857
Removing filter_deliverables action + adding tests in the deliverable…
metorino 8442e8b
Refactoring duplicated code for filtering deliverables in get_deliver…
metorino 45ae4a6
Refactorinf deliverables_controller
metorino 98014ad
Refactorinf deliverables_controller. Removing unnecesary return state…
metorino ba5d0a7
Add search deliverables using Andrew ID
real-davidcs b23c8d5
Merge branch 'master' of github.com:TeamTuring/whiteboard
real-davidcs 44530d7
Change checkbox default to unchecked for Send Copy to Myself in grade…
mia-m bc7737f
Applying Tushar's fix to reminder hanlder tests
metorino bdfd835
Merge branch 'master' of https://github.com/TeamTuring/whiteboard
metorino 4c75ab9
Implement test cases for searching deliverables
real-davidcs 7482b74
Fixed the problem of Bootstrap CSS breaking the entire website
3edf67e
Fixed CSS issue of Bootstrap breaking the entire website's style
360863b
Improve search function performance
real-davidcs 760c061
Merge branch 'master' of github.com:TeamTuring/whiteboard
real-davidcs 11eb85e
Fixed bug in deliverables controller: My teams option not sticking if…
7fc9830
Fixed bug in deliverables controller: My teams option not sticking if…
0513f07
Latest refactorin. Just style and variables names. Will miss you whit…
metorino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -38,3 +38,6 @@ push*.dat | |
|
|
||
| # Vagrant files | ||
| .vagrant | ||
|
|
||
| #postgres | ||
| logfile | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ def index | |
| end | ||
|
|
||
| def grading_queue_for_course | ||
|
|
||
| @course = Course.find(params[:course_id]) | ||
|
|
||
| if @course.grading_rule.nil? | ||
|
|
@@ -26,12 +27,39 @@ def grading_queue_for_course | |
| flash.now[:error] = I18n.t(:default_grading_rule_for_course) | ||
| end | ||
|
|
||
| if (current_user.is_admin? || @course.faculty.include?(current_user)) | ||
| # Retrieving assignments names for the course to be able to filter by deliverable name later on. | ||
| @assignments = Assignment.where(:course_id => @course.id).all.sort_by(&:task_number) | ||
|
|
||
| if current_user.is_admin? | ||
|
|
||
| @deliverables = Deliverable.where(:course_id => @course.id).all | ||
|
|
||
| elsif @course.faculty.include?(current_user) | ||
|
|
||
| # Get all deliverables for this team/student | ||
| @deliverables = Deliverable.get_deliverables(params[:course_id], current_user.id, {:is_my_team => 1}) | ||
|
|
||
| # Select all that are ungraded or drafted | ||
| @deliverables = @deliverables.select { |deliverable| deliverable.get_grade_status == :ungraded || | ||
| deliverable.get_grade_status == :drafted } | ||
|
|
||
| # Sort by task number | ||
| @deliverables = @deliverables.sort { |a, b| a.assignment.task_number <=> b.assignment.task_number } | ||
|
|
||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why we are creating a new deliverable |
||
| else | ||
| has_permissions_or_redirect(:admin, root_path) | ||
| end | ||
|
|
||
| end | ||
|
|
||
| # Beg Team Turing | ||
| def get_deliverables | ||
| @deliverables = filter_deliverables(params[:course_id], params[:filter_options]) | ||
| respond_to do |format| | ||
| format.js | ||
| end | ||
| end | ||
| # End Team Turing | ||
|
|
||
| #temporary for mel | ||
| def team_index_for_course | ||
|
|
@@ -96,8 +124,13 @@ def show | |
| end | ||
|
|
||
| respond_to do |format| | ||
| format.html # show.html.erb | ||
| format.xml { render :xml => @deliverable } | ||
| if (current_user.is_admin? || @course.faculty.include?(current_user)) | ||
| format.html { render layout: false } | ||
| else | ||
| format.html # show.html.erb | ||
| format.xml { render :xml => @deliverable } | ||
| end | ||
|
|
||
| end | ||
| end | ||
|
|
||
|
|
@@ -279,20 +312,32 @@ def update_feedback | |
| is_student_visible=false | ||
| end | ||
|
|
||
| flash[:error] = @deliverable.update_grade(params, is_student_visible) | ||
| # Beg chg Turing Ira | ||
| flash[:error] = @deliverable.update_grade(params, is_student_visible, current_user.id) | ||
| # End chg Turing Ira | ||
| # Begin Add Team Turing | ||
| other_email = nil | ||
| if params[:send_copy_to_myself] == "1" | ||
| other_email = current_user.email | ||
| end | ||
| # End Add Team Turing | ||
| if @deliverable.update_feedback_and_notes(params[:deliverable]) | ||
| if is_student_visible==true | ||
| @deliverable.send_deliverable_feedback_email(url_for(@deliverable)) | ||
| if is_student_visible == true | ||
| @deliverable.send_deliverable_feedback_email(url_for(@deliverable), other_email) | ||
| end | ||
| else | ||
| flash[:error] << 'Unable to save feedback' | ||
| end | ||
|
|
||
| #Obtain current selected filters to update the queue accordingly | ||
| @selected_filter_options = JSON.parse(params[:deliverable][:current_filter_options]) | ||
| @deliverables = filter_deliverables(@deliverable.course_id, @selected_filter_options) | ||
|
|
||
| respond_to do |format| | ||
| if flash[:error].blank? | ||
| flash[:error] = nil | ||
| flash[:notice] = 'Feedback successfully saved.' | ||
| format.html {redirect_to(course_deliverables_path(@deliverable.course))} | ||
| format.js | ||
| else | ||
| flash[:error] = flash[:error].join("<br>") | ||
| format.html { redirect_to(@deliverable) } | ||
|
|
@@ -313,4 +358,53 @@ def get_assignments_for_student | |
| end | ||
| end | ||
|
|
||
|
|
||
| # Beg Team Turing | ||
| private | ||
| def filter_deliverables (course_id, filter_options) | ||
| @course = Course.find_by_id(course_id) | ||
|
|
||
| # Prepare filter options according to what users select on the page | ||
| options = {} | ||
| if filter_options[:search_box] != "" | ||
| options[:search_string] = filter_options[:search_box] | ||
| end | ||
|
|
||
| if filter_options['is_my_teams'] == 'yes' | ||
| options[:is_my_team] = 1 | ||
| else | ||
| options[:is_my_team] = 0 | ||
| end | ||
|
|
||
|
|
||
| # Filter in the model by course, professor, my teams and search input | ||
| @deliverables = [] | ||
| @faculty_deliverables = Deliverable.get_deliverables(course_id, current_user.id, options) | ||
|
|
||
| # Filter once again according to the selected grading options. If no filter options are selected, | ||
| # display every deliverable | ||
| @selected_options = [] | ||
| filter_options.collect do |filter_option| | ||
| @selected_options << filter_option[0].to_sym if filter_option[1] == "1" | ||
| end | ||
| if @selected_options.size == 0 | ||
| @deliverables = @faculty_deliverables | ||
| else | ||
| @selected_options.each do |option| | ||
| @deliverables.concat(@faculty_deliverables.select { |deliverable| deliverable.get_grade_status == option }) | ||
| end | ||
| end | ||
|
|
||
| # Filter by assignment names in drop down menu | ||
| unless filter_options["assignment_id"] == '-1' | ||
| @deliverables = @deliverables.select{ |deliverable| deliverable.assignment_id == filter_options[ | ||
| "assignment_id"].to_i } | ||
| end | ||
|
|
||
| # Sort by task number, ascending | ||
| @deliverables = @deliverables.sort { |a, b| a.assignment.task_number <=> b.assignment.task_number } | ||
| end | ||
| # End Team Turing | ||
|
|
||
| end | ||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that we want admin to supersede the faculty role. If a faculty is also an admin, does this mean that they can't see their own team's deliverables?