Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit 288761945762e55dcbe273633e830bcd937d6e1f @rnhurt committed Nov 19, 2008
Showing with 11,461 additions and 0 deletions.
  1. +12 −0 .gitignore
  2. +2 −0 README
  3. +10 −0 Rakefile
  4. +11 −0 app/controllers/application.rb
  5. +87 −0 app/controllers/assignments_controller.rb
  6. +81 −0 app/controllers/courses_controller.rb
  7. +3 −0 app/controllers/dashboard_controller.rb
  8. +87 −0 app/controllers/enrollments_controller.rb
  9. +87 −0 app/controllers/gradations_controller.rb
  10. +85 −0 app/controllers/sites_controller.rb
  11. +109 −0 app/controllers/students_controller.rb
  12. +87 −0 app/controllers/teachers_controller.rb
  13. +87 −0 app/controllers/users_controller.rb
  14. +18 −0 app/helpers/application_helper.rb
  15. +2 −0 app/helpers/assignments_helper.rb
  16. +2 −0 app/helpers/courses_helper.rb
  17. +2 −0 app/helpers/dashboard_helper.rb
  18. +2 −0 app/helpers/enrollments_helper.rb
  19. +2 −0 app/helpers/gradations_helper.rb
  20. +2 −0 app/helpers/sites_helper.rb
  21. +2 −0 app/helpers/students_helper.rb
  22. +2 −0 app/helpers/teachers_helper.rb
  23. +2 −0 app/helpers/users_helper.rb
  24. +5 −0 app/models/admin.rb
  25. +4 −0 app/models/assignment.rb
  26. +8 −0 app/models/course.rb
  27. +7 −0 app/models/enrollment.rb
  28. +6 −0 app/models/gradation.rb
  29. +5 −0 app/models/role.rb
  30. +4 −0 app/models/site.rb
  31. +3 −0 app/models/student.rb
  32. +11 −0 app/models/teacher.rb
  33. +5 −0 app/models/term.rb
  34. +11 −0 app/models/user.rb
  35. +27 −0 app/views/assignments/edit.html.erb
  36. +24 −0 app/views/assignments/index.html.erb
  37. +26 −0 app/views/assignments/new.html.erb
  38. +18 −0 app/views/assignments/show.html.erb
  39. +21 −0 app/views/campuses/edit.html.erb
  40. +22 −0 app/views/campuses/index.html.erb
  41. +21 −0 app/views/campuses/new.html.erb
  42. +13 −0 app/views/campuses/show.html.erb
  43. +42 −0 app/views/courses/edit.html.erb
  44. +30 −0 app/views/courses/index.html.erb
  45. +41 −0 app/views/courses/new.html.erb
  46. +33 −0 app/views/courses/show.html.erb
  47. +1 −0 app/views/dashboard/index.html.erb
  48. +22 −0 app/views/enrollments/edit.html.erb
  49. +27 −0 app/views/enrollments/index.html.erb
  50. +21 −0 app/views/enrollments/new.html.erb
  51. +13 −0 app/views/enrollments/show.html.erb
  52. +27 −0 app/views/gradations/edit.html.erb
  53. +24 −0 app/views/gradations/index.html.erb
  54. +26 −0 app/views/gradations/new.html.erb
  55. +18 −0 app/views/gradations/show.html.erb
  56. +51 −0 app/views/layouts/standard.html.erb
  57. +22 −0 app/views/sites/edit.html.erb
  58. +22 −0 app/views/sites/index.html.erb
  59. +21 −0 app/views/sites/new.html.erb
  60. +13 −0 app/views/sites/show.html.erb
  61. +65 −0 app/views/students/_student.html.erb
  62. +30 −0 app/views/students/_student_list.erb
  63. +12 −0 app/views/students/edit.html.erb
  64. +30 −0 app/views/students/index.html.erb
  65. +44 −0 app/views/students/new.html.erb
  66. +13 −0 app/views/students/show.html.erb
  67. +30 −0 app/views/teachers/_teacher_list.erb
  68. +37 −0 app/views/teachers/edit.html.erb
  69. +8 −0 app/views/teachers/index.html.erb
  70. +43 −0 app/views/teachers/new.html.erb
  71. +27 −0 app/views/teachers/show.html.erb
  72. +17 −0 app/views/user_types/edit.html.erb
  73. +20 −0 app/views/user_types/index.html.erb
  74. +16 −0 app/views/user_types/new.html.erb
  75. +8 −0 app/views/user_types/show.html.erb
  76. +37 −0 app/views/users/edit.html.erb
  77. +28 −0 app/views/users/index.html.erb
  78. +36 −0 app/views/users/new.html.erb
  79. +28 −0 app/views/users/show.html.erb
  80. +109 −0 config/boot.rb
  81. +59 −0 config/environment.rb
  82. +18 −0 config/environments/development.rb
  83. +19 −0 config/environments/production.rb
  84. +22 −0 config/environments/test.rb
  85. +10 −0 config/initializers/inflections.rb
  86. +5 −0 config/initializers/mime_types.rb
  87. +51 −0 config/routes.rb
  88. BIN db/gradesheet_development
  89. +18 −0 db/migrate/002_create_courses.rb
  90. +19 −0 db/migrate/004_create_users.rb
  91. +14 −0 db/migrate/005_create_enrollments.rb
  92. +15 −0 db/migrate/006_create_gradations.rb
  93. +15 −0 db/migrate/007_create_assignments.rb
  94. +14 −0 db/migrate/011_create_terms.rb
  95. +14 −0 db/migrate/012_create_sites.rb
  96. +75 −0 db/schema.rb
  97. +2 −0 doc/README_FOR_APP
  98. BIN doc/controllers.png
  99. +301 −0 doc/controllers.svg
  100. 0 doc/models.png
  101. 0 doc/models.svg
  102. +15 −0 lib/tasks/diagrams.rake
  103. +9 −0 lib/tasks/load_test_data.rake
  104. +32 −0 lib/tasks/rails.rake
  105. +24 −0 lib/tasks/rcov.rake
  106. +40 −0 public/.htaccess
  107. +30 −0 public/404.html
  108. +30 −0 public/422.html
  109. +30 −0 public/500.html
  110. +12 −0 public/dispatch.cgi
  111. +26 −0 public/dispatch.fcgi
  112. +12 −0 public/dispatch.rb
  113. 0 public/favicon.ico
  114. BIN public/images/current-bg.gif
  115. BIN public/images/llsh.gif
  116. BIN public/images/menu-bg.gif
  117. BIN public/images/rails.png
  118. BIN public/images/spinner.gif
  119. +2 −0 public/javascripts/application.js
  120. +963 −0 public/javascripts/controls.js
  121. +972 −0 public/javascripts/dragdrop.js
  122. +1,120 −0 public/javascripts/effects.js
  123. +4,225 −0 public/javascripts/prototype.js
  124. +5 −0 public/robots.txt
  125. +130 −0 public/stylesheets/layout.css
  126. +35 −0 public/stylesheets/menu.css
  127. +74 −0 public/stylesheets/scaffold.css
  128. +91 −0 public/stylesheets/tables.css
  129. +3 −0 script/about
  130. +3 −0 script/console
  131. +3 −0 script/destroy
  132. +3 −0 script/generate
  133. +3 −0 script/performance/benchmarker
  134. +3 −0 script/performance/profiler
  135. +3 −0 script/performance/request
  136. +3 −0 script/plugin
  137. +3 −0 script/process/inspector
  138. +3 −0 script/process/reaper
  139. +3 −0 script/process/spawner
  140. +3 −0 script/runner
  141. +3 −0 script/server
  142. +11 −0 test/fixtures/assignments.yml
  143. +15 −0 test/fixtures/courses.yml
  144. +9 −0 test/fixtures/enrollments.yml
  145. +11 −0 test/fixtures/gradations.yml
  146. +7 −0 test/fixtures/sites.yml
  147. +10 −0 test/fixtures/terms.yml
  148. +43 −0 test/fixtures/users.yml
  149. +45 −0 test/functional/assignments_controller_test.rb
  150. +45 −0 test/functional/courses_controller_test.rb
  151. +8 −0 test/functional/dashboard_controller_test.rb
  152. +45 −0 test/functional/enrollments_controller_test.rb
  153. +45 −0 test/functional/gradations_controller_test.rb
  154. +45 −0 test/functional/sites_controller_test.rb
  155. +45 −0 test/functional/students_controller_test.rb
  156. +45 −0 test/functional/teachers_controller_test.rb
  157. +45 −0 test/functional/user_types_controller_test.rb
  158. +45 −0 test/functional/users_controller_test.rb
  159. +38 −0 test/test_helper.rb
  160. +8 −0 test/unit/assignment_test.rb
  161. +8 −0 test/unit/campus_test.rb
  162. +8 −0 test/unit/course_test.rb
  163. +8 −0 test/unit/dashboard_test.rb
  164. +8 −0 test/unit/enrollment_test.rb
  165. +8 −0 test/unit/gradation_test.rb
  166. +8 −0 test/unit/site_test.rb
  167. +8 −0 test/unit/student_test.rb
  168. +8 −0 test/unit/teacher_test.rb
  169. +8 −0 test/unit/user_test.rb
  170. +1 −0 vendor/actionmailer
  171. +1 −0 vendor/actionpack
  172. +1 −0 vendor/activemodel
  173. +1 −0 vendor/activerecord
  174. +1 −0 vendor/activeresource
  175. +1 −0 vendor/activesupport
  176. +20 −0 vendor/plugins/validates_existence/MIT-LICENSE
  177. +22 −0 vendor/plugins/validates_existence/README
  178. +22 −0 vendor/plugins/validates_existence/Rakefile
  179. +1 −0 vendor/plugins/validates_existence/init.rb
  180. +47 −0 vendor/plugins/validates_existence/lib/validates_existence.rb
  181. +1 −0 vendor/rails
  182. +1 −0 vendor/railties
