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

Staged: The main working branch of Team NapTime #254

Open
wants to merge 268 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
268 commits
Select commit Hold shift + click to select a range
0f24141
New Setup
anirudhbhargava7 Oct 19, 2013
e1c0884
Rebased the RoughUI branch
ShishirSK Oct 20, 2013
0e63586
Placeholder UI for grading queue
ShishirSK Oct 20, 2013
7c3e3be
Added Capybara test cases
ShishirSK Oct 21, 2013
12ddf1e
Changes to avoid git conflict on grading_queue_spec
ShishirSK Oct 21, 2013
3895362
Merging master and RoughUI
ShishirSK Oct 21, 2013
518dfc5
Seeds from Professor/whiteboard
anirudhbhargava7 Oct 22, 2013
a4d0357
Changes in the Seeds and views/deliverable/_deliverable...
anirudhbhargava7 Oct 22, 2013
00e0db5
Merge branch 'staged' of https://github.com/Gonghan/whiteboard into s…
Oct 22, 2013
6205b6e
rm tmpdir
Oct 22, 2013
223a508
Ignore vim swap files
qiao Oct 22, 2013
cfa60a0
Merge branch 'staged' of github.com:Gonghan/whiteboard into staged
qiao Oct 22, 2013
581d05d
Ignore tmpdir
qiao Oct 22, 2013
654181f
Remove tmpdir
qiao Oct 22, 2013
344c185
update
Gonghan Oct 22, 2013
78eb73b
update
Gonghan Oct 22, 2013
f2f89a9
update
Gonghan Oct 22, 2013
0698a70
Merge branch 'sort_task_number' of https://github.com/Gonghan/whitebo…
Oct 22, 2013
9e18c18
Have a partially written rspec test for sorting by task number
Oct 23, 2013
ba7f7d2
Added rough grading queue UI
qiao Oct 23, 2013
4650a91
Added grading_queue_sort_by_task_spec for our added spec
Oct 23, 2013
765d2b0
Removing
Oct 23, 2013
851a342
Removing strong_parameters stuff
Oct 23, 2013
0fa69e6
Commented out specs failing specs for mass assignment
Oct 23, 2013
afca916
Revert modification of current_user
qiao Oct 23, 2013
3081ea6
mod: application_controller
qiao Oct 23, 2013
1f8e8f5
Only run Travis builds on master and staged branch
qiao Oct 23, 2013
002baea
effort_log and effort_log_line_items are protected against mass
Oct 23, 2013
ae083a4
Merge branch 'staged' of https://github.com/Gonghan/whiteboard into m…
Oct 23, 2013
31bd647
Merge branch 'mass_assignment' into staged
Oct 23, 2013
b2c10b8
Set half of the deliverables to be ungraded
qiao Oct 23, 2013
84aac9f
Implement graded filter for deliverables
qiao Oct 23, 2013
42fff00
Implement graded filter for deliverables
qiao Oct 23, 2013
6d4b810
Merge branch 'grading_queue_ui' of github.com:Gonghan/whiteboard into…
qiao Oct 23, 2013
766d624
Merge branch 'master' of https://github.com/professor/whiteboard
qiao Oct 24, 2013
186d3b2
Merge branch 'master' into grading_queue_ui
qiao Oct 24, 2013
d39e892
Merge branch 'master' into staged
qiao Oct 24, 2013
be54f63
Merge branch 'staged' of github.com:Gonghan/whiteboard into staged
qiao Oct 24, 2013
e6bdab9
Added capybara-webkit
qiao Oct 24, 2013
4889b35
Merge branch 'grading_queue_ui' into staged
qiao Oct 24, 2013
050658e
Removed attr_accessible from our mass assignment models
Oct 25, 2013
1e87623
Removed tests against mass assignment in models
Oct 25, 2013
fa65359
Modified effort_logs_controller_spec to not feed effort_logs a sum di…
Oct 25, 2013
e204dcd
Working on roughUI test cases
anirudhbhargava7 Oct 25, 2013
303b84a
Modified version of exception-notification gem
qiao Oct 25, 2013
c7f7dc2
In process of writing mass assignment test for jobs
Oct 28, 2013
feaf463
Updated Gemfile.lock
qiao Oct 28, 2013
4de46a2
Revert modification to current_user
qiao Oct 28, 2013
b230fbe
Added cocaine gem
Oct 28, 2013
2647206
Resolved errors in staged branch. Installed strong_parametes gem
ShishirSK Oct 28, 2013
5b4db94
Merge branch 'staged' into mass_assignment
Oct 28, 2013
0ad69ff
Protected job_supervisors from mass assignment,
Oct 28, 2013
3d9bbc9
Grading Queue Test updated
anirudhbhargava7 Oct 28, 2013
7d6ef23
Fixed cocaine version
qiao Oct 28, 2013
c879b03
Merge branch 'grading_queue_ui' of https://github.com/Gonghan/whitebo…
anirudhbhargava7 Oct 28, 2013
54747e2
Removed jobs_controller_spec
Oct 28, 2013
ea19cd2
Fixed Gemfile
qiao Oct 28, 2013
6b68897
Merge branch 'staged' into grading_queue_ui
qiao Oct 28, 2013
0f0980d
Added filter for team/individual deliverables
qiao Oct 28, 2013
1881c8e
Updated grading queue spec
anirudhbhargava7 Oct 28, 2013
702a5a0
Merge branch 'grading_queue_ui' of https://github.com/Gonghan/whitebo…
anirudhbhargava7 Oct 28, 2013
87608d6
Protected job_employees and job_supervisors from mass assignment
Oct 28, 2013
231610e
updated rough UI spec
anirudhbhargava7 Oct 28, 2013
1ef3612
Protected effort_log_line_items from mass assignment. Weeee!
Oct 29, 2013
beee276
Protected effort_logs from mass assignment
Oct 29, 2013
6508d03
Protected job_employees and job_supervisors from mass assignment.
Oct 29, 2013
376c428
Merge branch 'staged' of https://github.com/Gonghan/whiteboard into s…
Oct 29, 2013
97355b5
Merge branch 'mass_assignment' into staged
Oct 29, 2013
57cdc63
teams.rb fixed
anirudhbhargava7 Oct 29, 2013
123a6b0
Pulled and merged staged branch
ShishirSK Oct 29, 2013
9bff405
Gemfileand Gemfile.lock updates
anirudhbhargava7 Oct 29, 2013
24a30e3
strong_parameters and cocaine added
anirudhbhargava7 Oct 29, 2013
8ae7606
Merge branch 'staged' of https://github.com/Gonghan/whiteboard into S…
ShishirSK Oct 30, 2013
cedfd95
Rough_ui
anirudhbhargava7 Oct 30, 2013
5dc1d0a
Finished sort by task test. Hooray!
Oct 31, 2013
1b6cd82
Now tracking database_cleaner file
Nov 1, 2013
7f2b48f
before sort_by_task_integration
anirudhbhargava7 Nov 3, 2013
dd00727
sort_by_task spec added
anirudhbhargava7 Nov 3, 2013
b6dfd1d
Partially implemented grading queue accordion
qiao Nov 4, 2013
3ca5b2e
Merge branch 'grading_queue_ui' into staged
qiao Nov 4, 2013
1337439
Merge branch 'staged' of github.com:Gonghan/whiteboard into staged
qiao Nov 4, 2013
e304649
Fixed update show status
qiao Nov 5, 2013
64ad7ba
Merge branch 'grading_queue_ui' into staged
qiao Nov 5, 2013
971c1fc
Added Filter by My Team, To-Do: Filter by Individuals
ShishirSK Nov 5, 2013
4efe757
Finished sort by task test. Hooray!
Oct 31, 2013
b6c0c1d
Now tracking database_cleaner file
Nov 1, 2013
b7bbfae
Partially implemented grading queue accordion
qiao Nov 4, 2013
5898f4e
Fixed update show status
qiao Nov 5, 2013
8d5a788
Added tests against mass assignment for effort_logs
Oct 11, 2013
2451d3c
Added strong_parameters gem for mass assignment protection
Oct 11, 2013
941a76e
Added tests for effort_log_line_items against mass assignment
Oct 11, 2013
ba98cf5
Added tests for peer_evaluation_learning_objectives against mass
Oct 11, 2013
8feb3ac
Added tests for peer_evaluation_reviews against mass assignment
Oct 11, 2013
459e059
Protected peer evaluation stuff (learning_objectives,
Oct 12, 2013
e6b862c
About to switch to master
Oct 18, 2013
e9a5a42
Added tests for job_employees and job_supervisors
Oct 18, 2013
ef7c217
Peer evaluation report/review/learning objective protected.
Oct 19, 2013
1520608
New Setup
anirudhbhargava7 Oct 19, 2013
ce493f1
Seeds from Professor/whiteboard
anirudhbhargava7 Oct 22, 2013
97ebde7
Ignore vim swap files
qiao Oct 22, 2013
a6041ee
Ignore tmpdir
qiao Oct 22, 2013
d4da465
update
Gonghan Oct 22, 2013
61cd93e
update
Gonghan Oct 22, 2013
a2a6b32
update
Gonghan Oct 22, 2013
e2d0bc6
Have a partially written rspec test for sorting by task number
Oct 23, 2013
6f298f4
Added rough grading queue UI
qiao Oct 23, 2013
9e1e92d
Added grading_queue_sort_by_task_spec for our added spec
Oct 23, 2013
f036473
Removing
Oct 23, 2013
56acb71
Removing strong_parameters stuff
Oct 23, 2013
144b90b
Commented out specs failing specs for mass assignment
Oct 23, 2013
5be7564
Revert modification of current_user
qiao Oct 23, 2013
12f91a0
mod: application_controller
qiao Oct 23, 2013
b480ad0
effort_log and effort_log_line_items are protected against mass
Oct 23, 2013
7d32bca
Improved readability
professor Oct 23, 2013
35308e6
Thanks team turing. Addding in Isil's indexes
professor Oct 23, 2013
b432046
Set half of the deliverables to be ungraded
qiao Oct 23, 2013
35034df
Implement graded filter for deliverables
qiao Oct 23, 2013
01c988f
Implement graded filter for deliverables
qiao Oct 23, 2013
3c399b3
Added capybara-webkit
qiao Oct 24, 2013
8e1d7e5
Removed attr_accessible from our mass assignment models
Oct 25, 2013
d6a9946
Removed tests against mass assignment in models
Oct 25, 2013
73538f2
Modified effort_logs_controller_spec to not feed effort_logs a sum di…
Oct 25, 2013
a4bf4a3
In process of writing mass assignment test for jobs
Oct 28, 2013
628b23d
Added cocaine gem
Oct 28, 2013
b7fd1b4
Protected job_supervisors from mass assignment,
Oct 28, 2013
a166183
Removed jobs_controller_spec
Oct 28, 2013
36edac7
Protected job_employees and job_supervisors from mass assignment
Oct 28, 2013
a954067
Protected effort_log_line_items from mass assignment. Weeee!
Oct 29, 2013
d931fd5
Protected effort_logs from mass assignment
Oct 29, 2013
003525d
Protected job_employees and job_supervisors from mass assignment.
Oct 29, 2013
1f5a0ab
Added include ActiveModel::ForbiddenAttributesProtection
Nov 6, 2013
e0d30c7
Modifying files to match professor/whiteboard
Nov 6, 2013
5e41c7f
Modifying files to match professor/whiteboard
Nov 6, 2013
3b40825
Merge https://github.com/professor/whiteboard into mass_assignment
Nov 6, 2013
695561d
Cleaning up files to match professor/whiteboard
Nov 6, 2013
8c63e16
Added strong_parameters gem
Nov 6, 2013
ca5bf10
Removed sort by task spec
Nov 6, 2013
24555e6
before update of rough UI
anirudhbhargava7 Nov 6, 2013
935f44b
Merge branch 'staged' of https://github.com/Gonghan/whiteboard into s…
anirudhbhargava7 Nov 6, 2013
39bc559
Removed some sensitive swap files
Nov 7, 2013
6d2fb25
Removed blank last line to closer match professor/whiteboard
Nov 7, 2013
4258013
Edited seeds to match professor/whiteboard
Nov 7, 2013
b15f302
Reverted .travis.yml to professor/whiteboard version
Nov 7, 2013
84bed65
Removed grading_queue_spec: not present in professor/whiteboard
Nov 7, 2013
3c28ebf
No errors in grading_queue_sort_by_task spec
anirudhbhargava7 Nov 8, 2013
b760008
Merge branch 'staged' into mass_assignment
Nov 8, 2013
b9253c8
Added needed grade1 factory
Nov 8, 2013
fd19064
Headless added
anirudhbhargava7 Nov 9, 2013
74810a4
Updating from remote Staged
ShishirSK Nov 11, 2013
b438e35
Added the filter to show only my teams
ShishirSK Nov 11, 2013
758a213
Reverting to before merge with mass_assignment - proper UI
Nov 12, 2013
f641305
Merge branch 'staged' of https://github.com/Gonghan/whiteboard into s…
Nov 12, 2013
436012c
integrated strong_parameters mass assignment protection
Nov 12, 2013
627038d
Replaced grading_queue_sort_by_task_spec with grading_queue_sort_spec
Nov 12, 2013
c8c94c4
Updated local staged from remote
ShishirSK Nov 12, 2013
ac5eeeb
add accordion rspec
Gonghan Nov 12, 2013
6b1cbba
Merge branch 'staged' of github.com:Gonghan/whiteboard into staged
Gonghan Nov 12, 2013
832b469
Revert "Added needed grade1 factory"
Nov 13, 2013
116376e
Added specs to test filtering by individual and team
Nov 13, 2013
a3939fd
Reverted revert - back to latest commit
Nov 13, 2013
b3bf6df
Merge branch 'staged' of https://github.com/Gonghan/whiteboard into s…
ShishirSK Nov 13, 2013
f2c419c
Marked accordian specs as pending - accordian is not yet implemented
Nov 13, 2013
718bb1a
Merge branch 'staged' of https://github.com/Gonghan/whiteboard into s…
ShishirSK Nov 13, 2013
d7036f3
New test for fiter by my team
ShishirSK Nov 13, 2013
8049898
add show all assignments
Gonghan Nov 14, 2013
626079b
Merge branch 'staged' of github.com:Gonghan/whiteboard into staged
Gonghan Nov 14, 2013
4b64707
Use AJAX to load accordion dropdown
qiao Nov 14, 2013
feb5a69
Merge branch 'grading_queue_ui' into staged
qiao Nov 15, 2013
6b48851
Merge branch 'staged' of github.com:Gonghan/whiteboard into staged
qiao Nov 15, 2013
c386ef2
Merge branch 'staged' of https://github.com/Gonghan/whiteboard into s…
ShishirSK Nov 15, 2013
f0586e7
Merging latest UI and FilterByMyTeam
ShishirSK Nov 15, 2013
6a0de7d
Replaced capybara-webkit with selenium-webdriver
Nov 18, 2013
1cefdd2
Merge branch 'spec_refactor' into staged
Nov 18, 2013
98623f4
Removed latest deliverable - can get that from deliverable history
Nov 18, 2013
2f23a1a
UI updates - Added buttons, modified search + full width table
ShishirSK Nov 20, 2013
e4882fe
Fixed breaking test in updated UI for grading queue
ShishirSK Nov 21, 2013
bd19b9f
Merge branch 'UIUpdates' into staged
ShishirSK Nov 21, 2013
6c8c091
Fixed individual accordian bug - had to remove
Nov 21, 2013
13beefd
Grading queue display table fix
ShishirSK Nov 21, 2013
5ac0397
Merge branch 'staged' of https://github.com/Gonghan/whiteboard into s…
ShishirSK Nov 21, 2013
0562660
Merge branch 'UiUpdates' into staged
ShishirSK Nov 21, 2013
1b9c2db
Set Filter spec as pending. To Refactor to work with UI updates
ShishirSK Nov 22, 2013
9e14d0a
Set skip_on_build_machine true for all js tests
Nov 23, 2013
9b0ab43
Trying to fix failing travis build
Nov 23, 2013
d8c77ff
Removed skip_on_build_machine for grading queue specs
Nov 23, 2013
45746b3
Combined Task and Assignment columns
Nov 23, 2013
827c8fa
Recommented current_user
Nov 23, 2013
b23ffb5
Merge branch 'task_assg' into staged
Nov 23, 2013
97fd4fb
Refactored spec to use combined task/assg
Nov 23, 2013
57dac3a
Implemented Team Ruby Racer's time zone bug fix
Nov 23, 2013
fd0622c
Marked selenium tests skip_on_build_machine
Nov 23, 2013
6a570df
Updates the UI buttons and effects
ShishirSK Nov 23, 2013
462aa39
Merge branch 'UIUpdates' into staged
ShishirSK Nov 23, 2013
40d279a
add latest submissions, show all submissions
Gonghan Nov 24, 2013
bf791af
Added Drafted Status. Filters working, but buggy when operated with t…
ShishirSK Nov 24, 2013
785dc04
modify two files
Gonghan Nov 25, 2013
b5f4ab8
Merged New Submission + Drafted Deliverables + UI Updates. One sort t…
ShishirSK Nov 25, 2013
276011b
Rewrite Grading Queue
qiao Nov 25, 2013
61818d1
Added AJAX Loading Indicator
qiao Nov 25, 2013
2e7e8d8
Added highlight when hovering on deliverables
qiao Nov 25, 2013
d5e2720
Refactored styling out of view and into css file
Nov 25, 2013
64946cd
Colorified grade status
Nov 25, 2013
4774bc5
Reinstated hover over grading queue rows
Nov 25, 2013
ae40776
Recommented current_user
Nov 25, 2013
6b3c0bc
Modified dropdown padding bottom
qiao Nov 25, 2013
ef2ee79
Modified text area width
qiao Nov 25, 2013
73fb65a
Implemented JavaScript filter
qiao Nov 25, 2013
fb55a70
Implemented filters
qiao Nov 25, 2013
dd4dbe7
Added SearchBox
qiao Nov 25, 2013
b3e3651
Added Colors to Statuses
qiao Nov 25, 2013
5c48579
Fixed team member photo width
qiao Nov 25, 2013
fbc98b3
Added Team Grade
qiao Nov 25, 2013
6fedc0d
Moved CSS into public/stylesheets
qiao Nov 25, 2013
701a9d3
Added Comments to grading queue
qiao Nov 25, 2013
e542ac4
Added Team Grade Live Update
qiao Nov 25, 2013
a0069f0
Merge branch 'new-ui' of https://github.com/Gonghan/whiteboard into n…
Nov 25, 2013
eb320e8
Added Deliverable Maximum Score
qiao Nov 25, 2013
f4d42d4
Added Grade Validator
qiao Nov 25, 2013
368f8a1
Test filter defaults and filtering by team or individual
Nov 25, 2013
8dda0e3
Spec for filter team/individuals
Nov 25, 2013
d551e59
Modified Team Member UI
qiao Nov 25, 2013
71af3ba
Added Collapse Button
qiao Nov 25, 2013
72bd70d
Added Nothing-To-Show Indicator
qiao Nov 25, 2013
bfed064
Remove extraneous bottom border of deliverables list
qiao Nov 25, 2013
a97f2f9
Added Form Submission Indicator
qiao Nov 26, 2013
384e35d
Commented out current_user
qiao Nov 26, 2013
6c36e1e
Added New Submission Indicator
qiao Nov 26, 2013
31c02b4
Tweaked Form Content
qiao Nov 26, 2013
87b2566
Merge branch 'new-ui' of https://github.com/Gonghan/whiteboard into n…
Nov 26, 2013
8074b98
Merge branch 'update_specs' into new-ui
Nov 26, 2013
7bd0506
Updated sort specs
Nov 26, 2013
e24e9cf
Merge branch 'update_specs' into new-ui
Nov 26, 2013
f807c51
Fixed sort spec
Nov 26, 2013
68a914c
Switching to filter_all_branch
anirudhbhargava7 Nov 28, 2013
ad6ed9a
all_teams made
anirudhbhargava7 Nov 29, 2013
ce32a44
styling for the button added
anirudhbhargava7 Nov 29, 2013
34338b0
filter-all teams done
anirudhbhargava7 Nov 29, 2013
7723fd9
All-Teams drafted left
anirudhbhargava7 Nov 29, 2013
384353f
Fixed: team grade should only be shown if is team deliverable
qiao Nov 30, 2013
120cd1b
before removing draft buttons for teams not under primary faculty
anirudhbhargava7 Nov 30, 2013
b478e80
fix a bug of all assignments
Gonghan Nov 30, 2013
e4cf4c4
fix a bug of showing all assignment in all team
Gonghan Nov 30, 2013
505ed97
fix grade model bug
Gonghan Nov 30, 2013
c95b096
fix grading_queue_spec bug
Gonghan Nov 30, 2013
04be5a7
Merge branch 'new-ui' of github.com:Gonghan/whiteboard into new-ui
qiao Dec 1, 2013
c025c33
Merge branch 'new-ui' into staged
qiao Dec 1, 2013
2c14ad8
Removed Border Radius of OnOffSwitch
qiao Dec 2, 2013
9d784b6
Verifying the build is successful
ShishirSK Dec 7, 2013
8efe8da
Merge branch 'staged' of github.com:Gonghan/whiteboard into staged
qiao Dec 8, 2013
e881bc7
Removed temporary files
qiao Dec 8, 2013
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
db/*.sqlite3
log/*.log
tmp/
*.swp
tmpdir/

.gems
20090827190915_mfse_add_people.rb
Expand All @@ -14,8 +16,6 @@ config/systems.cc.yml.yml
config/systems.yml
config/active_directory.yml

*dump

coverage/*
nbproject/*
.idea/*
Expand Down
13 changes: 11 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ language: ruby

rvm: 1.9.2

branches:
only:
- master
- staged


before_script:
- "psql -c 'create database cmu_education_test;' -U postgres >/dev/null"
- cp config/amazon_s3.default.yml config/amazon_s3.yml
Expand All @@ -24,8 +30,11 @@ env:
notifications:
email:
recipients:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
# on_success: [always|never|change] # default: change
# on_failure: [always|never|change] # default: always
on_success: change
Expand Down
12 changes: 11 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ gem 'vpim' # user for exporting contacts to vCard and iCalendar support
gem 'seedbank'
gem 'spreadsheet'


group :production do
gem 'thin'
gem "daemons", "~> 1.1.4" #this is used by heroku on 7/18/2011
Expand Down Expand Up @@ -85,6 +84,7 @@ group :development, :test do
gem 'jasmine'
gem 'launchy'
gem 'ladle', '~> 0.2.0'
gem 'selenium-webdriver'

# gem 'morning_glory'

Expand All @@ -93,8 +93,18 @@ group :development, :test do
# gem 'autotest-growl' if RUBY_PLATFORM =~ /darwin/

# gem 'test-unit' #, '1.2.3' #Downgrading so that autotest, rspec will work


gem 'database_cleaner'
end



#gem 'gchartrb'



gem 'strong_parameters'

gem 'cocaine', '0.3.2'

11 changes: 10 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ GEM
ckeditor (3.6.3)
mime-types (~> 1.16)
orm_adapter (~> 0.0.5)
cocaine (0.2.0)
cocaine (0.3.2)
columnize (0.3.6)
daemons (1.1.9)
database_cleaner (1.2.0)
delayed_job (2.1.4)
activesupport (~> 3.0)
daemons
Expand Down Expand Up @@ -242,6 +243,10 @@ GEM
rack (>= 1.0)
spreadsheet (0.8.3)
ruby-ole (>= 1.0)
strong_parameters (0.2.1)
actionpack (~> 3.0)
activemodel (~> 3.0)
railties (~> 3.0)
taps (0.3.24)
rack (>= 1.0.1)
rest-client (>= 1.4.0, < 1.7.0)
Expand Down Expand Up @@ -280,7 +285,9 @@ DEPENDENCIES
cancan
capybara (= 1.1.1)
ckeditor (= 3.6.3)
cocaine (= 0.3.2)
daemons (~> 1.1.4)
database_cleaner
delayed_job (= 2.1.4)
devise
exception_notification
Expand All @@ -307,8 +314,10 @@ DEPENDENCIES
ruby-debug-base19x
ruby-debug-ide
seedbank
selenium-webdriver
shoulda
spreadsheet
strong_parameters
taps
thin
vestal_versions!
Expand Down
10 changes: 6 additions & 4 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ def current_person
end

## In development, if you want to pretend to be a different user, you can set it easily here
# def current_user
# User.find_by_id 725 #Cecile
## User.last
# end
#def current_user
#User.find_by_id 725 #Cecile
#User.last
#User.find_by_twiki_name("EdKatz")
#User.find_by_human_name "Todd Sedano"
#end

def authenticate_user!
if !current_user
Expand Down
5 changes: 3 additions & 2 deletions app/controllers/courses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ def index_for_semester
# GET /courses/1.xml
def show
@course = Course.find(params[:id])
first_version_of_course = Course.first_offering_for_course_name(@course.name)
@whiteboard_curriculum_page = first_version_of_course.pages[0] if first_version_of_course.pages.present?
if @course.curriculum_url && @course.curriculum_url.include?("whiteboard.sv.cmu.edu/pages/")
@whiteboard_curriculum_page = Page.where(:url => @course.curriculum_url.split("/pages/")[1]).first
end

teams = Team.where(:course_id => params[:id])

Expand Down
50 changes: 48 additions & 2 deletions app/controllers/deliverables_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ def index

def grading_queue_for_course
@course = Course.find(params[:course_id])
team_array = Array.new
individuals_array = Array.new
individual_attachments = Array.new

if @course.grading_rule.nil?
flash[:error] = I18n.t(:no_grading_rule_for_course)
Expand All @@ -27,7 +30,41 @@ def grading_queue_for_course
end

if (current_user.is_admin? || @course.faculty.include?(current_user))
@deliverables = Deliverable.where(:course_id => @course.id).all

# Get teams where current user is assigned as the Primary faculty
#
@my_teams = Team.where(:primary_faculty_id => current_user.id)
@my_teams.each do |team|
team_array << team[:id]
end

# Get the individual members of these teams
#
@my_individuals = TeamAssignment.where(:team_id => team_array)
@my_individuals.each do |ind|
individuals_array << ind[:user_id]
end
# Current user Admin or Faculty with no teams assigned
if (current_user.is_admin? ||
((@course.faculty.include?(current_user) && team_array.empty?)))
@deliverables = Deliverable.where(:course_id => @course.id).all
@all_team_deliverables = Deliverable.where(:course_id=>@course.id).all
elsif (@course.faculty.include?(current_user) && !team_array.empty?)
# Get Team deliverables
@team_deliverables = Deliverable.where(:course_id => @course.id,
:team_id => team_array)
# Get deliverables where attachments are submitted by individual members of the team
@ind_del_attachments = DeliverableAttachment.where(:submitter_id => individuals_array)
@ind_del_attachments.each do |ind_attach|
individual_attachments << ind_attach[:deliverable_id]
@all_team_deliverables = Deliverable.where(:course_id=>@course.id).all
end
# Get individual deliverables
@ind_deliverables = Deliverable.where(:course_id => @course.id,
:id => individual_attachments, :team_id => nil)
# All
@deliverables = @team_deliverables + @ind_deliverables
end
else
has_permissions_or_redirect(:admin, root_path)
end
Expand Down Expand Up @@ -293,9 +330,11 @@ def update_feedback
flash[:error] = nil
flash[:notice] = 'Feedback successfully saved.'
format.html {redirect_to(course_deliverables_path(@deliverable.course))}
format.js { render :nothing => true, :status => 200 }
else
flash[:error] = flash[:error].join("<br>")
format.html { redirect_to(@deliverable) }
format.js { render :json => flash[:error] }
end
end
end
Expand All @@ -313,4 +352,11 @@ def get_assignments_for_student
end
end

end
def dropdown
@deliverable = Deliverable.find(params[:id])
@course = @deliverable.course
@hostname_with_port = request.host_with_port
render 'dropdown', :layout => false
end

end
10 changes: 8 additions & 2 deletions app/controllers/effort_log_line_items_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def edit
# POST /effort_log_line_items
# POST /effort_log_line_items.xml
def create
@effort_log_line_item = EffortLogLineItem.new(params[:effort_log_line_item])
@effort_log_line_item = EffortLogLineItem.new(elli_params)

respond_to do |format|
if @effort_log_line_item.save
Expand All @@ -70,7 +70,7 @@ def update
@effort_log_line_item = EffortLogLineItem.find(params[:id])

respond_to do |format|
if @effort_log_line_item.update_attributes(params[:effort_log_line_item])
if @effort_log_line_item.update_attributes(elli_params)
flash[:notice] = 'EffortLogLineItem was successfully updated.'
format.html { redirect_to(@effort_log_line_item) }
format.xml { head :ok }
Expand All @@ -97,4 +97,10 @@ def destroy
def redirect_to_effort_log_index
redirect_to :controller => :effort_logs, :action => :index
end

private
def elli_params
params.require(:effort_log_line_items).permit(:day1, :day2, :day3, :day4, :day5, :day6, :day7)
end

end
8 changes: 6 additions & 2 deletions app/controllers/effort_logs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def edit
# POST /effort_logs
# POST /effort_logs.xml
def create
@effort_log = EffortLog.new(params[:effort_log])
@effort_log = EffortLog.new(effort_log_params)

setup_required_datastructures(@effort_log.year, @effort_log.week_number)

Expand Down Expand Up @@ -349,7 +349,7 @@ def update
setup_required_datastructures(@effort_log.year, @effort_log.week_number)

respond_to do |format|
if @effort_log.update_attributes(params[:effort_log])
if @effort_log.update_attributes(effort_log_params)
#check to see if user is logging effort for unregistered courses
course_error_msg = @effort_log.validate_effort_against_registered_courses()
flash[:notice] = 'EffortLog was successfully updated.'
Expand Down Expand Up @@ -424,5 +424,9 @@ def recent_foundations_or_course
Course.order("id DESC").first
end

private
def effort_log_params
params.require(:effort_log).permit(:user_id, :week_number, :year)
end

end
27 changes: 23 additions & 4 deletions app/controllers/jobs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ def edit
# POST /jobs
def create
authorize! :create, Job
params[:job][:supervisors_override] = params[:supervisors]
params[:job][:employees_override] = params[:students]
params[:job][:supervisors_override] = supervisors_params
params[:job][:employees_override] = []
params[:job][:employees_override] = students_params if params[:students]
@job = Job.new(params[:job])
@projects = SponsoredProject.current

Expand All @@ -44,8 +45,9 @@ def create
# PUT /jobs/1
# PUT /jobs/1.xml
def update
params[:job][:supervisors_override] = params[:supervisors]
params[:job][:employees_override] = params[:students]
params[:job][:supervisors_override] = supervisors_params
params[:job][:employees_override] = []
params[:job][:employees_override] = students_params if params[:students]
@job = Job.find(params[:id])
authorize! :update, @job
if params[:job][:is_closed].present? && params[:job][:is_closed] == "true"
Expand All @@ -67,5 +69,22 @@ def assignments
@jobs = Job.active
@all_employees = Job.all_employees
end

private
def supervisors_params
params.require(:supervisors)
end

def supervisor_params(supervisor)
supervisor.permit(:people_name)
end

def students_params
params.require(:students)
end

def student_params(student)
student.permit(:people_name)
end

end
20 changes: 18 additions & 2 deletions app/models/deliverable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,17 @@ def update_feedback_and_notes (params)
# To update the grade received by the student
def update_grade (params, is_student_visible)
error_msg = []

if self.assignment.is_team_deliverable?
self.team.members.each do |user|
self.team.members.each_with_index do |user, i|
score = params[:"#{user.id}"]

# begin
# Grade.give_grade(self.course_id, self.assignment.id, user.id, score, is_student_visible)
# rescue Exception => e
# raise Exception.new([e,self.course_id, self.assignment.id, user.id, score, is_student_visible].join(', '))
# end

if Grade.give_grade(self.course_id, self.assignment.id, user.id, score, is_student_visible)==false
error_msg << "Grade given to " + user.human_name + " is invalid!"
end
Expand Down Expand Up @@ -312,7 +320,7 @@ def get_grade_status

#Todo: rename get_status_for_every_individual to status_for_every_individual
# To get the status of deliverable by student for is it graded or not.
def get_status_for_every_individual (student_id)
def get_status_for_every_individual (student_id)
return :unknonwn if self.assignment.nil? #(guard for old deliverables)
grade = Grade.get_grade(self.course.id, self.assignment.id, student_id)
if grade.nil?
Expand All @@ -334,4 +342,12 @@ def inaccurate_course_and_assignment_check
end
end
end

def get_grading_date
if self.get_grade_status!=:graded
return nil
end
grade=Grade.get_grade(self.course.id, self.assignment.id, self.creator_id)
return grade.updated_at
end
end
2 changes: 2 additions & 0 deletions app/models/effort_log.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class EffortLog < ActiveRecord::Base
include ActiveModel::ForbiddenAttributesProtection

has_many :effort_log_line_items, :dependent => :destroy
belongs_to :user

Expand Down
1 change: 1 addition & 0 deletions app/models/effort_log_line_item.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class EffortLogLineItem < ActiveRecord::Base
include ActiveModel::ForbiddenAttributesProtection
acts_as_list :scope => :effort_log

belongs_to :effort_log
Expand Down
Loading