@@ -0,0 +1,12 @@
+*~
+DELETEME/*
+log/*
+tmp/*
+coverage.data
+coverage/*
+database.yml
+*.sqlite
+*.sqlite3
+doc/api
+.DS_Store
+.svn
2 README
@@ -0,0 +1,2 @@
+== Welcome to Gradesheet
+
@@ -0,0 +1,10 @@
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require(File.join(File.dirname(__FILE__), 'config', 'boot'))
+
+require 'rake'
+require 'rake/testtask'
+require 'rake/rdoctask'
+
+require 'tasks/rails'
@@ -0,0 +1,11 @@
+# Filters added to this controller apply to all controllers in the application.
+# Likewise, all the methods added will be available for all controllers.
+
+class ApplicationController < ActionController::Base
+ helper :all # include all helpers, all the time
+
+ # See ActionController::RequestForgeryProtection for details
+ # Uncomment the :secret if you're not using the cookie session store
+ protect_from_forgery # :secret => 'e09cdc0512f2d77a60d7ccb4c46775c1'
+
+end
@@ -0,0 +1,87 @@
+class AssignmentsController < ApplicationController
+ layout "standard"
+
+ # GET /assignments
+ # GET /assignments.xml
+ def index
+ @assignments = Assignment.find(:all)
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.xml { render :xml => @assignments }
+ end
+ end
+
+ # GET /assignments/1
+ # GET /assignments/1.xml
+ def show
+ @assignment = Assignment.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.xml { render :xml => @assignment }
+ end
+ end
+
+ # GET /assignments/new
+ # GET /assignments/new.xml
+ def new
+ @assignment = Assignment.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @assignment }
+ end
+ end
+
+ # GET /assignments/1/edit
+ def edit
+ @assignment = Assignment.find(params[:id])
+ end
+
+ # POST /assignments
+ # POST /assignments.xml
+ def create
+ @assignment = Assignment.new(params[:assignment])
+
+ respond_to do |format|
+ if @assignment.save
+ flash[:notice] = 'Assignment was successfully created.'
+ format.html { redirect_to(@assignment) }
+ format.xml { render :xml => @assignment, :status => :created, :location => @assignment }
+ else
+ format.html { render :action => "new" }
+ format.xml { render :xml => @assignment.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /assignments/1
+ # PUT /assignments/1.xml
+ def update
+ @assignment = Assignment.find(params[:id])
+
+ respond_to do |format|
+ if @assignment.update_attributes(params[:assignment])
+ flash[:notice] = 'Assignment was successfully updated.'
+ format.html { redirect_to(@assignment) }
+ format.xml { head :ok }
+ else
+ format.html { render :action => "edit" }
+ format.xml { render :xml => @assignment.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /assignments/1
+ # DELETE /assignments/1.xml
+ def destroy
+ @assignment = Assignment.find(params[:id])
+ @assignment.destroy
+
+ respond_to do |format|
+ format.html { redirect_to(assignments_url) }
+ format.xml { head :ok }
+ end
+ end
+end
@@ -0,0 +1,81 @@
+class CoursesController < ApplicationController
+ layout "standard"
+
+
+ def index
+ @courses = Course.find(:all)
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.xml { render :xml => @courses }
+ end
+ end
+
+
+ def show
+ @course = Course.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.xml { render :xml => @course }
+ end
+ end
+
+
+ def new
+ @course = Course.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @course }
+ end
+ end
+
+
+ def edit
+ @course = Course.find(params[:id])
+ end
+
+
+ def create
+ @course = Course.new(params[:course])
+
+ respond_to do |format|
+ if @course.save
+ flash[:notice] = 'Course was successfully created.'
+ format.html { redirect_to(@course) }
+ format.xml { render :xml => @course, :status => :created, :location => @course }
+ else
+ format.html { render :action => "new" }
+ format.xml { render :xml => @course.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+
+ def update
+ @course = Course.find(params[:id])
+
+ respond_to do |format|
+ if @course.update_attributes(params[:course])
+ flash[:notice] = 'Course was successfully updated.'
+ format.html { redirect_to(@course) }
+ format.xml { head :ok }
+ else
+ format.html { render :action => "edit" }
+ format.xml { render :xml => @course.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+
+ def destroy
+ @course = Course.find(params[:id])
+ @course.destroy
+
+ respond_to do |format|
+ format.html { redirect_to(courses_url) }
+ format.xml { head :ok }
+ end
+ end
+end
@@ -0,0 +1,3 @@
+class DashboardController < ApplicationController
+ layout "standard"
+end
@@ -0,0 +1,87 @@
+class EnrollmentsController < ApplicationController
+ layout "standard"
+
+ # GET /enrollments
+ # GET /enrollments.xml
+ def index
+ @enrollments = Enrollment.find(:all)
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.xml { render :xml => @enrollments }
+ end
+ end
+
+ # GET /enrollments/1
+ # GET /enrollments/1.xml
+ def show
+ @enrollment = Enrollment.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.xml { render :xml => @enrollment }
+ end
+ end
+
+ # GET /enrollments/new
+ # GET /enrollments/new.xml
+ def new
+ @enrollment = Enrollment.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @enrollment }
+ end
+ end
+
+ # GET /enrollments/1/edit
+ def edit
+ @enrollment = Enrollment.find(params[:id])
+ end
+
+ # POST /enrollments
+ # POST /enrollments.xml
+ def create
+ @enrollment = Enrollment.new(params[:enrollment])
+
+ respond_to do |format|
+ if @enrollment.save
+ flash[:notice] = 'Enrollment was successfully created.'
+ format.html { redirect_to(@enrollment) }
+ format.xml { render :xml => @enrollment, :status => :created, :location => @enrollment }
+ else
+ format.html { render :action => "new" }
+ format.xml { render :xml => @enrollment.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /enrollments/1
+ # PUT /enrollments/1.xml
+ def update
+ @enrollment = Enrollment.find(params[:id])
+
+ respond_to do |format|
+ if @enrollment.update_attributes(params[:enrollment])
+ flash[:notice] = 'Enrollment was successfully updated.'
+ format.html { redirect_to(@enrollment) }
+ format.xml { head :ok }
+ else
+ format.html { render :action => "edit" }
+ format.xml { render :xml => @enrollment.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /enrollments/1
+ # DELETE /enrollments/1.xml
+ def destroy
+ @enrollment = Enrollment.find(params[:id])
+ @enrollment.destroy
+
+ respond_to do |format|
+ format.html { redirect_to(enrollments_url) }
+ format.xml { head :ok }
+ end
+ end
+end
@@ -0,0 +1,87 @@
+class GradationsController < ApplicationController
+ layout "standard"
+
+ # GET /gradations
+ # GET /gradations.xml
+ def index
+ @gradations = Gradation.find(:all)
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.xml { render :xml => @gradations }
+ end
+ end
+
+ # GET /gradations/1
+ # GET /gradations/1.xml
+ def show
+ @gradation = Gradation.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.xml { render :xml => @gradation }
+ end
+ end
+
+ # GET /gradations/new
+ # GET /gradations/new.xml
+ def new
+ @gradation = Gradation.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @gradation }
+ end
+ end
+
+ # GET /gradations/1/edit
+ def edit
+ @gradation = Gradation.find(params[:id])
+ end
+
+ # POST /gradations
+ # POST /gradations.xml
+ def create
+ @gradation = Gradation.new(params[:gradation])
+
+ respond_to do |format|
+ if @gradation.save
+ flash[:notice] = 'Gradation was successfully created.'
+ format.html { redirect_to(@gradation) }
+ format.xml { render :xml => @gradation, :status => :created, :location => @gradation }
+ else
+ format.html { render :action => "new" }
+ format.xml { render :xml => @gradation.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /gradations/1
+ # PUT /gradations/1.xml
+ def update
+ @gradation = Gradation.find(params[:id])
+
+ respond_to do |format|
+ if @gradation.update_attributes(params[:gradation])
+ flash[:notice] = 'Gradation was successfully updated.'
+ format.html { redirect_to(@gradation) }
+ format.xml { head :ok }
+ else
+ format.html { render :action => "edit" }
+ format.xml { render :xml => @gradation.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /gradations/1
+ # DELETE /gradations/1.xml
+ def destroy
+ @gradation = Gradation.find(params[:id])
+ @gradation.destroy
+
+ respond_to do |format|
+ format.html { redirect_to(gradations_url) }
+ format.xml { head :ok }
+ end
+ end
+end
Oops, something went wrong.

0 comments on commit 2887619

Please sign in to comment.