From 91690ec9a1c8fe35a50081accc5ff94f839f22af Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Tue, 15 Apr 2014 17:23:06 +0200 Subject: [PATCH 01/55] Issue #188 create controllers --- tutor/app/assets/javascripts/method_constraints.js.coffee | 3 +++ tutor/app/assets/stylesheets/method_constraints.css.scss | 3 +++ tutor/app/controllers/method_constraints_controller.rb | 7 +++++++ tutor/app/helpers/method_constraints_helper.rb | 2 ++ .../test/controllers/method_constraints_controller_test.rb | 7 +++++++ tutor/test/helpers/method_constraints_helper_test.rb | 4 ++++ 6 files changed, 26 insertions(+) create mode 100644 tutor/app/assets/javascripts/method_constraints.js.coffee create mode 100644 tutor/app/assets/stylesheets/method_constraints.css.scss create mode 100644 tutor/app/controllers/method_constraints_controller.rb create mode 100644 tutor/app/helpers/method_constraints_helper.rb create mode 100644 tutor/test/controllers/method_constraints_controller_test.rb create mode 100644 tutor/test/helpers/method_constraints_helper_test.rb diff --git a/tutor/app/assets/javascripts/method_constraints.js.coffee b/tutor/app/assets/javascripts/method_constraints.js.coffee new file mode 100644 index 00000000..24f83d18 --- /dev/null +++ b/tutor/app/assets/javascripts/method_constraints.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/tutor/app/assets/stylesheets/method_constraints.css.scss b/tutor/app/assets/stylesheets/method_constraints.css.scss new file mode 100644 index 00000000..611417eb --- /dev/null +++ b/tutor/app/assets/stylesheets/method_constraints.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the methodConstraints controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/tutor/app/controllers/method_constraints_controller.rb b/tutor/app/controllers/method_constraints_controller.rb new file mode 100644 index 00000000..582ebb5a --- /dev/null +++ b/tutor/app/controllers/method_constraints_controller.rb @@ -0,0 +1,7 @@ +class MethodConstraintsController < ApplicationController + + def create + + end + +end diff --git a/tutor/app/helpers/method_constraints_helper.rb b/tutor/app/helpers/method_constraints_helper.rb new file mode 100644 index 00000000..1102b1dc --- /dev/null +++ b/tutor/app/helpers/method_constraints_helper.rb @@ -0,0 +1,2 @@ +module MethodConstraintsHelper +end diff --git a/tutor/test/controllers/method_constraints_controller_test.rb b/tutor/test/controllers/method_constraints_controller_test.rb new file mode 100644 index 00000000..28467947 --- /dev/null +++ b/tutor/test/controllers/method_constraints_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class MethodConstraintsControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/tutor/test/helpers/method_constraints_helper_test.rb b/tutor/test/helpers/method_constraints_helper_test.rb new file mode 100644 index 00000000..45964376 --- /dev/null +++ b/tutor/test/helpers/method_constraints_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class MethodConstraintsHelperTest < ActionView::TestCase +end From 7b8a309f28a1fa65f67b78d0d99a737322057692 Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Sun, 20 Apr 2014 22:07:27 +0200 Subject: [PATCH 02/55] Issue #188 adding the right controllers --- ...ns.js.coffee => method_constrains.js.coffee} | 0 .../javascripts/variable_constrains.js.coffee | 3 +++ ...ains.css.scss => method_constrains.css.scss} | 2 +- .../stylesheets/variable_constrains.css.scss | 3 +++ tutor/app/controllers/constrains_controller.rb | 17 ----------------- .../controllers/method_constrains_controller.rb | 10 ++++++++++ .../variable_constrains_controller.rb | 6 ++++++ tutor/app/helpers/constrains_helper.rb | 2 -- tutor/app/helpers/method_constrains_helper.rb | 2 ++ tutor/app/helpers/variable_constrains_helper.rb | 2 ++ .../constrains/_create_method_constrains.rb | 1 - .../views/constrains/_create_method_params.rb | 1 - .../constrains/_create_variable_constrains.rb | 1 - ....rb => method_constrains_controller_test.rb} | 2 +- .../variable_constrains_controller_test.rb | 7 +++++++ tutor/test/helpers/constrains_helper_test.rb | 4 ---- .../helpers/method_constrains_helper_test.rb | 4 ++++ .../helpers/variable_constrains_helper_test.rb | 4 ++++ 18 files changed, 43 insertions(+), 28 deletions(-) rename tutor/app/assets/javascripts/{constrains.js.coffee => method_constrains.js.coffee} (100%) create mode 100644 tutor/app/assets/javascripts/variable_constrains.js.coffee rename tutor/app/assets/stylesheets/{constrains.css.scss => method_constrains.css.scss} (60%) create mode 100644 tutor/app/assets/stylesheets/variable_constrains.css.scss delete mode 100644 tutor/app/controllers/constrains_controller.rb create mode 100644 tutor/app/controllers/method_constrains_controller.rb create mode 100644 tutor/app/controllers/variable_constrains_controller.rb delete mode 100644 tutor/app/helpers/constrains_helper.rb create mode 100644 tutor/app/helpers/method_constrains_helper.rb create mode 100644 tutor/app/helpers/variable_constrains_helper.rb delete mode 100644 tutor/app/views/constrains/_create_method_constrains.rb delete mode 100644 tutor/app/views/constrains/_create_method_params.rb delete mode 100644 tutor/app/views/constrains/_create_variable_constrains.rb rename tutor/test/controllers/{constrains_controller_test.rb => method_constrains_controller_test.rb} (53%) create mode 100644 tutor/test/controllers/variable_constrains_controller_test.rb delete mode 100644 tutor/test/helpers/constrains_helper_test.rb create mode 100644 tutor/test/helpers/method_constrains_helper_test.rb create mode 100644 tutor/test/helpers/variable_constrains_helper_test.rb diff --git a/tutor/app/assets/javascripts/constrains.js.coffee b/tutor/app/assets/javascripts/method_constrains.js.coffee similarity index 100% rename from tutor/app/assets/javascripts/constrains.js.coffee rename to tutor/app/assets/javascripts/method_constrains.js.coffee diff --git a/tutor/app/assets/javascripts/variable_constrains.js.coffee b/tutor/app/assets/javascripts/variable_constrains.js.coffee new file mode 100644 index 00000000..24f83d18 --- /dev/null +++ b/tutor/app/assets/javascripts/variable_constrains.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/tutor/app/assets/stylesheets/constrains.css.scss b/tutor/app/assets/stylesheets/method_constrains.css.scss similarity index 60% rename from tutor/app/assets/stylesheets/constrains.css.scss rename to tutor/app/assets/stylesheets/method_constrains.css.scss index 3be7e221..199c2d3b 100644 --- a/tutor/app/assets/stylesheets/constrains.css.scss +++ b/tutor/app/assets/stylesheets/method_constrains.css.scss @@ -1,3 +1,3 @@ -// Place all the styles related to the constrains controller here. +// Place all the styles related to the methodConstrains controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/tutor/app/assets/stylesheets/variable_constrains.css.scss b/tutor/app/assets/stylesheets/variable_constrains.css.scss new file mode 100644 index 00000000..8f921aad --- /dev/null +++ b/tutor/app/assets/stylesheets/variable_constrains.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the variableConstrains controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/tutor/app/controllers/constrains_controller.rb b/tutor/app/controllers/constrains_controller.rb deleted file mode 100644 index 0e71fade..00000000 --- a/tutor/app/controllers/constrains_controller.rb +++ /dev/null @@ -1,17 +0,0 @@ -class ConstrainsController < ApplicationController - - def create_method_constrains - - end - - def create_method_params - - end - - def create_method_params - - end - - - -end diff --git a/tutor/app/controllers/method_constrains_controller.rb b/tutor/app/controllers/method_constrains_controller.rb new file mode 100644 index 00000000..932b5107 --- /dev/null +++ b/tutor/app/controllers/method_constrains_controller.rb @@ -0,0 +1,10 @@ +class MethodConstrainsController < ApplicationController + + def create + @method = MethodConstrain.new() + end + + + + +end diff --git a/tutor/app/controllers/variable_constrains_controller.rb b/tutor/app/controllers/variable_constrains_controller.rb new file mode 100644 index 00000000..c077b135 --- /dev/null +++ b/tutor/app/controllers/variable_constrains_controller.rb @@ -0,0 +1,6 @@ +class VariableConstrainsController < ApplicationController + + def create + + end +end diff --git a/tutor/app/helpers/constrains_helper.rb b/tutor/app/helpers/constrains_helper.rb deleted file mode 100644 index da14d5dc..00000000 --- a/tutor/app/helpers/constrains_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ConstrainsHelper -end diff --git a/tutor/app/helpers/method_constrains_helper.rb b/tutor/app/helpers/method_constrains_helper.rb new file mode 100644 index 00000000..f31d7a41 --- /dev/null +++ b/tutor/app/helpers/method_constrains_helper.rb @@ -0,0 +1,2 @@ +module MethodConstrainsHelper +end diff --git a/tutor/app/helpers/variable_constrains_helper.rb b/tutor/app/helpers/variable_constrains_helper.rb new file mode 100644 index 00000000..7fdf77fe --- /dev/null +++ b/tutor/app/helpers/variable_constrains_helper.rb @@ -0,0 +1,2 @@ +module VariableConstrainsHelper +end diff --git a/tutor/app/views/constrains/_create_method_constrains.rb b/tutor/app/views/constrains/_create_method_constrains.rb deleted file mode 100644 index fba9edb5..00000000 --- a/tutor/app/views/constrains/_create_method_constrains.rb +++ /dev/null @@ -1 +0,0 @@ -_create_method_constrains.rb \ No newline at end of file diff --git a/tutor/app/views/constrains/_create_method_params.rb b/tutor/app/views/constrains/_create_method_params.rb deleted file mode 100644 index 2654fd39..00000000 --- a/tutor/app/views/constrains/_create_method_params.rb +++ /dev/null @@ -1 +0,0 @@ -_create_method_params.rb \ No newline at end of file diff --git a/tutor/app/views/constrains/_create_variable_constrains.rb b/tutor/app/views/constrains/_create_variable_constrains.rb deleted file mode 100644 index 55c68389..00000000 --- a/tutor/app/views/constrains/_create_variable_constrains.rb +++ /dev/null @@ -1 +0,0 @@ -_create_variable_constrains.rb \ No newline at end of file diff --git a/tutor/test/controllers/constrains_controller_test.rb b/tutor/test/controllers/method_constrains_controller_test.rb similarity index 53% rename from tutor/test/controllers/constrains_controller_test.rb rename to tutor/test/controllers/method_constrains_controller_test.rb index ce77c2d0..34732c3f 100644 --- a/tutor/test/controllers/constrains_controller_test.rb +++ b/tutor/test/controllers/method_constrains_controller_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class ConstrainsControllerTest < ActionController::TestCase +class MethodConstrainsControllerTest < ActionController::TestCase # test "the truth" do # assert true # end diff --git a/tutor/test/controllers/variable_constrains_controller_test.rb b/tutor/test/controllers/variable_constrains_controller_test.rb new file mode 100644 index 00000000..61b3b5b1 --- /dev/null +++ b/tutor/test/controllers/variable_constrains_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class VariableConstrainsControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/tutor/test/helpers/constrains_helper_test.rb b/tutor/test/helpers/constrains_helper_test.rb deleted file mode 100644 index fefd1aee..00000000 --- a/tutor/test/helpers/constrains_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class ConstrainsHelperTest < ActionView::TestCase -end diff --git a/tutor/test/helpers/method_constrains_helper_test.rb b/tutor/test/helpers/method_constrains_helper_test.rb new file mode 100644 index 00000000..a3a77235 --- /dev/null +++ b/tutor/test/helpers/method_constrains_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class MethodConstrainsHelperTest < ActionView::TestCase +end diff --git a/tutor/test/helpers/variable_constrains_helper_test.rb b/tutor/test/helpers/variable_constrains_helper_test.rb new file mode 100644 index 00000000..39f5ec76 --- /dev/null +++ b/tutor/test/helpers/variable_constrains_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class VariableConstrainsHelperTest < ActionView::TestCase +end From defa267a4e0efcca99188559fea22b90d4ac7510 Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Sun, 20 Apr 2014 22:35:33 +0200 Subject: [PATCH 03/55] fixing controllars again --- ...trains.js.coffee => solutions_constrains.js.coffee} | 0 .../assets/javascripts/variable_constrains.js.coffee | 3 --- ...nstrains.css.scss => solutions_constrains.css.scss} | 2 +- .../assets/stylesheets/variable_constrains.css.scss | 3 --- tutor/app/controllers/method_constrains_controller.rb | 10 ---------- .../app/controllers/solutions_constrains_controller.rb | 2 ++ .../app/controllers/variable_constrains_controller.rb | 6 ------ tutor/app/helpers/method_constrains_helper.rb | 2 -- tutor/app/helpers/solutions_constrains_helper.rb | 2 ++ tutor/app/helpers/variable_constrains_helper.rb | 2 -- ...test.rb => solutions_constrains_controller_test.rb} | 2 +- .../controllers/variable_constrains_controller_test.rb | 7 ------- tutor/test/helpers/method_constrains_helper_test.rb | 4 ---- tutor/test/helpers/solutions_constrains_helper_test.rb | 4 ++++ tutor/test/helpers/variable_constrains_helper_test.rb | 4 ---- 15 files changed, 10 insertions(+), 43 deletions(-) rename tutor/app/assets/javascripts/{method_constrains.js.coffee => solutions_constrains.js.coffee} (100%) delete mode 100644 tutor/app/assets/javascripts/variable_constrains.js.coffee rename tutor/app/assets/stylesheets/{method_constrains.css.scss => solutions_constrains.css.scss} (60%) delete mode 100644 tutor/app/assets/stylesheets/variable_constrains.css.scss delete mode 100644 tutor/app/controllers/method_constrains_controller.rb create mode 100644 tutor/app/controllers/solutions_constrains_controller.rb delete mode 100644 tutor/app/controllers/variable_constrains_controller.rb delete mode 100644 tutor/app/helpers/method_constrains_helper.rb create mode 100644 tutor/app/helpers/solutions_constrains_helper.rb delete mode 100644 tutor/app/helpers/variable_constrains_helper.rb rename tutor/test/controllers/{method_constrains_controller_test.rb => solutions_constrains_controller_test.rb} (52%) delete mode 100644 tutor/test/controllers/variable_constrains_controller_test.rb delete mode 100644 tutor/test/helpers/method_constrains_helper_test.rb create mode 100644 tutor/test/helpers/solutions_constrains_helper_test.rb delete mode 100644 tutor/test/helpers/variable_constrains_helper_test.rb diff --git a/tutor/app/assets/javascripts/method_constrains.js.coffee b/tutor/app/assets/javascripts/solutions_constrains.js.coffee similarity index 100% rename from tutor/app/assets/javascripts/method_constrains.js.coffee rename to tutor/app/assets/javascripts/solutions_constrains.js.coffee diff --git a/tutor/app/assets/javascripts/variable_constrains.js.coffee b/tutor/app/assets/javascripts/variable_constrains.js.coffee deleted file mode 100644 index 24f83d18..00000000 --- a/tutor/app/assets/javascripts/variable_constrains.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/tutor/app/assets/stylesheets/method_constrains.css.scss b/tutor/app/assets/stylesheets/solutions_constrains.css.scss similarity index 60% rename from tutor/app/assets/stylesheets/method_constrains.css.scss rename to tutor/app/assets/stylesheets/solutions_constrains.css.scss index 199c2d3b..223576c8 100644 --- a/tutor/app/assets/stylesheets/method_constrains.css.scss +++ b/tutor/app/assets/stylesheets/solutions_constrains.css.scss @@ -1,3 +1,3 @@ -// Place all the styles related to the methodConstrains controller here. +// Place all the styles related to the solutionsConstrains controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/tutor/app/assets/stylesheets/variable_constrains.css.scss b/tutor/app/assets/stylesheets/variable_constrains.css.scss deleted file mode 100644 index 8f921aad..00000000 --- a/tutor/app/assets/stylesheets/variable_constrains.css.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the variableConstrains controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/tutor/app/controllers/method_constrains_controller.rb b/tutor/app/controllers/method_constrains_controller.rb deleted file mode 100644 index 932b5107..00000000 --- a/tutor/app/controllers/method_constrains_controller.rb +++ /dev/null @@ -1,10 +0,0 @@ -class MethodConstrainsController < ApplicationController - - def create - @method = MethodConstrain.new() - end - - - - -end diff --git a/tutor/app/controllers/solutions_constrains_controller.rb b/tutor/app/controllers/solutions_constrains_controller.rb new file mode 100644 index 00000000..f416e5b2 --- /dev/null +++ b/tutor/app/controllers/solutions_constrains_controller.rb @@ -0,0 +1,2 @@ +class SolutionsConstrainsController < ApplicationController +end diff --git a/tutor/app/controllers/variable_constrains_controller.rb b/tutor/app/controllers/variable_constrains_controller.rb deleted file mode 100644 index c077b135..00000000 --- a/tutor/app/controllers/variable_constrains_controller.rb +++ /dev/null @@ -1,6 +0,0 @@ -class VariableConstrainsController < ApplicationController - - def create - - end -end diff --git a/tutor/app/helpers/method_constrains_helper.rb b/tutor/app/helpers/method_constrains_helper.rb deleted file mode 100644 index f31d7a41..00000000 --- a/tutor/app/helpers/method_constrains_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module MethodConstrainsHelper -end diff --git a/tutor/app/helpers/solutions_constrains_helper.rb b/tutor/app/helpers/solutions_constrains_helper.rb new file mode 100644 index 00000000..136bdf29 --- /dev/null +++ b/tutor/app/helpers/solutions_constrains_helper.rb @@ -0,0 +1,2 @@ +module SolutionsConstrainsHelper +end diff --git a/tutor/app/helpers/variable_constrains_helper.rb b/tutor/app/helpers/variable_constrains_helper.rb deleted file mode 100644 index 7fdf77fe..00000000 --- a/tutor/app/helpers/variable_constrains_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module VariableConstrainsHelper -end diff --git a/tutor/test/controllers/method_constrains_controller_test.rb b/tutor/test/controllers/solutions_constrains_controller_test.rb similarity index 52% rename from tutor/test/controllers/method_constrains_controller_test.rb rename to tutor/test/controllers/solutions_constrains_controller_test.rb index 34732c3f..e90234ef 100644 --- a/tutor/test/controllers/method_constrains_controller_test.rb +++ b/tutor/test/controllers/solutions_constrains_controller_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class MethodConstrainsControllerTest < ActionController::TestCase +class SolutionsConstrainsControllerTest < ActionController::TestCase # test "the truth" do # assert true # end diff --git a/tutor/test/controllers/variable_constrains_controller_test.rb b/tutor/test/controllers/variable_constrains_controller_test.rb deleted file mode 100644 index 61b3b5b1..00000000 --- a/tutor/test/controllers/variable_constrains_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class VariableConstrainsControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/tutor/test/helpers/method_constrains_helper_test.rb b/tutor/test/helpers/method_constrains_helper_test.rb deleted file mode 100644 index a3a77235..00000000 --- a/tutor/test/helpers/method_constrains_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class MethodConstrainsHelperTest < ActionView::TestCase -end diff --git a/tutor/test/helpers/solutions_constrains_helper_test.rb b/tutor/test/helpers/solutions_constrains_helper_test.rb new file mode 100644 index 00000000..9f468216 --- /dev/null +++ b/tutor/test/helpers/solutions_constrains_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class SolutionsConstrainsHelperTest < ActionView::TestCase +end diff --git a/tutor/test/helpers/variable_constrains_helper_test.rb b/tutor/test/helpers/variable_constrains_helper_test.rb deleted file mode 100644 index 39f5ec76..00000000 --- a/tutor/test/helpers/variable_constrains_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class VariableConstrainsHelperTest < ActionView::TestCase -end From 76daeb5ec3a4ea3b3748a445d20404f6397cc1bc Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Mon, 21 Apr 2014 10:51:13 +0200 Subject: [PATCH 04/55] configure controller --- tutor/app/controllers/solutions_constrains_controller.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tutor/app/controllers/solutions_constrains_controller.rb b/tutor/app/controllers/solutions_constrains_controller.rb index f416e5b2..d5355390 100644 --- a/tutor/app/controllers/solutions_constrains_controller.rb +++ b/tutor/app/controllers/solutions_constrains_controller.rb @@ -1,2 +1,11 @@ class SolutionsConstrainsController < ApplicationController + + def create + + end + + def new + + end + end From 93164c7ebce0bc34ab34a33c22a27637914287ff Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Mon, 21 Apr 2014 13:45:05 +0200 Subject: [PATCH 05/55] Issue #188 Finally fixed Controllers + creating form started --- tutor/app/assets/images/add_buttom.png | Bin 0 -> 4009 bytes tutor/app/assets/images/add_button.png | Bin 0 -> 17815 bytes tutor/app/assets/images/delete_button.png | Bin 0 -> 14804 bytes ...coffee => solutions_constraints.js.coffee} | 0 ...ss.scss => solutions_constraints.css.scss} | 2 +- .../solutions_constrains_controller.rb | 11 --- .../solutions_constraints_controller.rb | 65 ++++++++++++++++++ .../helpers/solutions_constrains_helper.rb | 2 - .../helpers/solutions_constraints_helper.rb | 2 + .../solutions_constraints/_form.html.erb | 44 ++++++++++++ .../solutions_constraints/_show_data.html.erb | 0 .../solutions_constraints/delete.html.erb | 7 ++ .../views/solutions_constraints/edit.html.erb | 3 + .../solutions_constraints/index.html.erb | 10 +++ .../views/solutions_constraints/show.html.erb | 27 ++++++++ tutor/config/routes.rb | 1 + tutor/db/development.sqlite3 | Bin 200704 -> 196608 bytes ... solutions_constraints_controller_test.rb} | 2 +- .../solutions_constrains_helper_test.rb | 4 -- .../solutions_constraints_helper_test.rb | 4 ++ 20 files changed, 165 insertions(+), 19 deletions(-) create mode 100644 tutor/app/assets/images/add_buttom.png create mode 100644 tutor/app/assets/images/add_button.png create mode 100644 tutor/app/assets/images/delete_button.png rename tutor/app/assets/javascripts/{solutions_constrains.js.coffee => solutions_constraints.js.coffee} (100%) rename tutor/app/assets/stylesheets/{solutions_constrains.css.scss => solutions_constraints.css.scss} (59%) delete mode 100644 tutor/app/controllers/solutions_constrains_controller.rb create mode 100644 tutor/app/controllers/solutions_constraints_controller.rb delete mode 100644 tutor/app/helpers/solutions_constrains_helper.rb create mode 100644 tutor/app/helpers/solutions_constraints_helper.rb create mode 100644 tutor/app/views/solutions_constraints/_form.html.erb create mode 100644 tutor/app/views/solutions_constraints/_show_data.html.erb create mode 100644 tutor/app/views/solutions_constraints/delete.html.erb create mode 100644 tutor/app/views/solutions_constraints/edit.html.erb create mode 100644 tutor/app/views/solutions_constraints/index.html.erb create mode 100644 tutor/app/views/solutions_constraints/show.html.erb rename tutor/test/controllers/{solutions_constrains_controller_test.rb => solutions_constraints_controller_test.rb} (52%) delete mode 100644 tutor/test/helpers/solutions_constrains_helper_test.rb create mode 100644 tutor/test/helpers/solutions_constraints_helper_test.rb diff --git a/tutor/app/assets/images/add_buttom.png b/tutor/app/assets/images/add_buttom.png new file mode 100644 index 0000000000000000000000000000000000000000..699f98f2c746514eab402244a42ecd761e15151f GIT binary patch literal 4009 zcmV;a4_5GrP)FoivR!*OG!jQRCt{2op-bxbrr`yyLkyInED`v z5MB~OfcQcalpY#J@Or0kOiPoA+khAt2W$>Z1~w@C9ogV(<`MBt z0lI+afu|5*whXNxwhmwyV0&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tVjc15-ITp~lU#Auc9C<;yi@K8z`C6cn5I{+hw-8wQ3O zZbTu3h@=oj5vYcu8T5yUjTQScUyg47T&JacSJ9JLj8I%KbQAJe)>mGPh;8dMq_lb= z3xAq@9;Na3m}xKH9vF=|g6L(ML4b0@jn zHT^k^;O@ckF$6jE)H4Jg@9v%%p^V(b^KlBD7Wu-8^HdFSwN_Gm+jp6L_@quM*J6kIGq z3QU=6=ir?qg9%{KcqQFeGJYYW-(#N&D4IJ5ACIts1DJbf+CDD%Z@uM2&rHVn;(qlP z$0xrAyPuG0@VUXgHx?FRoU|jg!CONwK}$8hIQwSskmF@VIR7F4cgjc)GSCn0C@0vt zDf+X4(7OI?O&Ovqy#-=NmKo8miTj6<;tqp{aT;NmRO5mMxQI3y^sc1kpPg6S~&< zr}o_i3X!EYTR>R{pIm9kPByYXFp6{t`P!DDYea>l>(QtE9$cz z)UBA=xUWH(qsX?JwiMLp)j!T{baoQuG^|5CKw0}e%>)OjMC?Uq!YBzs!P#zG^5OL_ zTzPN!gFln=AeEqoLmUhA#PG|1U68!v`~T%yPJ;JLYiMn*P+>q~H|=O9z>Fj+fa;H- z9}He09Ze^2hGUC(Ld2jdfMdrh?Wf1IIXmw%#!~tJ*#`K(?#1tTGde{*s|qNq0&kv# zpmCSdb~iV1x8OH(wE!0o9Bk|yENq-C?0o8MJp7!T{9NoTY~1{8Y$n|VqW?z)2PbnI ZOP~LH1&qCdH*f_ASt%vST5;ph{{izxZt(yB literal 0 HcmV?d00001 diff --git a/tutor/app/assets/javascripts/solutions_constrains.js.coffee b/tutor/app/assets/javascripts/solutions_constraints.js.coffee similarity index 100% rename from tutor/app/assets/javascripts/solutions_constrains.js.coffee rename to tutor/app/assets/javascripts/solutions_constraints.js.coffee diff --git a/tutor/app/assets/stylesheets/solutions_constrains.css.scss b/tutor/app/assets/stylesheets/solutions_constraints.css.scss similarity index 59% rename from tutor/app/assets/stylesheets/solutions_constrains.css.scss rename to tutor/app/assets/stylesheets/solutions_constraints.css.scss index 223576c8..95649de1 100644 --- a/tutor/app/assets/stylesheets/solutions_constrains.css.scss +++ b/tutor/app/assets/stylesheets/solutions_constraints.css.scss @@ -1,3 +1,3 @@ -// Place all the styles related to the solutionsConstrains controller here. +// Place all the styles related to the solutionsConstraints controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/tutor/app/controllers/solutions_constrains_controller.rb b/tutor/app/controllers/solutions_constrains_controller.rb deleted file mode 100644 index d5355390..00000000 --- a/tutor/app/controllers/solutions_constrains_controller.rb +++ /dev/null @@ -1,11 +0,0 @@ -class SolutionsConstrainsController < ApplicationController - - def create - - end - - def new - - end - -end diff --git a/tutor/app/controllers/solutions_constraints_controller.rb b/tutor/app/controllers/solutions_constraints_controller.rb new file mode 100644 index 00000000..53ab7261 --- /dev/null +++ b/tutor/app/controllers/solutions_constraints_controller.rb @@ -0,0 +1,65 @@ +class SolutionsConstraintsController < ApplicationController + def index + @parameters = MethodParameter.all + @variables = VariableConstraint.all + #@methods = MethodConstraints.all + end + + def create + + end + + def show_params + @data = MethodParameter.all + render "show_data" + end + + def show_variables + @data = VariableConstraint.all + render "show_data" + end + + def show + @parameters = MethodParameter.find_by_id(params[:id]) + @variables = VariableConstraint.find_by_id(params[:id]) + #@methods = MethodConstraints.find_by_id(params[:id]) + if @parameters.nil? + redirect_to :action => 'index' + end + end + + def edit + if lecturer_signed_in? || teaching_assistant_signed_in? + @parameters = MethodParameter.find_by_id(params[:id]) + @variables = VariableConstraint.find_by_id(params[:id]) + #@methods = MethodConstraints.find_by_id(params[:id]) + end + end + + def update + @parameters = MethodParameter.find_by_id(params[:id]) + @variables = VariableConstraint.find_by_id(params[:id]) + if @parameters.update_attributes(constraint_params) && @variables.update_attributes(constraint_params) + redirect_to :action => 'show' + else + redirect_to :action => 'index' + end + end + + def delete + @parameters = MethodParameter.find_by_id(params[:id]) + @variables = VariableConstraint.find_by_id(params[:id]) + end + + def destroy + @parameters = MethodParameter.find_by_id(params[:id]).destroy + @variables = VariableConstraint.find_by_id(params[:id]).destroy + flash[:success_deletion] = "Constraints deleted." + end + + private + def constraint_params + params.require(:parameter).permit(:parameters, :variables) + end + +end diff --git a/tutor/app/helpers/solutions_constrains_helper.rb b/tutor/app/helpers/solutions_constrains_helper.rb deleted file mode 100644 index 136bdf29..00000000 --- a/tutor/app/helpers/solutions_constrains_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module SolutionsConstrainsHelper -end diff --git a/tutor/app/helpers/solutions_constraints_helper.rb b/tutor/app/helpers/solutions_constraints_helper.rb new file mode 100644 index 00000000..e620299b --- /dev/null +++ b/tutor/app/helpers/solutions_constraints_helper.rb @@ -0,0 +1,2 @@ +module SolutionsConstraintsHelper +end diff --git a/tutor/app/views/solutions_constraints/_form.html.erb b/tutor/app/views/solutions_constraints/_form.html.erb new file mode 100644 index 00000000..ee9d0fe9 --- /dev/null +++ b/tutor/app/views/solutions_constraints/_form.html.erb @@ -0,0 +1,44 @@ +<%= form_for :constrain do |f| %> + + + + + + + +
+ + + + <%= form_for :patient do |u| %> + + + + + + + + <% end %> + + + + <%= form_for :patient do |u| %> + + + + + + + + <% end %> + +
Method Constrains<%= f.text_field :parameter, placeholder: "Return Type"%><%= f.text_field :parameter, placeholder: "Method Name" %>
Method Parameter<%= u.text_field :parameter, placeholder: "Variable Type" %><%= u.text_field :parameter, placeholder: "Variable Name" %><%= image_submit_tag "add_buttom.png", id:"params", style: "width:15%;height:15%;margin_top:10px;"%>
Variable Constraints<%= u.text_field :variable_name, placeholder: "Variable Type" %><%= u.text_field :variable_name, placeholder: "Variable Name" %><%= image_submit_tag "add_buttom.png", id:"variables", style: "width:15%;height:15%;margin_top:10px;"%>
+
+ <% render action: "show_params"%> +
+
+ <% render action: "show_variables"%> +
+
+ <%= f.submit "Save Changes", class: "btn btn-success"%> +<% end %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/_show_data.html.erb b/tutor/app/views/solutions_constraints/_show_data.html.erb new file mode 100644 index 00000000..e69de29b diff --git a/tutor/app/views/solutions_constraints/delete.html.erb b/tutor/app/views/solutions_constraints/delete.html.erb new file mode 100644 index 00000000..ea29441b --- /dev/null +++ b/tutor/app/views/solutions_constraints/delete.html.erb @@ -0,0 +1,7 @@ + +

Delete Constraints

+ <%= form_for :parameter, url: solutions_constraints_delete_path do |delete| %> +

Are you sure you want to delete this constraint

+ <%= @parameters.parameter %> + <%= delete.submit %> + <% end %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/edit.html.erb b/tutor/app/views/solutions_constraints/edit.html.erb new file mode 100644 index 00000000..cc1a9a5e --- /dev/null +++ b/tutor/app/views/solutions_constraints/edit.html.erb @@ -0,0 +1,3 @@ +<%= link_to "<< Back to list", :controller => 'solutions_constraints', :action => 'index' %> +

Edit Constraints

+<%= render "form" %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/index.html.erb b/tutor/app/views/solutions_constraints/index.html.erb new file mode 100644 index 00000000..617589f8 --- /dev/null +++ b/tutor/app/views/solutions_constraints/index.html.erb @@ -0,0 +1,10 @@ +

Solutions' Constraints

+ + + <% @parameters.each do |params| %> + + + <% end %> + + +
<%= link_to params.parameter, :controller => 'solutions_constraints', :action => 'show', :id => params.id %>
\ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/show.html.erb b/tutor/app/views/solutions_constraints/show.html.erb new file mode 100644 index 00000000..ff0fbc2e --- /dev/null +++ b/tutor/app/views/solutions_constraints/show.html.erb @@ -0,0 +1,27 @@ + <%= link_to "<< Back to list", :controller => 'solutions_constraints', :action => 'index' %> + + + + + + + + + + + + + +
Constraints
<%= @parameters.parameter %>
<%= @variables.variable_name %>
+ <%= link_to "Edit", :controller => 'solutions_constraints', :action => 'edit' %> + +
+ + + + + + + + + \ No newline at end of file diff --git a/tutor/config/routes.rb b/tutor/config/routes.rb index e9d7079c..480589ae 100644 --- a/tutor/config/routes.rb +++ b/tutor/config/routes.rb @@ -29,6 +29,7 @@ resources :solutions resources :problems resources :topics + resources :solutions_constraints # Example resource route with options: # resources :products do diff --git a/tutor/db/development.sqlite3 b/tutor/db/development.sqlite3 index b42221be85b6afcfba8479cf19d57ea13ba01df1..d19c0b1d72718ca09796e9cf12d0309b4ca00b82 100644 GIT binary patch literal 196608 zcmeI5e{36Pn%`$gNfae*XjyR-%aSZhiS1mLp~#Um zHh;*Rp=DjRy`}9G#T~9)918TV1@3zNwMBa^+G~qDYq0j&&)gTT)s4KSh}=ct5*t^ zq;OG==egGa|uMe)btk4C>c z@*l$s!?!})LvIZ(4J-#o0|VUmxc}Zy$%B#)+<8(A#f~56?**;GT3NU1h2jmUE~f+S%$YuUOX$mR`yiNO6h2Sw=;t0vlWQ53e|WXFv$W zPM+lNzT;pqYvqPz)T(CZi|B>Zkspdru~s5;E&aAd_LTMNhPB!4r)d?ehS@E#P4E6~ zT8)xkwR|kL>NTp;icfkV4Cf-D*!Vbq?_CE&OQG5R6uc1H;zKd$(?)c&SU0w8_8mY* zwOFfcQClShYqeTgFI4wvH$*C5HY$dQ~u5XnM-E4h~c|C1O59MF6MxBV=YqWMGqq5P{=WNwX|6cMC>;2A4BcWI< z#@|!i-G>S{Z41m%uh)+3P(HKw8kXmNI(_PZOuI(($3CmIU9PFP;|NnyGuC0k@W6x$T@_3Sakeq9jVOr=djne zw)o+AM+c~NqfC8SrLfVMIv z(JPcQes?SwiYW^J;ZHj{Exl0Oq~@P5&@hQwYt^D1q(?O1(LKS~;w0-@Mzr}^e-gZlp4R2Wrm-YjnFl|sH^ki~8^ z+f(LRJ&1oK0jjRn0_Cwj@e2Eo;eSG828aOQIwaayB~NC6QHCQ=(t! zNK&$v(9~@7M3+QW)0!H6rX$hhES0H6k9SEj2{|E0k9A4XN;)Y=V;zZ-R1`8c`t+_u zmQ_W`M4#%GC@He%Nv}jrMUQ$VN-Fw+0Tarl2sc66>p|%j^JrY$;jZo{9BEN3O|KAk

G|za;({@yntizAes( z32|H;5k3~aBm5iT9}9nzqW=$tx{w#{$OPzer6z=@%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@f zxz}n|I>#qDMPW$6*L5mMt6Jv?POb}%v>KI(3cJEyyP zM%*!3o@n73n?-RhKJJQgn``li(i-T|HhERQ%1L>b>LmK%RyWhoNJ@*2J~h}pC%Hto zdkvU+9D?ANB)`kUDd58`iIItLo${o)cp(~@IXd0l5NVhYL$#6mmZ5l~z|A(c#>eVs zBPY&x3(;^$zR(fu=rxoZ7693lKHO}xxnh#}(Q+U?MKhWYXq%3fRy_vFWd_*YfRi+C0OYZaU#6XR_- z=MKb|)vQm`v1l-KzF$c+!_j-iMlA__#fKpeY)bx^pwE8ZRDF=)lIKljxF#PesyAk* z^vty}tKlo9;L$TYJ$0P2?<<6a9XItMJHB}aSztF#^r3RKZ^V^-r~ppj`aa}`a& Date: Mon, 21 Apr 2014 20:20:18 +0200 Subject: [PATCH 06/55] Issue #188 adding some javascript without any ajax --- ...nts.js.coffee => solutions_constraints.js} | 0 .../solutions_constraints_controller.rb | 13 +-- .../solutions_constraints/_form.html.erb | 100 ++++++++++++++++-- .../views/solutions_constraints/create.js.erb | 1 + .../solutions_constraints/index.html.erb | 4 +- .../views/solutions_constraints/new.html.erb | 3 + tutor/config/routes.rb | 9 +- tutor/db/development.sqlite3 | Bin 196608 -> 196608 bytes tutor/db/schema.rb | 2 + tutor/db/seeds.rb | 6 +- 10 files changed, 116 insertions(+), 22 deletions(-) rename tutor/app/assets/javascripts/{solutions_constraints.js.coffee => solutions_constraints.js} (100%) create mode 100644 tutor/app/views/solutions_constraints/create.js.erb create mode 100644 tutor/app/views/solutions_constraints/new.html.erb diff --git a/tutor/app/assets/javascripts/solutions_constraints.js.coffee b/tutor/app/assets/javascripts/solutions_constraints.js similarity index 100% rename from tutor/app/assets/javascripts/solutions_constraints.js.coffee rename to tutor/app/assets/javascripts/solutions_constraints.js diff --git a/tutor/app/controllers/solutions_constraints_controller.rb b/tutor/app/controllers/solutions_constraints_controller.rb index 53ab7261..d15ec3d7 100644 --- a/tutor/app/controllers/solutions_constraints_controller.rb +++ b/tutor/app/controllers/solutions_constraints_controller.rb @@ -6,17 +6,12 @@ def index end def create - + redirect_to action: "index" end - def show_params - @data = MethodParameter.all - render "show_data" - end - - def show_variables - @data = VariableConstraint.all - render "show_data" + def new + @constrain = MethodConstraint.new() + @params = MethodParameter.new() end def show diff --git a/tutor/app/views/solutions_constraints/_form.html.erb b/tutor/app/views/solutions_constraints/_form.html.erb index ee9d0fe9..2270cfa3 100644 --- a/tutor/app/views/solutions_constraints/_form.html.erb +++ b/tutor/app/views/solutions_constraints/_form.html.erb @@ -1,4 +1,85 @@ -<%= form_for :constrain do |f| %> + + +<%= form_for :@constrain do |f| %> @@ -10,14 +91,14 @@ - <%= form_for :patient do |u| %> + <%= form_for :@params do |u| %> - + - + - + <% end %> @@ -34,11 +115,14 @@
Method Constrains
Method Parameter <%= u.text_field :parameter, placeholder: "Variable Type" %><%= u.text_field :parameaaater, placeholder: "Variable Type", id:"params_type" %> <%= u.text_field :parameter, placeholder: "Variable Name" %><%= u.text_field :asd, placeholder: "Variable Name", id:"params_name" %> <%= image_submit_tag "add_buttom.png", id:"params", style: "width:15%;height:15%;margin_top:10px;"%><%= image_tag "add_buttom.png", id:"params", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_params(this);"%>
- <% render action: "show_params"%> +

Paramter

+ No paramter +
- <% render action: "show_variables"%> +

- <%= f.submit "Save Changes", class: "btn btn-success"%> + <%= f.submit "Save Changes", class: "btn btn-default"%> + <% end %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/create.js.erb b/tutor/app/views/solutions_constraints/create.js.erb new file mode 100644 index 00000000..df2ca465 --- /dev/null +++ b/tutor/app/views/solutions_constraints/create.js.erb @@ -0,0 +1 @@ +$('body').append('<%= @comment.text %>'); \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/index.html.erb b/tutor/app/views/solutions_constraints/index.html.erb index 617589f8..f8e2cd77 100644 --- a/tutor/app/views/solutions_constraints/index.html.erb +++ b/tutor/app/views/solutions_constraints/index.html.erb @@ -7,4 +7,6 @@ <% end %> - \ No newline at end of file + + + <%= link_to "Create new Constraint", solutions_constraints_path %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/new.html.erb b/tutor/app/views/solutions_constraints/new.html.erb new file mode 100644 index 00000000..b4dd62db --- /dev/null +++ b/tutor/app/views/solutions_constraints/new.html.erb @@ -0,0 +1,3 @@ +

New mooo

+ +<%= render 'form' %> \ No newline at end of file diff --git a/tutor/config/routes.rb b/tutor/config/routes.rb index 480589ae..f4005e4d 100644 --- a/tutor/config/routes.rb +++ b/tutor/config/routes.rb @@ -29,7 +29,7 @@ resources :solutions resources :problems resources :topics - resources :solutions_constraints + # Example resource route with options: # resources :products do @@ -55,6 +55,13 @@ resources :model_answers do post "model_answers/new" end + resources :solutions_constraints do + collection do + post "new" + end + end + + # Example resource route with sub-resources: # resources :products do # resources :comments, :sales diff --git a/tutor/db/development.sqlite3 b/tutor/db/development.sqlite3 index d19c0b1d72718ca09796e9cf12d0309b4ca00b82..16f9168c6518c0aa49ad1fcc1826ba2aa4fd9b2e 100644 GIT binary patch delta 4675 zcmbVQZERat8NSDMlBP}K?xTbuN+Q%%ZK__MbI*4-v^ZYtv}qG3aheZMz8W`QPMpMc zl0}2KQYH9<*tk+ILWnX1;tyL_M@lB7vHn0H_yN--v_H_X-w4KpplDJX&UHrawS6KG zk@LsTbKmoRJn#FS>q4QSP-uAblW=XbVHi&yEgpYlZX$63vI`WNRB~bw3nFqJlJgd7 ztwh>$6XuP~!YOOw6oRL6OPvWiNUkT7Oy*+qD+3#o@tM@%bYEgaOs-x{<)-^PRx=~! z#Ly)ep=dFhj7DO&o&ujWo>GUG{-V*7x9pc+XkPG6!U!Uy^`V5Iav$bm@puPJr}?#> zd_1{4czwBRIG)N5MAKcDr!!dO2J%DKX3)g)4cI@hK0kls#(Kmow%2{(?7@i^g&b?5 zW+ovR3u4336Eka_BmLczaAWw&)tfh2)*R`bnIGwyyS6;k6Hj)p%c0nGv@>hvv)#G$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aAyF&LrP(vE(G*k|`zJu)g%WqxvFJ6X!c zglG+`C<(=Wf3L+8J)){zpGU6BczbW}JB>vp6jPkvhYpV)!7!!V`Eer`^W3oNy<2>P<$@3(+NZa1v0CkZ;pL1s#e8IUfT~Y%=s*6GUm5Vsax^J|r%(GXp;MOcd2T zyh4RBsdgOaXc9cjO0O(Nb3X1=F3OX8_MQA0|X1s8E{Zvx@*SZ!k!a_k~ISx|Mq>Phgn;T#S7o~`z8 z_) z@59%M;?>wC>J6vyRjp@4%B@GfW-nW%MB8VQFtrsrouzcBZbkhqK-8?GPPUBBp+1mO zJ;jCP+$*C~HAc14F=7yJJuZeIfVQP1 Date: Tue, 22 Apr 2014 11:52:43 +0200 Subject: [PATCH 07/55] Issue #188 adding some ajax to send arrays to controller --- .../javascripts/solutions_constraints.js | 173 +++++++++++++++++- .../solutions_constraints_controller.rb | 28 ++- .../_edit_method.html.erb | 47 +++++ .../_edit_variable.html.erb | 19 ++ .../solutions_constraints/_form.html.erb | 114 ++---------- .../views/solutions_constraints/create.js.erb | 1 - .../views/solutions_constraints/edit.html.erb | 2 +- .../views/solutions_constraints/new.html.erb | 2 +- 8 files changed, 274 insertions(+), 112 deletions(-) create mode 100644 tutor/app/views/solutions_constraints/_edit_method.html.erb create mode 100644 tutor/app/views/solutions_constraints/_edit_variable.html.erb delete mode 100644 tutor/app/views/solutions_constraints/create.js.erb diff --git a/tutor/app/assets/javascripts/solutions_constraints.js b/tutor/app/assets/javascripts/solutions_constraints.js index 24f83d18..838fddd8 100644 --- a/tutor/app/assets/javascripts/solutions_constraints.js +++ b/tutor/app/assets/javascripts/solutions_constraints.js @@ -1,3 +1,170 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ +// # Place all the behaviors and hooks related to the matching controller here. +// # All this logic will automatically be available in application.js. +// # You can use CoffeeScript in this file: http://coffeescript.org/ + +var type = new Array(); +var param_name = new Array(); + +function add_params(field) +{ + var tmp_type = document.getElementById("params_type").value; + var tmp_name = document.getElementById("params_name").value; + + if (tmp_name != "" && tmp_type != "") { + document.getElementById("params_type").style.border= ""; + document.getElementById("params_name").style.border= ""; + type[type.length] = tmp_type; + document.getElementById("params_type").value = ""; + param_name[param_name.length] = tmp_name; + document.getElementById("params_name").value = ""; + + document.getElementById("parameter").innerHTML = "

Paramters Constraints

"; + for (var i = 0; i < type.length; i++) { + $('#parameter').append(""); + $('#parameter').append(""); + $('#parameter').append(""); + $('#parameter').append(""); + $('#parameter').append(""); + $('#parameter').append(""); + $('#parameter').append(""); + $('#parameter').append(""); + } + $('#parameter').append("
\"delete
"); + }else { + if (tmp_name == "" && tmp_type == ""){ + document.getElementById("params_type").style.border= "red 1px solid"; + document.getElementById("params_name").style.border= "red 1px solid"; + }else if(tmp_name == ""){ + document.getElementById("params_type").style.border= ""; + document.getElementById("params_name").style.border= "red 1px solid"; + }else{ + document.getElementById("params_type").style.border= "red 1px solid"; + document.getElementById("params_name").style.border= ""; + } + } +} +function remove_params(field) +{ + var index = field.id.split("_")[1]; + type.splice(index,1); + param_name.splice(index,1); + document.getElementById("parameter").innerHTML = "

Paramters Constraints

"; + if(type.length == 0) + { + $('#parameter').append("No paramter"); + } + for (var i = 0; i < type.length; i++) { + $('#parameter').append(""); + $('#parameter').append(""); + $('#parameter').append(""); + $('#parameter').append(""); + $('#parameter').append(""); + $('#parameter').append(""); + $('#parameter').append(""); + $('#parameter').append(""); + } + $('#parameter').append("
\"delete
"); +} + +var var_type = new Array(); +var var_name = new Array(); + +function add_variable(field) +{ + var tmp_type = document.getElementById("variable_type").value; + var tmp_name = document.getElementById("variable_name").value; + + if (tmp_name != "" && tmp_type != "") { + document.getElementById("variable_type").style.border= ""; + document.getElementById("variable_name").style.border= ""; + var_type[var_type.length] = tmp_type; + document.getElementById("variable_type").value = ""; + var_name[var_name.length] = tmp_name; + document.getElementById("variable_name").value = ""; + + document.getElementById("variable").innerHTML = "

Variables Constraints

"; + for (var i = 0; i < var_type.length; i++) { + $('#variable').append(""); + $('#variable').append(""); + $('#variable').append(""); + $('#variable').append(""); + $('#variable').append(""); + $('#variable').append(""); + $('#variable').append(""); + $('#variable').append(""); + } + $('#variable').append("
\"delete
"); + }else { + if (tmp_name == "" && tmp_type == ""){ + document.getElementById("variable_type").style.border= "red 1px solid"; + document.getElementById("variable_name").style.border= "red 1px solid"; + }else if(tmp_name == ""){ + document.getElementById("variable_type").style.border= ""; + document.getElementById("variable_name").style.border= "red 1px solid"; + }else{ + document.getElementById("variable_type").style.border= "red 1px solid"; + document.getElementById("variable_name").style.border= ""; + } + } +} +function remove_variable(field) +{ + var index = field.id.split("_")[1]; + var_type.splice(index,1); + var_name.splice(index,1); + document.getElementById("variable").innerHTML = "

Variables Constraints

"; + if(var_type.length == 0) + { + $('#variable').append("No Variables"); + } + for (var i = 0; i < var_type.length; i++) { + $('#variable').append(""); + $('#variable').append(""); + $('#variable').append(""); + $('#variable').append(""); + $('#variable').append(""); + $('#variable').append(""); + $('#variable').append(""); + $('#variable').append(""); + } + $('#variable').append("
\"delete
"); +} + +function submitParams() +{ hash = {} + for (var i = 0; i < type.length; i++) { + hash += {params_name[i]:type[i]} + }; + method = $('#_constrain_method_return').val() + name = $('#_constrain_method_name').val() + $.ajax({ + type: "POST", + url: "/solutions_constraints", + data:{ p_type: JSON.stringify(type), + p_hash: JSON.stringify(hash), + p_name: JSON.stringify(param_name), + v_type: JSON.stringify(var_type), + v_name: JSON.stringify(var_name), + method_return: JSON.stringify(method), + method_name: JSON.stringify(name), + }, + datatype: "JSON", + success: function(){}, + error: function(){alert("failed");}, + }); +} + + +// function sendparams(){ +// alert("doog"); +// $.ajax({ +// data: { depart: type.toString(), return_date: param_name}, +// type: 'post', +// url: "/payment/create", +// }); +// } +// $('#account_settings').on('ajax:error', function(event, xhr, status) { +// // insert the failure message inside the "#account_settings" element +// $(this).append(xhr.responseText) +// $ajax:beforeSend() +// }); \ No newline at end of file diff --git a/tutor/app/controllers/solutions_constraints_controller.rb b/tutor/app/controllers/solutions_constraints_controller.rb index d15ec3d7..f3800fc9 100644 --- a/tutor/app/controllers/solutions_constraints_controller.rb +++ b/tutor/app/controllers/solutions_constraints_controller.rb @@ -6,12 +6,29 @@ def index end def create - redirect_to action: "index" + param_type = params[:p_type] + param_name = params[:p_name] + var_type = params[:v_type] + var_name = params[:v_type] + method_return = params[:method_return] + method_name = params[:method_name] + + myhash = {} + param_name.each_with_index do |k,i| + myhash[k] = param_type[i] + end + + myhash.each do |key, value| + puts(key + value) + end + + end def new - @constrain = MethodConstraint.new() - @params = MethodParameter.new() + @constrain = MethodConstraint.new + @params = MethodParameter.new + @variables = VariableConstraint.new end def show @@ -52,9 +69,4 @@ def destroy flash[:success_deletion] = "Constraints deleted." end - private - def constraint_params - params.require(:parameter).permit(:parameters, :variables) - end - end diff --git a/tutor/app/views/solutions_constraints/_edit_method.html.erb b/tutor/app/views/solutions_constraints/_edit_method.html.erb new file mode 100644 index 00000000..0351b8cb --- /dev/null +++ b/tutor/app/views/solutions_constraints/_edit_method.html.erb @@ -0,0 +1,47 @@ + + +<%= form_for :@constrain do |f| %> + + + + + + + +
+ + + + <%= fields_for :@params do |u| %> + + + + + + + + <% end %> + +
Method Constrains<%= f.text_field :method_return, placeholder: "Return Type"%><%= f.text_field :method_name, placeholder: "Method Name" %>
Method Parameter<%= u.text_field :params_type, placeholder: "Variable Type", id:"params_type" %><%= u.text_field :parameter, placeholder: "Variable Name", id:"params_name" %><%= image_tag "add_buttom.png", id:"params", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_params(this);"%>
+
+

Paramter

+ No paramters +
+
+ <%= f.submit "Save Changes", class: "btn btn-default", onclick:"submitParams();"%> + +<% end %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/_edit_variable.html.erb b/tutor/app/views/solutions_constraints/_edit_variable.html.erb new file mode 100644 index 00000000..47464e84 --- /dev/null +++ b/tutor/app/views/solutions_constraints/_edit_variable.html.erb @@ -0,0 +1,19 @@ +<%= form_for :@constrain do |f| %> + + + + + + + + + + +
Variable Constraints<%= u.text_field :variable_name, placeholder: "Variable Type" %><%= u.text_field :variable_name, placeholder: "Variable Name" %><%= image_tag "add_buttom.png", id:"params", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_params(this);"%>
+
+

Variables

+ No Variables +
+
+ <%= f.submit "Save Changes", class: "btn btn-default"%> +<% end %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/_form.html.erb b/tutor/app/views/solutions_constraints/_form.html.erb index 2270cfa3..ea049415 100644 --- a/tutor/app/views/solutions_constraints/_form.html.erb +++ b/tutor/app/views/solutions_constraints/_form.html.erb @@ -1,128 +1,46 @@ - - -<%= form_for :@constrain do |f| %> +<%= form_for :@constrain, url:{action:"create"} do |f| %> - + - +
- <%= form_for :@params do |u| %> + <%= fields_for :@params do |u| %> - + - + - + <% end %> - <%= form_for :patient do |u| %> + <%= fields_for :@variables do |u| %> - + - + - + <% end %>
Method Constrains <%= f.text_field :parameter, placeholder: "Return Type"%><%= f.text_field :method_return, placeholder: "Return Type"%> <%= f.text_field :parameter, placeholder: "Method Name" %><%= f.text_field :method_name, placeholder: "Method Name" %>
Method Parameter <%= u.text_field :parameaaater, placeholder: "Variable Type", id:"params_type" %><%= u.text_field :params_type, placeholder: "Variable Type", id:"params_type" %> <%= u.text_field :asd, placeholder: "Variable Name", id:"params_name" %><%= u.text_field :parameter, placeholder: "Variable Name", id:"params_name" %> <%= image_tag "add_buttom.png", id:"params", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_params(this);"%><%= image_tag "add_buttom.png", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_params(this);"%>
Variable Constraints <%= u.text_field :variable_name, placeholder: "Variable Type" %><%= u.text_field :variable_type, placeholder: "Variable Type", id:"variable_type" %> <%= u.text_field :variable_name, placeholder: "Variable Name" %><%= u.text_field :variable_name, placeholder: "Variable Name", id:"variable_name" %> <%= image_submit_tag "add_buttom.png", id:"variables", style: "width:15%;height:15%;margin_top:10px;"%><%= image_tag "add_buttom.png", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_variable(this);"%>
-

Paramter

- No paramter - +

Paramters Constraints

+ No paramters
- +

Variables Constraints

+ No variables

- <%= f.submit "Save Changes", class: "btn btn-default"%> - + <%= button_tag "Save Changes", type: "button", class: "btn btn-large btn-success", onclick:"submitParams();"%> <% end %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/create.js.erb b/tutor/app/views/solutions_constraints/create.js.erb deleted file mode 100644 index df2ca465..00000000 --- a/tutor/app/views/solutions_constraints/create.js.erb +++ /dev/null @@ -1 +0,0 @@ -$('body').append('<%= @comment.text %>'); \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/edit.html.erb b/tutor/app/views/solutions_constraints/edit.html.erb index cc1a9a5e..eb8f486a 100644 --- a/tutor/app/views/solutions_constraints/edit.html.erb +++ b/tutor/app/views/solutions_constraints/edit.html.erb @@ -1,3 +1,3 @@ <%= link_to "<< Back to list", :controller => 'solutions_constraints', :action => 'index' %>

Edit Constraints

-<%= render "form" %> \ No newline at end of file +<%= render "edit_method" %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/new.html.erb b/tutor/app/views/solutions_constraints/new.html.erb index b4dd62db..a0932b48 100644 --- a/tutor/app/views/solutions_constraints/new.html.erb +++ b/tutor/app/views/solutions_constraints/new.html.erb @@ -1,3 +1,3 @@ -

New mooo

+

New Method/Variable Constraints

<%= render 'form' %> \ No newline at end of file From 2ab81a1b1a5a3ecb351f584ea9624cc5fba8063b Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Tue, 22 Apr 2014 13:03:07 +0200 Subject: [PATCH 08/55] Issue #188 commiting to go database --- .../javascripts/solutions_constraints.js | 41 ++++++++---------- .../solutions_constraints_controller.rb | 17 +------- tutor/db/development.sqlite3 | Bin 196608 -> 200704 bytes tutor/db/schema.rb | 18 ++++++-- 4 files changed, 32 insertions(+), 44 deletions(-) diff --git a/tutor/app/assets/javascripts/solutions_constraints.js b/tutor/app/assets/javascripts/solutions_constraints.js index 838fddd8..9f5db2d6 100644 --- a/tutor/app/assets/javascripts/solutions_constraints.js +++ b/tutor/app/assets/javascripts/solutions_constraints.js @@ -43,6 +43,7 @@ function add_params(field) } } } + function remove_params(field) { var index = field.id.split("_")[1]; @@ -107,6 +108,7 @@ function add_variable(field) } } } + function remove_variable(field) { var index = field.id.split("_")[1]; @@ -131,40 +133,31 @@ function remove_variable(field) } function submitParams() -{ hash = {} +{ var hash_p = [] + var hash_v = [] + for (var i = 0; i < type.length; i++) { + hash_p.push({ + type: type[i] , + name: param_name[i] + }); + }; for (var i = 0; i < type.length; i++) { - hash += {params_name[i]:type[i]} + hash_v.push({ + type: var_type[i] , + name: var_name[i] + }); }; method = $('#_constrain_method_return').val() name = $('#_constrain_method_name').val() $.ajax({ type: "POST", url: "/solutions_constraints", - data:{ p_type: JSON.stringify(type), - p_hash: JSON.stringify(hash), - p_name: JSON.stringify(param_name), - v_type: JSON.stringify(var_type), - v_name: JSON.stringify(var_name), + data:{ parameter_constraint: JSON.stringify(hash_p), + variable_constraint: JSON.stringify(hash_v), method_return: JSON.stringify(method), method_name: JSON.stringify(name), }, - datatype: "JSON", success: function(){}, error: function(){alert("failed");}, }); -} - - -// function sendparams(){ -// alert("doog"); -// $.ajax({ -// data: { depart: type.toString(), return_date: param_name}, -// type: 'post', -// url: "/payment/create", -// }); -// } -// $('#account_settings').on('ajax:error', function(event, xhr, status) { -// // insert the failure message inside the "#account_settings" element -// $(this).append(xhr.responseText) -// $ajax:beforeSend() -// }); \ No newline at end of file +} \ No newline at end of file diff --git a/tutor/app/controllers/solutions_constraints_controller.rb b/tutor/app/controllers/solutions_constraints_controller.rb index f3800fc9..319bda4d 100644 --- a/tutor/app/controllers/solutions_constraints_controller.rb +++ b/tutor/app/controllers/solutions_constraints_controller.rb @@ -6,22 +6,7 @@ def index end def create - param_type = params[:p_type] - param_name = params[:p_name] - var_type = params[:v_type] - var_name = params[:v_type] - method_return = params[:method_return] - method_name = params[:method_name] - - myhash = {} - param_name.each_with_index do |k,i| - myhash[k] = param_type[i] - end - - myhash.each do |key, value| - puts(key + value) - end - + @method_cons = params[:paramter_constraint] end diff --git a/tutor/db/development.sqlite3 b/tutor/db/development.sqlite3 index 16f9168c6518c0aa49ad1fcc1826ba2aa4fd9b2e..5a2a8685fe775231f963209454ea5e30f6e0be6e 100644 GIT binary patch delta 5239 zcmbVQYitzP6`s2bUe@;R*f?NH;$jD@1%u7pJ9A%d6Yu(k9}9kijasl_*RaOkHTD`m z6v;*<%AYi87^x#wYA8yB`lFa)S9aAZA#J5d=|hRsR%)dR+CNoWsfDUS^dW`bomtS# z?5r$xWn1!o=broBbG~!#V`Zgupz4($=&?JNn2 zzcry%Jx~_)g;v-5%HpA&Wi`HoNP(K7Ap{liLF*q>wfg)up*QqEwXl0b*tLc#cKQzj zr(MnZjrvpN%cvSEjR-bk-ar%;L6)_uSG0PRk3=$K4d>ERwP>ssDz!)ZW2Y9DE~h&B z6G!7}Y=%zK#bXVZdKX6~c)GJ;3Y{EA3zxbsjl~v|OCv|(BWKgYC$Ch1JyONfB}SwA zQd6a!16Dc3suu?ffldw!$qU_=PPI+9_jaL%!B~{1;ZPzmJ2-uu&Mys(4<6}A!sAn2 z<5T@hsrlB+ZSxm9P9?K(tO$Q3$&che$-kBFu9rm~RUNV|7hxj8;3AAv!$$96rg|*g#wB+>w+vw!o9^BdELc*xacj zsoC-L)I@t??sBrPtAD63hRzT7cK4pRm|R$F&_~Z4+Aq=-+nR6E14ROWPuvinccWm#|%j8d0%=yzFyGWHvJw zPoy%og3w}pxFs>kV@H%?>P4oJt*SnC*!VUg$oXO14aN z#yfhhRD-=zl~ANC=@*u3?Hp9j81bwH3xOUSjvwPo9ckQfbfCEhw#Ud+iuI24^mNSk zPc~1rcCqQ^c5+djrz5FzGv|j;n=&0=Xvr1?kl&NU&w9zq&*VCr+908b60b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8r9N)H;hCjrIs!+N7r(cEI9-eWfX-%*v{u%E6?e8QwR;1)iZ;y!$I&J;P z4$&!UPN0sMxIg*`hwUK;TJc~du%OHTSPj$X+@bpPC|f$z{qrX^djowVg_2aWT_~?m z?iZhYAw;H#F-Q$d#)&)iv^^7CD>WN)Xbbn}PeRuxDX`;crimXP4psRxbUh?xhbwrh z)dIGmR^Bh-NCb=J2pC_QGX`6L43~Ki5~yB^Xko;>fz}mtVPl2KaB1FK@FL!nI@%^B z#Bm(#{V{=@hCp2$L732{j$nsNc{<|VGEu!ZZla1{i5%{K7jA%97=+E3w`3yG5?qKg z3PZi%z5)&qhZ6sYuRtFg=C{l!`Z#f~s;uHs>~U;QS#8Nb;f>%!wDx#AibPkAm6b%- z9#tR*-~tE+po+2RY|HcaX0a{ITn8>ant-VQpP1CbK}My@4x+# z-D^#?=&Q(UegPf!8ec-~ZfEJg-R_c4Rw|<{Xzh1(Xr!cEJQJ%X1ifDEiI>suT^uX( za6LL%&UePDIY+O@z3cVp2i~o{=$mWr>_gv;u42?+1~V!#qg+!0PKc z6GSN8pzxi2#QVubCIFnSmoEzp`u>L)cJaI^9%rqD~l6&x6^L^FD! znevGDl>!F>BV3mNNBW3&=V^zcl(1C9QLEEvXGjDNhM})tA&>ZNmGj#w_f%V90TH## z@`$&TLn5?yOoi^4g1zUF)kReLekm$3qF20aosk#HA|FKHU$<-f2Nl=8wm()~Q-i+I z;l0rn`R&?k-I1HfJJpE3zxHfzw~f%cUO4ma&Y+d#gAVg@QNPo*L{@)B-RSTkin zGz}MKok%>}XmL2;>;t+i5bo8K6iBh=k#yO(C=4O*I+W k^e;kyz{OB|+c*NB9Kb7Q5^V-3Mu5O)3|az|!0Xcg0P0_9761SM diff --git a/tutor/db/schema.rb b/tutor/db/schema.rb index d98ab000..9fb5eef9 100644 --- a/tutor/db/schema.rb +++ b/tutor/db/schema.rb @@ -11,7 +11,15 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20140419085448) do +ActiveRecord::Schema.define(version: 20140422100002) do + + create_table "acknowledgements", force: true do |t| + t.string "message" + t.integer "course_id" + t.integer "student_id" + t.datetime "created_at" + t.datetime "updated_at" + end create_table "admins", force: true do |t| t.string "name" @@ -25,8 +33,9 @@ create_table "attempts", force: true do |t| t.integer "student_id" t.integer "problem_id" - t.boolean "failure", default: false - t.boolean "success", default: false + t.boolean "failure", default: false + t.boolean "success", default: false + t.boolean "uncompleted", default: false t.datetime "created_at" t.datetime "updated_at" end @@ -134,6 +143,7 @@ t.string "method_name" t.string "method_return" t.integer "model_answer_id" + t.integer "method_constraint_id" t.integer "owner_id" t.string "owner_type" t.datetime "created_at" @@ -324,7 +334,7 @@ create_table "variable_constraints", force: true do |t| t.string "variable_name" - t.string "type" + t.string "variable_type" t.integer "model_answer_id" t.integer "owner_id" t.string "owner_type" From 7b765c72eb845a8ccb14f2f66a04c9bceec22bf1 Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Tue, 22 Apr 2014 14:39:14 +0200 Subject: [PATCH 09/55] Issue #188 part of the saving to db works --- .../javascripts/solutions_constraints.js | 25 +++++++++++++---- .../solutions_constraints_controller.rb | 28 +++++++++++++------ 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/tutor/app/assets/javascripts/solutions_constraints.js b/tutor/app/assets/javascripts/solutions_constraints.js index 0a04af9f..b8b072c7 100644 --- a/tutor/app/assets/javascripts/solutions_constraints.js +++ b/tutor/app/assets/javascripts/solutions_constraints.js @@ -152,18 +152,31 @@ function submitParams() $.ajax({ type: "POST", url: "/solutions_constraints", - data:{ parameter_constraint: JSON.stringify(hash_p), - variable_constraint: JSON.stringify(hash_v), - method_return: JSON.stringify(method), - method_name: JSON.stringify(name) + data:{ parameter_constraint: hash_p, + variable_constraint: hash_v, + method_return: method, + method_name: name }, success: function(data){ - alert("Data have been Added successfully"); - window.location = window.location + if (data) { + alert("Data have been Added successfully"); + window.location = window.location + }else{ + alert("Data messigin/incorrect !"); + validate(method,name); + } }, datatype: "JSON", error: function(){ alert("failed"); } }); +} + +function validate(method, name) +{ + if ( (method == "" || name == "") && type.length > 0) + { + + }; } \ No newline at end of file diff --git a/tutor/app/controllers/solutions_constraints_controller.rb b/tutor/app/controllers/solutions_constraints_controller.rb index b3d7051d..ae97f2f5 100644 --- a/tutor/app/controllers/solutions_constraints_controller.rb +++ b/tutor/app/controllers/solutions_constraints_controller.rb @@ -6,18 +6,28 @@ def index end def create - @method_cons = params[:parameter_constraint] + method_cons = params[:parameter_constraint] @var_cons = params[:variable_constraint] - - @method = params[:method_name] - @method_returned = params[:method_return] - @constarint = MethodConstraint.new - @Constraint.method_name = @method - @Constraint.method_return = @method_returned - @Constraint.save + method = params[:method_name] + method_returned = params[:method_return] - redirect_to action:"index" + unless method == "" + @constarint = MethodConstraint.new + @constarint.method_name = method + @constarint.method_return = @method_returned + + unless method_cons.blank? + method_cons.each do |cons| + @parameters = MethodParameter.new + @parameters.parameter = method_cons[:cons][:name] + @parameters.params_type = method_cons[:cons][:type] + # @constrain.parameters << @parameters + @parameters.save + end + end + @constarint.save + end end def new From f92b5248384db913858a048a0b75994565a0c2fc Mon Sep 17 00:00:00 2001 From: Ahmed Atef Date: Tue, 22 Apr 2014 16:16:59 +0200 Subject: [PATCH 10/55] Added destroy method in the problems controller and added documentation --- tutor/app/controllers/problems_controller.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tutor/app/controllers/problems_controller.rb b/tutor/app/controllers/problems_controller.rb index fbe1a307..c21c4c06 100644 --- a/tutor/app/controllers/problems_controller.rb +++ b/tutor/app/controllers/problems_controller.rb @@ -81,4 +81,21 @@ def new render ('public/404') end end + + # [Remove Problem - Story 4.18] + # This action takes the problem id, remove it from the database + # and then redirects the user to the show page of the track that had the problem + # with a "Problem successfully Deleted" message. + # Parameters: + # params[:id]: The current problem's id + # Returns: + # flash[:notice]: A message indicating the success of the deletion + # Author: Ahmed Atef + def destroy + @track = Problem.find_by_id(params[:id]).track_id + if Problem.find_by_id(params[:id]).destroy + flash[:notice] = "Problem successfully Deleted" + redirect_to(:controller => 'track' , :action => 'show' ,:id => @track.id) + end + end end \ No newline at end of file From 1335bf2547626f74533cfb0f2b08cc01eacf86d9 Mon Sep 17 00:00:00 2001 From: Ahmed Atef Date: Tue, 22 Apr 2014 16:20:50 +0200 Subject: [PATCH 11/55] Added button delete problem in the Edit view of the problem --- tutor/app/views/problems/edit.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tutor/app/views/problems/edit.html.erb b/tutor/app/views/problems/edit.html.erb index 61b4f592..db828153 100644 --- a/tutor/app/views/problems/edit.html.erb +++ b/tutor/app/views/problems/edit.html.erb @@ -8,4 +8,5 @@ and a paragraph to view the problem description of the instance variable @proble <% if flash[:notice] %>
<%= flash[:notice] %>
-<% end %> \ No newline at end of file +<% end %> + <%= button_to "Delete Problem", {:action => 'destroy'}, method: :delete,class: 'btn btn-primary',:id => params[:id] , :confirm => "Are you sure you want to delete this problem ??" %> \ No newline at end of file From a20386d20c3c910a53339f28127d0003ff431bb4 Mon Sep 17 00:00:00 2001 From: Ahmed Atef Date: Tue, 22 Apr 2014 16:21:25 +0200 Subject: [PATCH 12/55] Fixed a minor mistake in id passed of the track --- tutor/app/controllers/problems_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutor/app/controllers/problems_controller.rb b/tutor/app/controllers/problems_controller.rb index c21c4c06..1e68f2cf 100644 --- a/tutor/app/controllers/problems_controller.rb +++ b/tutor/app/controllers/problems_controller.rb @@ -95,7 +95,7 @@ def destroy @track = Problem.find_by_id(params[:id]).track_id if Problem.find_by_id(params[:id]).destroy flash[:notice] = "Problem successfully Deleted" - redirect_to(:controller => 'track' , :action => 'show' ,:id => @track.id) + redirect_to(:controller => 'track' , :action => 'show' ,:id => @track) end end end \ No newline at end of file From c22e158f3212399108cc1eb3994f275f5acde1b3 Mon Sep 17 00:00:00 2001 From: Ahmed Atef Date: Tue, 22 Apr 2014 16:29:26 +0200 Subject: [PATCH 13/55] typo in track' controller s name in redirect --- tutor/app/controllers/problems_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutor/app/controllers/problems_controller.rb b/tutor/app/controllers/problems_controller.rb index 1e68f2cf..929994d1 100644 --- a/tutor/app/controllers/problems_controller.rb +++ b/tutor/app/controllers/problems_controller.rb @@ -95,7 +95,7 @@ def destroy @track = Problem.find_by_id(params[:id]).track_id if Problem.find_by_id(params[:id]).destroy flash[:notice] = "Problem successfully Deleted" - redirect_to(:controller => 'track' , :action => 'show' ,:id => @track) + redirect_to(:controller => 'tracks' , :action => 'show' ,:id => @track) end end end \ No newline at end of file From f35c6b0fadd6ca151156c171f435b224cad08cfd Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Tue, 22 Apr 2014 20:32:24 +0200 Subject: [PATCH 14/55] Issue #188 saves empty records --- .../solutions_constraints_controller.rb | 53 ++----------------- .../solutions_constraints/_show_data.html.erb | 0 .../solutions_constraints/delete.html.erb | 7 --- .../views/solutions_constraints/edit.html.erb | 3 -- .../solutions_constraints/index.html.erb | 12 ----- .../views/solutions_constraints/show.html.erb | 27 ---------- 6 files changed, 5 insertions(+), 97 deletions(-) delete mode 100644 tutor/app/views/solutions_constraints/_show_data.html.erb delete mode 100644 tutor/app/views/solutions_constraints/delete.html.erb delete mode 100644 tutor/app/views/solutions_constraints/edit.html.erb delete mode 100644 tutor/app/views/solutions_constraints/index.html.erb delete mode 100644 tutor/app/views/solutions_constraints/show.html.erb diff --git a/tutor/app/controllers/solutions_constraints_controller.rb b/tutor/app/controllers/solutions_constraints_controller.rb index ae97f2f5..2af0007f 100644 --- a/tutor/app/controllers/solutions_constraints_controller.rb +++ b/tutor/app/controllers/solutions_constraints_controller.rb @@ -1,10 +1,4 @@ class SolutionsConstraintsController < ApplicationController - def index - @parameters = MethodParameter.all - @variables = VariableConstraint.all - #@methods = MethodConstraints.all - end - def create method_cons = params[:parameter_constraint] @var_cons = params[:variable_constraint] @@ -17,59 +11,22 @@ def create @constarint.method_name = method @constarint.method_return = @method_returned - unless method_cons.blank? + if method_cons.present? method_cons.each do |cons| @parameters = MethodParameter.new - @parameters.parameter = method_cons[:cons][:name] - @parameters.params_type = method_cons[:cons][:type] + puts "#{method_cons[0]} here" + @parameters.parameter = method_cons[:name] + @parameters.params_type = method_cons[:type] # @constrain.parameters << @parameters @parameters.save end end @constarint.save end + render json: true end def new @constrain = MethodConstraint.new end - - def show - @parameters = MethodParameter.find_by_id(params[:id]) - @variables = VariableConstraint.find_by_id(params[:id]) - #@methods = MethodConstraints.find_by_id(params[:id]) - if @parameters.nil? - redirect_to :action => 'index' - end - end - - def edit - if lecturer_signed_in? || teaching_assistant_signed_in? - @parameters = MethodParameter.find_by_id(params[:id]) - @variables = VariableConstraint.find_by_id(params[:id]) - #@methods = MethodConstraints.find_by_id(params[:id]) - end - end - - def update - @parameters = MethodParameter.find_by_id(params[:id]) - @variables = VariableConstraint.find_by_id(params[:id]) - if @parameters.update_attributes(constraint_params) && @variables.update_attributes(constraint_params) - redirect_to :action => 'show' - else - redirect_to :action => 'index' - end - end - - def delete - @parameters = MethodParameter.find_by_id(params[:id]) - @variables = VariableConstraint.find_by_id(params[:id]) - end - - def destroy - @parameters = MethodParameter.find_by_id(params[:id]).destroy - @variables = VariableConstraint.find_by_id(params[:id]).destroy - flash[:success_deletion] = "Constraints deleted." - end - end diff --git a/tutor/app/views/solutions_constraints/_show_data.html.erb b/tutor/app/views/solutions_constraints/_show_data.html.erb deleted file mode 100644 index e69de29b..00000000 diff --git a/tutor/app/views/solutions_constraints/delete.html.erb b/tutor/app/views/solutions_constraints/delete.html.erb deleted file mode 100644 index ea29441b..00000000 --- a/tutor/app/views/solutions_constraints/delete.html.erb +++ /dev/null @@ -1,7 +0,0 @@ - -

Delete Constraints

- <%= form_for :parameter, url: solutions_constraints_delete_path do |delete| %> -

Are you sure you want to delete this constraint

- <%= @parameters.parameter %> - <%= delete.submit %> - <% end %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/edit.html.erb b/tutor/app/views/solutions_constraints/edit.html.erb deleted file mode 100644 index eb8f486a..00000000 --- a/tutor/app/views/solutions_constraints/edit.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= link_to "<< Back to list", :controller => 'solutions_constraints', :action => 'index' %> -

Edit Constraints

-<%= render "edit_method" %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/index.html.erb b/tutor/app/views/solutions_constraints/index.html.erb deleted file mode 100644 index f8e2cd77..00000000 --- a/tutor/app/views/solutions_constraints/index.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

Solutions' Constraints

- - - <% @parameters.each do |params| %> - - - <% end %> - - -
<%= link_to params.parameter, :controller => 'solutions_constraints', :action => 'show', :id => params.id %>
- - <%= link_to "Create new Constraint", solutions_constraints_path %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/show.html.erb b/tutor/app/views/solutions_constraints/show.html.erb deleted file mode 100644 index ff0fbc2e..00000000 --- a/tutor/app/views/solutions_constraints/show.html.erb +++ /dev/null @@ -1,27 +0,0 @@ - <%= link_to "<< Back to list", :controller => 'solutions_constraints', :action => 'index' %> - - - - - - - - - - - - - -
Constraints
<%= @parameters.parameter %>
<%= @variables.variable_name %>
- <%= link_to "Edit", :controller => 'solutions_constraints', :action => 'edit' %> - -
- - - - - - - - - \ No newline at end of file From 5eccd5d2ccfe1ce0a920aa260cb9faac92f46468 Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Tue, 22 Apr 2014 22:59:57 +0200 Subject: [PATCH 15/55] Issue #188 still configuring --- .../solutions_constraints_controller.rb | 10 +++++++--- .../solutions_constraints/_edit_method.html.erb | 16 ---------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/tutor/app/controllers/solutions_constraints_controller.rb b/tutor/app/controllers/solutions_constraints_controller.rb index 2af0007f..4512a7a0 100644 --- a/tutor/app/controllers/solutions_constraints_controller.rb +++ b/tutor/app/controllers/solutions_constraints_controller.rb @@ -14,16 +14,20 @@ def create if method_cons.present? method_cons.each do |cons| @parameters = MethodParameter.new - puts "#{method_cons[0]} here" + puts(method_cons[0]) @parameters.parameter = method_cons[:name] @parameters.params_type = method_cons[:type] # @constrain.parameters << @parameters @parameters.save end + render json: true + @constarint.save + else + render json: false end - @constarint.save + end - render json: true + end def new diff --git a/tutor/app/views/solutions_constraints/_edit_method.html.erb b/tutor/app/views/solutions_constraints/_edit_method.html.erb index 0351b8cb..6f78afd7 100644 --- a/tutor/app/views/solutions_constraints/_edit_method.html.erb +++ b/tutor/app/views/solutions_constraints/_edit_method.html.erb @@ -1,19 +1,3 @@ - - <%= form_for :@constrain do |f| %> From 660e0bfa1350bfc55756422c1fd911d34c503588 Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Wed, 23 Apr 2014 02:11:10 +0200 Subject: [PATCH 16/55] Issue #188 adding documentations --- .../javascripts/solutions_constraints.js | 25 ++++++++++-- .../solutions_constraints_controller.rb | 39 ++++++++++++------- 2 files changed, 47 insertions(+), 17 deletions(-) diff --git a/tutor/app/assets/javascripts/solutions_constraints.js b/tutor/app/assets/javascripts/solutions_constraints.js index b8b072c7..e0bfed78 100644 --- a/tutor/app/assets/javascripts/solutions_constraints.js +++ b/tutor/app/assets/javascripts/solutions_constraints.js @@ -4,7 +4,13 @@ var type = new Array(); var param_name = new Array(); +var var_type = new Array(); +var var_name = new Array(); +// # Description: Adds the parameters from the text_fields to array +// # Parameters:none +// # Returns: none +// # Author: Ahmed Mohamed Magdi function add_params(field) { var tmp_type = document.getElementById("params_type").value; @@ -44,6 +50,10 @@ function add_params(field) } } +// # Description: removes selected variable from method Contraints +// # Parameters:none +// # Returns: none +// # Author: Ahmed Mohamed Magdi function remove_params(field) { var index = field.id.split("_")[1]; @@ -67,9 +77,10 @@ function remove_params(field) $('#parameter').append("
"); } -var var_type = new Array(); -var var_name = new Array(); - +// # Description: Adds the parameters from the text_fields to array +// # Parameters:none +// # Returns: none +// # Author: Ahmed Mohamed Magdi function add_variable(field) { var tmp_type = document.getElementById("variable_type").value; @@ -109,6 +120,10 @@ function add_variable(field) } } +// # Description: removes selected variable from Variable Contraints +// # Parameters:none +// # Returns: none +// # Author: Ahmed Mohamed Magdi function remove_variable(field) { var index = field.id.split("_")[1]; @@ -132,6 +147,10 @@ function remove_variable(field) $('#variable').append(""); } +// # Description: submits via ajax to the controller +// # Parameters:none +// # Returns: none +// # Author: Ahmed Mohamed Magdi function submitParams() { var hash_p = [] var hash_v = [] diff --git a/tutor/app/controllers/solutions_constraints_controller.rb b/tutor/app/controllers/solutions_constraints_controller.rb index 50914a19..fa1ef12c 100644 --- a/tutor/app/controllers/solutions_constraints_controller.rb +++ b/tutor/app/controllers/solutions_constraints_controller.rb @@ -1,35 +1,46 @@ class SolutionsConstraintsController < ApplicationController + + # Description: Creates New record for either Method or vairable constraints + # Parameters: + # method_cons: Hash containting the Method parameters + # var_cons: Hash containting the Variables Constraints + # method: value of the method name. + # method_returned: value of the method return type + # Returns: none + # Author: Ahmed Mohamed Magdi def create method_cons = params[:parameter_constraint] - @var_cons = params[:variable_constraint] - + var_cons = params[:variable_constraint] method = params[:method_name] method_returned = params[:method_return] unless method == "" - @constarint = MethodConstraint.new - @constarint.method_name = method - @constarint.method_return = @method_returned + constarint = MethodConstraint.new + constarint.method_name = method + constarint.method_return = method_returned if method_cons.present? method_cons.each do |cons| - @parameters = MethodParameter.new - @parameters.parameter = method_cons[:name] - @parameters.params_type = method_cons[:type] - # @constrain.parameters << @parameters - @parameters.save + parameters = MethodParameter.new + parameters.parameter = method_cons[:name] + parameters.params_type = method_cons[:type] + # constarint.parameters << parameters + parameters.save end render json: true - @constarint.save + constarint.save else render json: false end - end - end + # Description: init New record + # Parameters: none + # Returns: none + # Author: Ahmed Mohamed Magdi def new - @constrain = MethodConstraint.new + constrain = MethodConstraint.new + parameters = MethodParameter.new end end From 3cab10d91fb2baa6a6a3ee91ebad3e7c34af0c0c Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Wed, 23 Apr 2014 15:23:18 +0200 Subject: [PATCH 17/55] Issue #188 fixing view --- tutor/app/assets/images/delete_button.png | Bin 14804 -> 14624 bytes .../javascripts/solutions_constraints.js | 46 ++++++++++++++++-- .../solutions_constraints/_form.html.erb | 9 ++++ .../views/solutions_constraints/new.html.erb | 10 +++- 4 files changed, 59 insertions(+), 6 deletions(-) diff --git a/tutor/app/assets/images/delete_button.png b/tutor/app/assets/images/delete_button.png index 11bc5190c797f4cfc1bbbf4d924cf1f30101155d..67ca61605b384449e0cab4038e5e43753bfd48e4 100644 GIT binary patch literal 14624 zcmZ8oc|26__rG%u#uCP4%Q6h1C=%JtD1#PDE3!tS>`C@nWLK6{v@p|0i%Pca+YBm- zP=u^AC1f4h2DAL8@1H;a@OpXfxzBT!=bZC?pPS}rZ?j8yk1zlLyN=shodEy{?@tH- z6X5-FyIy<+0E}jiTUnlq8d)q5x~E|CaHi;W!y8vW*SWJ6m#fu8Tq^^YE>RWQmwtsU zG(9}jc?KK*P-s#iV3-!bUB}2>)QDbiGp3-@=7y$z1pIT+q)jzIpF%hH!$u~ z!+}@d&v?!qi$526e#qL&_p*&O@5jp80;D0DP}ZFi zrN0z|05h#bmZvz=)aijAL^H9e|AL@a!TT21ch>UDF~UF9Hiyo8@DrAHuX#NCJbS(2 z?1R=5DJv#D7X#!)%%Y_%83tI7t|x!poR#Icf*H-0b;t%*RLEWG7eb zKhI~k1AFaKTrxh)65E?!^v%o1$Cs5I;Ru9xb)Cf@I2tiQJ@C_y`}>Eualyf0RGAh^xL$&21|x`bvLYiQ zDAH}7pqC+t?}(ig8Qdk7aP2vGjgd4lV{J`km~Rpu`gAZ-9L~SNuhUmnmfO&I#WLfU zEDF|Z#P1qZpNV=RespwFET*(sTHDT!h-JP$sO`m^PXaZo zYTGm3g7y=!I>k@WSyr_AvQu`=zld8~hsv+J|F(u!Y6IUGy(H5VQ=!%@)2+cTnO)8*Np9JuYr?y9< zQ}mPxwXhu_*7qMSj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z)2PbnI ZOP~LH1&qCdH*f_ASt%vST5;ph{{izxZt(yB diff --git a/tutor/app/assets/javascripts/solutions_constraints.js b/tutor/app/assets/javascripts/solutions_constraints.js index e0bfed78..eb3c4169 100644 --- a/tutor/app/assets/javascripts/solutions_constraints.js +++ b/tutor/app/assets/javascripts/solutions_constraints.js @@ -32,7 +32,7 @@ function add_params(field) $('#parameter').append(""); $('#parameter').append(""); $('#parameter').append(""); - $('#parameter').append("\"delete"); + $('#parameter').append("\"delete"); $('#parameter').append(""); } $('#parameter').append(""); @@ -71,7 +71,7 @@ function remove_params(field) $('#parameter').append(""); $('#parameter').append(""); $('#parameter').append(""); - $('#parameter').append("\"delete"); + $('#parameter').append("\"delete"); $('#parameter').append(""); } $('#parameter').append(""); @@ -102,7 +102,7 @@ function add_variable(field) $('#variable').append(""); $('#variable').append(""); $('#variable').append(""); - $('#variable').append("\"delete"); + $('#variable').append("\"delete"); $('#variable').append(""); } $('#variable').append(""); @@ -141,18 +141,54 @@ function remove_variable(field) $('#variable').append(""); $('#variable').append(""); $('#variable').append(""); - $('#variable').append("\"delete"); + $('#variable').append("\"delete"); $('#variable').append(""); } $('#variable').append(""); } +function showErrorMessage(arrayOfErrors){ + for (var i = 0; i < arrayOfErrors.length; i++) { + $("#errors").append("

"+arrayOfErrors[i]+"
"); + }; +} + +function testingValidation(errorArray){ + method = $('#_constrain_method_return').val() + name = $('#_constrain_method_name').val() + if ( type.length > 0) { + if ( method == "" && name == ""){ + document.getElementById("_constrain_method_return").style.border= "red 1px solid"; + document.getElementById("_constrain_method_name").style.border= "red 1px solid"; + errorArray.push("Enter method name and return type .."); + return false; + }else if(method == ""){ + document.getElementById("_constrain_method_name").style.border= ""; + document.getElementById("_constrain_method_return").style.border= "red 1px solid"; + errorArray.push("Enter method return type .."); + return false; + }else if(name == ""){ + document.getElementById("_constrain_method_name").style.border= "red 1px solid"; + document.getElementById("_constrain_method_return").style.border= ""; + errorArray.push("Enter method name .."); + return false; + } + }; +} + // # Description: submits via ajax to the controller // # Parameters:none // # Returns: none // # Author: Ahmed Mohamed Magdi function submitParams() -{ var hash_p = [] +{ + $("#errors").html(""); + errorArray = [] + if (!testingValidation(errorArray)) { + showErrorMessage(errorArray); + return; + }; + var hash_p = [] var hash_v = [] for (var i = 0; i < type.length; i++) { hash_p.push({ diff --git a/tutor/app/views/solutions_constraints/_form.html.erb b/tutor/app/views/solutions_constraints/_form.html.erb index ea049415..337e853a 100644 --- a/tutor/app/views/solutions_constraints/_form.html.erb +++ b/tutor/app/views/solutions_constraints/_form.html.erb @@ -21,6 +21,15 @@ <% end %> + +

Add Variable Constraints

+
+ <%= fields_for :@variables do |u| %> Variable Constraints diff --git a/tutor/app/views/solutions_constraints/new.html.erb b/tutor/app/views/solutions_constraints/new.html.erb index a0932b48..f15c0d6f 100644 --- a/tutor/app/views/solutions_constraints/new.html.erb +++ b/tutor/app/views/solutions_constraints/new.html.erb @@ -1,3 +1,11 @@ -

New Method/Variable Constraints

+
+
+

Add Method Constraints

+
<%= render 'form' %> \ No newline at end of file From 4469ac016048a2fcb481958662ab42bea449148c Mon Sep 17 00:00:00 2001 From: Ahmed Atef Date: Wed, 23 Apr 2014 19:22:43 +0200 Subject: [PATCH 18/55] Fixed indentation in the method destroy --- tutor/app/controllers/problems_controller.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tutor/app/controllers/problems_controller.rb b/tutor/app/controllers/problems_controller.rb index 929994d1..edd45a7e 100644 --- a/tutor/app/controllers/problems_controller.rb +++ b/tutor/app/controllers/problems_controller.rb @@ -92,10 +92,11 @@ def new # flash[:notice]: A message indicating the success of the deletion # Author: Ahmed Atef def destroy - @track = Problem.find_by_id(params[:id]).track_id - if Problem.find_by_id(params[:id]).destroy - flash[:notice] = "Problem successfully Deleted" - redirect_to(:controller => 'tracks' , :action => 'show' ,:id => @track) - end + @track = Problem.find_by_id(params[:id]).track_id + if Problem.find_by_id(params[:id]).destroy + flash[:notice] = "Problem successfully Deleted" + redirect_to(:controller => 'tracks' , :action => 'show' ,:id => @track) + end end + end \ No newline at end of file From ac21979a6116b205db0062d7d037476f3eb77a03 Mon Sep 17 00:00:00 2001 From: Ahmed Atef Date: Wed, 23 Apr 2014 23:21:26 +0200 Subject: [PATCH 19/55] break down long lines --- tutor/app/controllers/problems_controller.rb | 3 ++- tutor/app/views/problems/edit.html.erb | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tutor/app/controllers/problems_controller.rb b/tutor/app/controllers/problems_controller.rb index edd45a7e..75080d9d 100644 --- a/tutor/app/controllers/problems_controller.rb +++ b/tutor/app/controllers/problems_controller.rb @@ -95,7 +95,8 @@ def destroy @track = Problem.find_by_id(params[:id]).track_id if Problem.find_by_id(params[:id]).destroy flash[:notice] = "Problem successfully Deleted" - redirect_to(:controller => 'tracks' , :action => 'show' ,:id => @track) + redirect_to(:controller => 'tracks', + :action => 'show' ,:id => @track) end end diff --git a/tutor/app/views/problems/edit.html.erb b/tutor/app/views/problems/edit.html.erb index db828153..88abb8a7 100644 --- a/tutor/app/views/problems/edit.html.erb +++ b/tutor/app/views/problems/edit.html.erb @@ -9,4 +9,6 @@ and a paragraph to view the problem description of the instance variable @proble <% if flash[:notice] %>
<%= flash[:notice] %>
<% end %> - <%= button_to "Delete Problem", {:action => 'destroy'}, method: :delete,class: 'btn btn-primary',:id => params[:id] , :confirm => "Are you sure you want to delete this problem ??" %> \ No newline at end of file + <%= button_to "Delete Problem", {:action => 'destroy'}, method: :delete, + class: 'btn btn-primary',:id => params[:id] , + :confirm => "Are you sure you want to delete this problem ??" %> \ No newline at end of file From 7313ec110f8afea54646e21e1245dde9b3e72c11 Mon Sep 17 00:00:00 2001 From: Ahmed Atef Date: Wed, 23 Apr 2014 23:40:10 +0200 Subject: [PATCH 20/55] Fixed commas as Mamdou7's comment --- tutor/app/views/problems/edit.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutor/app/views/problems/edit.html.erb b/tutor/app/views/problems/edit.html.erb index 88abb8a7..d96726d8 100644 --- a/tutor/app/views/problems/edit.html.erb +++ b/tutor/app/views/problems/edit.html.erb @@ -10,5 +10,5 @@ and a paragraph to view the problem description of the instance variable @proble
<%= flash[:notice] %>
<% end %> <%= button_to "Delete Problem", {:action => 'destroy'}, method: :delete, - class: 'btn btn-primary',:id => params[:id] , + class: 'btn btn-primary', :id =>params[:id] , :confirm => "Are you sure you want to delete this problem ??" %> \ No newline at end of file From 2d09e3e064f3d8db967be510c0bfc1d9dd63c832 Mon Sep 17 00:00:00 2001 From: Ahmed Atef Date: Wed, 23 Apr 2014 23:46:48 +0200 Subject: [PATCH 21/55] added a space --- tutor/app/views/problems/edit.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutor/app/views/problems/edit.html.erb b/tutor/app/views/problems/edit.html.erb index d96726d8..4fa1c94b 100644 --- a/tutor/app/views/problems/edit.html.erb +++ b/tutor/app/views/problems/edit.html.erb @@ -10,5 +10,5 @@ and a paragraph to view the problem description of the instance variable @proble
<%= flash[:notice] %>
<% end %> <%= button_to "Delete Problem", {:action => 'destroy'}, method: :delete, - class: 'btn btn-primary', :id =>params[:id] , + class: 'btn btn-primary', :id => params[:id], :confirm => "Are you sure you want to delete this problem ??" %> \ No newline at end of file From 368032cdb85d78695080ed08eaab94580eef9f72 Mon Sep 17 00:00:00 2001 From: Ahmed Atef Date: Wed, 23 Apr 2014 23:51:51 +0200 Subject: [PATCH 22/55] fixing tab --- tutor/app/views/problems/edit.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutor/app/views/problems/edit.html.erb b/tutor/app/views/problems/edit.html.erb index 4fa1c94b..b1838fec 100644 --- a/tutor/app/views/problems/edit.html.erb +++ b/tutor/app/views/problems/edit.html.erb @@ -10,5 +10,5 @@ and a paragraph to view the problem description of the instance variable @proble
<%= flash[:notice] %>
<% end %> <%= button_to "Delete Problem", {:action => 'destroy'}, method: :delete, - class: 'btn btn-primary', :id => params[:id], - :confirm => "Are you sure you want to delete this problem ??" %> \ No newline at end of file + class: 'btn btn-primary', :id => params[:id], + :confirm => "Are you sure you want to delete this problem ??" %> \ No newline at end of file From ac80085f777e14ba24b703c8f77ee38e579463d1 Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Wed, 23 Apr 2014 23:58:44 +0200 Subject: [PATCH 23/55] Issue #188 finally create workng --- .../javascripts/solutions_constraints.js | 64 +++++++++++-------- .../solutions_constraints_controller.rb | 27 ++++---- tutor/app/views/students/new.html.erb | 8 +++ 3 files changed, 60 insertions(+), 39 deletions(-) create mode 100644 tutor/app/views/students/new.html.erb diff --git a/tutor/app/assets/javascripts/solutions_constraints.js b/tutor/app/assets/javascripts/solutions_constraints.js index eb3c4169..78e1d948 100644 --- a/tutor/app/assets/javascripts/solutions_constraints.js +++ b/tutor/app/assets/javascripts/solutions_constraints.js @@ -147,33 +147,48 @@ function remove_variable(field) $('#variable').append(""); } +// # Description: TO show the error massages +// # Parameters: +// # errorArray: array of Error, for multi error massage show +// # Returns: none +// # Author: Ahmed Mohamed Magdi function showErrorMessage(arrayOfErrors){ for (var i = 0; i < arrayOfErrors.length; i++) { $("#errors").append("
"+arrayOfErrors[i]+"
"); }; } -function testingValidation(errorArray){ - method = $('#_constrain_method_return').val() - name = $('#_constrain_method_name').val() +// # Description: Validates Data before sending it to the Server side +// # Parameters: +// # errorArray: array of Error, for multi error massage show +// # Returns: none +// # Author: Ahmed Mohamed Magdi +function testingValidation(errorArray,method,name){ + if (type.length == 0 && + var_type.length == 0 && + method == 0 && + name == 0 ) + { + errorArray.push("Can not submit an empty Data, Try filling either Method Constraint for Variable Constraint"); + return false; + }; if ( type.length > 0) { if ( method == "" && name == ""){ document.getElementById("_constrain_method_return").style.border= "red 1px solid"; document.getElementById("_constrain_method_name").style.border= "red 1px solid"; errorArray.push("Enter method name and return type .."); - return false; - }else if(method == ""){ - document.getElementById("_constrain_method_name").style.border= ""; - document.getElementById("_constrain_method_return").style.border= "red 1px solid"; - errorArray.push("Enter method return type .."); - return false; - }else if(name == ""){ - document.getElementById("_constrain_method_name").style.border= "red 1px solid"; - document.getElementById("_constrain_method_return").style.border= ""; - errorArray.push("Enter method name .."); - return false; } }; + if(method == ""){ + document.getElementById("_constrain_method_name").style.border= ""; + document.getElementById("_constrain_method_return").style.border= "red 1px solid"; + errorArray.push("Enter method return type .."); + }else if(name == ""){ + document.getElementById("_constrain_method_name").style.border= "red 1px solid"; + document.getElementById("_constrain_method_return").style.border= ""; + errorArray.push("Enter method name .."); + } + return errorArray.length == 0; } // # Description: submits via ajax to the controller @@ -183,11 +198,15 @@ function testingValidation(errorArray){ function submitParams() { $("#errors").html(""); - errorArray = [] - if (!testingValidation(errorArray)) { + errorArray = new Array(); + + method = $('#_constrain_method_return').val() + name = $('#_constrain_method_name').val() + if (!testingValidation(errorArray,method,name)) { showErrorMessage(errorArray); return; }; + var hash_p = [] var hash_v = [] for (var i = 0; i < type.length; i++) { @@ -202,8 +221,6 @@ function submitParams() name: var_name[i] }); }; - method = $('#_constrain_method_return').val() - name = $('#_constrain_method_name').val() $.ajax({ type: "POST", url: "/solutions_constraints", @@ -218,20 +235,11 @@ function submitParams() window.location = window.location }else{ alert("Data messigin/incorrect !"); - validate(method,name); } }, datatype: "JSON", error: function(){ - alert("failed"); + alert("Failed to Add Constraints, Check again"); } }); -} - -function validate(method, name) -{ - if ( (method == "" || name == "") && type.length > 0) - { - - }; } \ No newline at end of file diff --git a/tutor/app/controllers/solutions_constraints_controller.rb b/tutor/app/controllers/solutions_constraints_controller.rb index fa1ef12c..4dd0bdf9 100644 --- a/tutor/app/controllers/solutions_constraints_controller.rb +++ b/tutor/app/controllers/solutions_constraints_controller.rb @@ -1,6 +1,6 @@ class SolutionsConstraintsController < ApplicationController - # Description: Creates New record for either Method or vairable constraints + # Description: Creates New record for either Method or variable constraints # Parameters: # method_cons: Hash containting the Method parameters # var_cons: Hash containting the Variables Constraints @@ -18,21 +18,27 @@ def create constarint = MethodConstraint.new constarint.method_name = method constarint.method_return = method_returned - if method_cons.present? - method_cons.each do |cons| + method_cons.each do |index,value| parameters = MethodParameter.new - parameters.parameter = method_cons[:name] - parameters.params_type = method_cons[:type] - # constarint.parameters << parameters + parameters.parameter = value[:name] + parameters.params_type = value[:type] parameters.save + constarint.method_parameter << parameters end - render json: true - constarint.save - else - render json: false end + constarint.save end + if var_cons.present? + var_cons.each do |index,value| + variable = VariableConstraint.new + variable.variable_name = value[:name] + variable.variable_type = value[:type] + variable.save + end + end + + render json: true end # Description: init New record @@ -41,6 +47,5 @@ def create # Author: Ahmed Mohamed Magdi def new constrain = MethodConstraint.new - parameters = MethodParameter.new end end diff --git a/tutor/app/views/students/new.html.erb b/tutor/app/views/students/new.html.erb new file mode 100644 index 00000000..25280b0a --- /dev/null +++ b/tutor/app/views/students/new.html.erb @@ -0,0 +1,8 @@ +<%= @solved.each do |c| + + + c.problem_id + + + +end %> \ No newline at end of file From 68b9ed6c61cae124718303b9aaa8309a3eae1647 Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Thu, 24 Apr 2014 02:20:43 +0200 Subject: [PATCH 24/55] Issue #188 fixing condiftions --- tutor/app/assets/javascripts/solutions_constraints.js | 4 ++-- .../controllers/solutions_constraints_controller.rb | 8 ++++---- .../solutions_constraints/_edit_variable.html.erb | 11 +++-------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/tutor/app/assets/javascripts/solutions_constraints.js b/tutor/app/assets/javascripts/solutions_constraints.js index 78e1d948..f1040a3e 100644 --- a/tutor/app/assets/javascripts/solutions_constraints.js +++ b/tutor/app/assets/javascripts/solutions_constraints.js @@ -179,11 +179,11 @@ function testingValidation(errorArray,method,name){ errorArray.push("Enter method name and return type .."); } }; - if(method == ""){ + if(method == "" && name != ""){ document.getElementById("_constrain_method_name").style.border= ""; document.getElementById("_constrain_method_return").style.border= "red 1px solid"; errorArray.push("Enter method return type .."); - }else if(name == ""){ + }else if(name == "" && method != ""){ document.getElementById("_constrain_method_name").style.border= "red 1px solid"; document.getElementById("_constrain_method_return").style.border= ""; errorArray.push("Enter method name .."); diff --git a/tutor/app/controllers/solutions_constraints_controller.rb b/tutor/app/controllers/solutions_constraints_controller.rb index 4dd0bdf9..f7835de9 100644 --- a/tutor/app/controllers/solutions_constraints_controller.rb +++ b/tutor/app/controllers/solutions_constraints_controller.rb @@ -24,20 +24,20 @@ def create parameters.parameter = value[:name] parameters.params_type = value[:type] parameters.save - constarint.method_parameter << parameters + constarint.parameters << parameters end end constarint.save end + if var_cons.present? var_cons.each do |index,value| variable = VariableConstraint.new - variable.variable_name = value[:name] - variable.variable_type = value[:type] + variable.variable_name = var_cons[index][:name] + variable.variable_type = var_cons[index][:type] variable.save end end - render json: true end diff --git a/tutor/app/views/solutions_constraints/_edit_variable.html.erb b/tutor/app/views/solutions_constraints/_edit_variable.html.erb index 47464e84..ca27359c 100644 --- a/tutor/app/views/solutions_constraints/_edit_variable.html.erb +++ b/tutor/app/views/solutions_constraints/_edit_variable.html.erb @@ -1,19 +1,14 @@ -<%= form_for :@constrain do |f| %> +<%= form_for :@variables do |f| %> - + - + -
Variable Constraints <%= u.text_field :variable_name, placeholder: "Variable Type" %><%= f.text_field :variable_type, placeholder: "Variable Type" %> <%= u.text_field :variable_name, placeholder: "Variable Name" %><%= f.text_field :variable_name, placeholder: "Variable Name" %> <%= image_tag "add_buttom.png", id:"params", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_params(this);"%>
-
-

Variables

- No Variables -

<%= f.submit "Save Changes", class: "btn btn-default"%> <% end %> \ No newline at end of file From e1f194c24c499e0b04032eb581d776b9cc31d0f5 Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Thu, 24 Apr 2014 15:59:18 +0200 Subject: [PATCH 25/55] Issue #188 fixing conventions --- .../javascripts/solutions_constraints.js | 44 ++++++++++--------- .../_edit_method.html.erb | 8 ++-- .../solutions_constraints/_form.html.erb | 21 +++++---- .../views/solutions_constraints/new.html.erb | 14 +++--- tutor/app/views/students/new.html.erb | 8 ---- 5 files changed, 48 insertions(+), 47 deletions(-) delete mode 100644 tutor/app/views/students/new.html.erb diff --git a/tutor/app/assets/javascripts/solutions_constraints.js b/tutor/app/assets/javascripts/solutions_constraints.js index f1040a3e..9d727740 100644 --- a/tutor/app/assets/javascripts/solutions_constraints.js +++ b/tutor/app/assets/javascripts/solutions_constraints.js @@ -36,11 +36,12 @@ function add_params(field) $('#parameter').append(""); } $('#parameter').append(""); - }else { - if (tmp_name == "" && tmp_type == ""){ + } + else { + if (tmp_name == "" && tmp_type == "") { document.getElementById("params_type").style.border= "red 1px solid"; document.getElementById("params_name").style.border= "red 1px solid"; - }else if(tmp_name == ""){ + }else if(tmp_name == "") { document.getElementById("params_type").style.border= ""; document.getElementById("params_name").style.border= "red 1px solid"; }else{ @@ -107,10 +108,10 @@ function add_variable(field) } $('#variable').append(""); }else { - if (tmp_name == "" && tmp_type == ""){ + if (tmp_name == "" && tmp_type == "") { document.getElementById("variable_type").style.border= "red 1px solid"; document.getElementById("variable_name").style.border= "red 1px solid"; - }else if(tmp_name == ""){ + }else if(tmp_name == "") { document.getElementById("variable_type").style.border= ""; document.getElementById("variable_name").style.border= "red 1px solid"; }else{ @@ -152,7 +153,7 @@ function remove_variable(field) // # errorArray: array of Error, for multi error massage show // # Returns: none // # Author: Ahmed Mohamed Magdi -function showErrorMessage(arrayOfErrors){ +function showErrorMessage(arrayOfErrors) { for (var i = 0; i < arrayOfErrors.length; i++) { $("#errors").append("
"+arrayOfErrors[i]+"
"); }; @@ -163,27 +164,27 @@ function showErrorMessage(arrayOfErrors){ // # errorArray: array of Error, for multi error massage show // # Returns: none // # Author: Ahmed Mohamed Magdi -function testingValidation(errorArray,method,name){ +function testingValidation(errorArray,method,name) { if (type.length == 0 && var_type.length == 0 && method == 0 && - name == 0 ) + name == 0) { errorArray.push("Can not submit an empty Data, Try filling either Method Constraint for Variable Constraint"); return false; }; - if ( type.length > 0) { - if ( method == "" && name == ""){ + if (type.length > 0) { + if (method == "" && name == "") { document.getElementById("_constrain_method_return").style.border= "red 1px solid"; document.getElementById("_constrain_method_name").style.border= "red 1px solid"; errorArray.push("Enter method name and return type .."); } }; - if(method == "" && name != ""){ + if(method == "" && name != "") { document.getElementById("_constrain_method_name").style.border= ""; document.getElementById("_constrain_method_return").style.border= "red 1px solid"; errorArray.push("Enter method return type .."); - }else if(name == "" && method != ""){ + }else if(name == "" && method != "") { document.getElementById("_constrain_method_name").style.border= "red 1px solid"; document.getElementById("_constrain_method_return").style.border= ""; errorArray.push("Enter method name .."); @@ -224,21 +225,24 @@ function submitParams() $.ajax({ type: "POST", url: "/solutions_constraints", - data:{ parameter_constraint: hash_p, - variable_constraint: hash_v, - method_return: method, - method_name: name - }, - success: function(data){ + data:{ + parameter_constraint: hash_p, + variable_constraint: hash_v, + method_return: method, + method_name: name + }, + success: function(data) + { if (data) { alert("Data have been Added successfully"); window.location = window.location - }else{ + } + else{ alert("Data messigin/incorrect !"); } }, datatype: "JSON", - error: function(){ + error: function() { alert("Failed to Add Constraints, Check again"); } }); diff --git a/tutor/app/views/solutions_constraints/_edit_method.html.erb b/tutor/app/views/solutions_constraints/_edit_method.html.erb index 6f78afd7..94aa0aac 100644 --- a/tutor/app/views/solutions_constraints/_edit_method.html.erb +++ b/tutor/app/views/solutions_constraints/_edit_method.html.erb @@ -3,7 +3,7 @@ Method Constrains - <%= f.text_field :method_return, placeholder: "Return Type"%> + <%= f.text_field :method_return, placeholder: "Return Type" %> <%= f.text_field :method_name, placeholder: "Method Name" %>
@@ -17,15 +17,15 @@ <%= u.text_field :parameter, placeholder: "Variable Name", id:"params_name" %> - <%= image_tag "add_buttom.png", id:"params", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_params(this);"%> + <%= image_tag "add_buttom.png", id:"params", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_params(this);" %> <% end %>

Paramter

- No paramters +

No paramters


- <%= f.submit "Save Changes", class: "btn btn-default", onclick:"submitParams();"%> + <%= f.submit "Save Changes", class: "btn btn-default", onclick:"submitParams();" %> <% end %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/_form.html.erb b/tutor/app/views/solutions_constraints/_form.html.erb index 337e853a..490883a0 100644 --- a/tutor/app/views/solutions_constraints/_form.html.erb +++ b/tutor/app/views/solutions_constraints/_form.html.erb @@ -22,13 +22,16 @@ -

Add Variable Constraints

-
+ +

Add Variable Constraints

+
+ <%= fields_for :@variables do |u| %> @@ -44,11 +47,11 @@

Paramters Constraints

- No paramters +

No paramters

Variables Constraints

- No variables +

No variables


<%= button_tag "Save Changes", type: "button", class: "btn btn-large btn-success", onclick:"submitParams();"%> diff --git a/tutor/app/views/solutions_constraints/new.html.erb b/tutor/app/views/solutions_constraints/new.html.erb index f15c0d6f..5b791746 100644 --- a/tutor/app/views/solutions_constraints/new.html.erb +++ b/tutor/app/views/solutions_constraints/new.html.erb @@ -2,10 +2,12 @@

Add Method Constraints

-
+
+ <%= render 'form' %> \ No newline at end of file diff --git a/tutor/app/views/students/new.html.erb b/tutor/app/views/students/new.html.erb deleted file mode 100644 index 25280b0a..00000000 --- a/tutor/app/views/students/new.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<%= @solved.each do |c| - - - c.problem_id - - - -end %> \ No newline at end of file From da89f3e8d9e86363b1970ec3833910bc04e9f25a Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Thu, 24 Apr 2014 17:47:24 +0200 Subject: [PATCH 26/55] fixing conventions --- .../javascripts/solutions_constraints.js | 62 +++++++++---------- .../solutions_constraints_controller.rb | 2 - .../_edit_method.html.erb | 10 +-- .../_edit_variable.html.erb | 8 +-- .../solutions_constraints/_form.html.erb | 20 +++--- .../views/solutions_constraints/new.html.erb | 12 ++-- 6 files changed, 55 insertions(+), 59 deletions(-) diff --git a/tutor/app/assets/javascripts/solutions_constraints.js b/tutor/app/assets/javascripts/solutions_constraints.js index 9d727740..63ab229b 100644 --- a/tutor/app/assets/javascripts/solutions_constraints.js +++ b/tutor/app/assets/javascripts/solutions_constraints.js @@ -11,8 +11,7 @@ var var_name = new Array(); // # Parameters:none // # Returns: none // # Author: Ahmed Mohamed Magdi -function add_params(field) -{ +function add_params(field) { var tmp_type = document.getElementById("params_type").value; var tmp_name = document.getElementById("params_name").value; @@ -23,9 +22,9 @@ function add_params(field) document.getElementById("params_type").value = ""; param_name[param_name.length] = tmp_name; document.getElementById("params_name").value = ""; - document.getElementById("parameter").innerHTML = "

Paramters Constraints

"; - for (var i = 0; i < type.length; i++) { + + for (var i = 0; i < type.length; i++) { $('#parameter').append(""); $('#parameter').append(""); $('#parameter').append(""); @@ -41,10 +40,12 @@ function add_params(field) if (tmp_name == "" && tmp_type == "") { document.getElementById("params_type").style.border= "red 1px solid"; document.getElementById("params_name").style.border= "red 1px solid"; - }else if(tmp_name == "") { + } + else if(tmp_name == "") { document.getElementById("params_type").style.border= ""; document.getElementById("params_name").style.border= "red 1px solid"; - }else{ + } + else{ document.getElementById("params_type").style.border= "red 1px solid"; document.getElementById("params_name").style.border= ""; } @@ -55,14 +56,12 @@ function add_params(field) // # Parameters:none // # Returns: none // # Author: Ahmed Mohamed Magdi -function remove_params(field) -{ +function remove_params(field) { var index = field.id.split("_")[1]; type.splice(index,1); param_name.splice(index,1); document.getElementById("parameter").innerHTML = "

Paramters Constraints

"; - if(type.length == 0) - { + if(type.length == 0) { $('#parameter').append("No paramter"); } for (var i = 0; i < type.length; i++) { @@ -82,8 +81,7 @@ function remove_params(field) // # Parameters:none // # Returns: none // # Author: Ahmed Mohamed Magdi -function add_variable(field) -{ +function add_variable(field) { var tmp_type = document.getElementById("variable_type").value; var tmp_name = document.getElementById("variable_name").value; @@ -94,9 +92,9 @@ function add_variable(field) document.getElementById("variable_type").value = ""; var_name[var_name.length] = tmp_name; document.getElementById("variable_name").value = ""; - document.getElementById("variable").innerHTML = "

Variables Constraints

"; - for (var i = 0; i < var_type.length; i++) { + + for (var i = 0; i < var_type.length; i++) { $('#variable').append(""); $('#variable').append(""); $('#variable').append(""); @@ -107,14 +105,17 @@ function add_variable(field) $('#variable').append(""); } $('#variable').append("
"); - }else { + } + else { if (tmp_name == "" && tmp_type == "") { document.getElementById("variable_type").style.border= "red 1px solid"; document.getElementById("variable_name").style.border= "red 1px solid"; - }else if(tmp_name == "") { + } + else if(tmp_name == "") { document.getElementById("variable_type").style.border= ""; document.getElementById("variable_name").style.border= "red 1px solid"; - }else{ + } + else { document.getElementById("variable_type").style.border= "red 1px solid"; document.getElementById("variable_name").style.border= ""; } @@ -125,14 +126,12 @@ function add_variable(field) // # Parameters:none // # Returns: none // # Author: Ahmed Mohamed Magdi -function remove_variable(field) -{ +function remove_variable(field){ var index = field.id.split("_")[1]; var_type.splice(index,1); var_name.splice(index,1); document.getElementById("variable").innerHTML = "

Variables Constraints

"; - if(var_type.length == 0) - { + if(var_type.length == 0) { $('#variable').append("No Variables"); } for (var i = 0; i < var_type.length; i++) { @@ -168,9 +167,9 @@ function testingValidation(errorArray,method,name) { if (type.length == 0 && var_type.length == 0 && method == 0 && - name == 0) - { - errorArray.push("Can not submit an empty Data, Try filling either Method Constraint for Variable Constraint"); + name == 0) { + errorArray.push("Can not submit an empty Data, + Try filling either Method Constraint for Variable Constraint"); return false; }; if (type.length > 0) { @@ -184,7 +183,8 @@ function testingValidation(errorArray,method,name) { document.getElementById("_constrain_method_name").style.border= ""; document.getElementById("_constrain_method_return").style.border= "red 1px solid"; errorArray.push("Enter method return type .."); - }else if(name == "" && method != "") { + } + else if(name == "" && method != "") { document.getElementById("_constrain_method_name").style.border= "red 1px solid"; document.getElementById("_constrain_method_return").style.border= ""; errorArray.push("Enter method name .."); @@ -196,20 +196,18 @@ function testingValidation(errorArray,method,name) { // # Parameters:none // # Returns: none // # Author: Ahmed Mohamed Magdi -function submitParams() -{ +function submitParams() { $("#errors").html(""); errorArray = new Array(); - + var hash_p = new Array(); + var hash_v = new Array(); method = $('#_constrain_method_return').val() name = $('#_constrain_method_name').val() + if (!testingValidation(errorArray,method,name)) { showErrorMessage(errorArray); return; }; - - var hash_p = [] - var hash_v = [] for (var i = 0; i < type.length; i++) { hash_p.push({ type: type[i] , @@ -237,7 +235,7 @@ function submitParams() alert("Data have been Added successfully"); window.location = window.location } - else{ + else { alert("Data messigin/incorrect !"); } }, diff --git a/tutor/app/controllers/solutions_constraints_controller.rb b/tutor/app/controllers/solutions_constraints_controller.rb index f7835de9..93afd2d2 100644 --- a/tutor/app/controllers/solutions_constraints_controller.rb +++ b/tutor/app/controllers/solutions_constraints_controller.rb @@ -13,7 +13,6 @@ def create var_cons = params[:variable_constraint] method = params[:method_name] method_returned = params[:method_return] - unless method == "" constarint = MethodConstraint.new constarint.method_name = method @@ -29,7 +28,6 @@ def create end constarint.save end - if var_cons.present? var_cons.each do |index,value| variable = VariableConstraint.new diff --git a/tutor/app/views/solutions_constraints/_edit_method.html.erb b/tutor/app/views/solutions_constraints/_edit_method.html.erb index 94aa0aac..bba0a708 100644 --- a/tutor/app/views/solutions_constraints/_edit_method.html.erb +++ b/tutor/app/views/solutions_constraints/_edit_method.html.erb @@ -2,9 +2,9 @@
- + - +
@@ -12,11 +12,11 @@ <%= fields_for :@params do |u| %> - + - + - + <% end %> diff --git a/tutor/app/views/solutions_constraints/_edit_variable.html.erb b/tutor/app/views/solutions_constraints/_edit_variable.html.erb index ca27359c..a9356ba1 100644 --- a/tutor/app/views/solutions_constraints/_edit_variable.html.erb +++ b/tutor/app/views/solutions_constraints/_edit_variable.html.erb @@ -2,13 +2,13 @@
Method Constrains <%= f.text_field :method_return, placeholder: "Return Type" %> <%= f.text_field :method_name, placeholder: "Method Name" %>
Method Parameter <%= u.text_field :params_type, placeholder: "Variable Type", id:"params_type" %> <%= u.text_field :parameter, placeholder: "Variable Name", id:"params_name" %> <%= image_tag "add_buttom.png", id:"params", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_params(this);" %>
- + - + - +
Variable Constraints <%= f.text_field :variable_type, placeholder: "Variable Type" %> <%= f.text_field :variable_name, placeholder: "Variable Name" %>

- <%= f.submit "Save Changes", class: "btn btn-default"%> + <%= f.submit "Save Changes", class: "btn btn-default "%> <% end %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/_form.html.erb b/tutor/app/views/solutions_constraints/_form.html.erb index 490883a0..5126076d 100644 --- a/tutor/app/views/solutions_constraints/_form.html.erb +++ b/tutor/app/views/solutions_constraints/_form.html.erb @@ -3,7 +3,7 @@ Method Constrains - <%= f.text_field :method_return, placeholder: "Return Type"%> + <%= f.text_field :method_return, placeholder: "Return Type" %> <%= f.text_field :method_name, placeholder: "Method Name" %>
@@ -17,7 +17,7 @@ <%= u.text_field :parameter, placeholder: "Variable Name", id:"params_name" %> - <%= image_tag "add_buttom.png", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_params(this);"%> + <%= image_tag "add_buttom.png", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_params(this);" %> <% end %> @@ -25,12 +25,12 @@

Add Variable Constraints


+ display: block; + height: 1px; + border: 0; + border-top: 1px solid #ccc; + margin: 1em 0; + padding: 0;"> @@ -41,7 +41,7 @@ <%= u.text_field :variable_name, placeholder: "Variable Name", id:"variable_name" %> - <%= image_tag "add_buttom.png", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_variable(this);"%> + <%= image_tag "add_buttom.png", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_variable(this);" %> <% end %> @@ -54,5 +54,5 @@

No variables


- <%= button_tag "Save Changes", type: "button", class: "btn btn-large btn-success", onclick:"submitParams();"%> + <%= button_tag "Save Changes", type: "button", class: "btn btn-large btn-success", onclick:"submitParams();" %> <% end %> \ No newline at end of file diff --git a/tutor/app/views/solutions_constraints/new.html.erb b/tutor/app/views/solutions_constraints/new.html.erb index 5b791746..5b1f6ed3 100644 --- a/tutor/app/views/solutions_constraints/new.html.erb +++ b/tutor/app/views/solutions_constraints/new.html.erb @@ -3,11 +3,11 @@

Add Method Constraints


+ display: block; + height: 1px; + border: 0; + border-top: 1px solid #ccc; + margin: 1em 0; + padding: 0;"> <%= render 'form' %> \ No newline at end of file From c27990a80d73a7e2ab1118dc91a8e0b4ebc536cb Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Thu, 24 Apr 2014 18:23:32 +0200 Subject: [PATCH 27/55] fixing long lines --- .../javascripts/solutions_constraints.js | 22 +++++++++++++------ .../_edit_method.html.erb | 3 ++- .../solutions_constraints/_form.html.erb | 6 +++-- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/tutor/app/assets/javascripts/solutions_constraints.js b/tutor/app/assets/javascripts/solutions_constraints.js index 63ab229b..c07848de 100644 --- a/tutor/app/assets/javascripts/solutions_constraints.js +++ b/tutor/app/assets/javascripts/solutions_constraints.js @@ -31,7 +31,9 @@ function add_params(field) { $('#parameter').append(""); $('#parameter').append(""); $('#parameter').append(""); - $('#parameter').append("\"delete"); + $('#parameter').append("\"delete"); $('#parameter').append(""); } $('#parameter').append(""); @@ -71,7 +73,9 @@ function remove_params(field) { $('#parameter').append(""); $('#parameter').append(""); $('#parameter').append(""); - $('#parameter').append("\"delete"); + $('#parameter').append("\"delete"); $('#parameter').append(""); } $('#parameter').append(""); @@ -101,7 +105,9 @@ function add_variable(field) { $('#variable').append(""); $('#variable').append(""); $('#variable').append(""); - $('#variable').append("\"delete"); + $('#variable').append("\"delete"); $('#variable').append(""); } $('#variable').append(""); @@ -126,7 +132,7 @@ function add_variable(field) { // # Parameters:none // # Returns: none // # Author: Ahmed Mohamed Magdi -function remove_variable(field){ +function remove_variable(field) { var index = field.id.split("_")[1]; var_type.splice(index,1); var_name.splice(index,1); @@ -141,7 +147,9 @@ function remove_variable(field){ $('#variable').append(""); $('#variable').append(""); $('#variable').append(""); - $('#variable').append("\"delete"); + $('#variable').append("\"delete"); $('#variable').append(""); } $('#variable').append(""); @@ -168,8 +176,8 @@ function testingValidation(errorArray,method,name) { var_type.length == 0 && method == 0 && name == 0) { - errorArray.push("Can not submit an empty Data, - Try filling either Method Constraint for Variable Constraint"); + errorArray.push("Can not submit an empty Data,\ + Try filling either Method Constraint for Variable Constraint"); return false; }; if (type.length > 0) { diff --git a/tutor/app/views/solutions_constraints/_edit_method.html.erb b/tutor/app/views/solutions_constraints/_edit_method.html.erb index bba0a708..08cca49a 100644 --- a/tutor/app/views/solutions_constraints/_edit_method.html.erb +++ b/tutor/app/views/solutions_constraints/_edit_method.html.erb @@ -17,7 +17,8 @@ <%= u.text_field :parameter, placeholder: "Variable Name", id:"params_name" %> - <%= image_tag "add_buttom.png", id:"params", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_params(this);" %> + <%= image_tag "add_buttom.png", id:"params", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", + onclick: "add_params(this);" %> <% end %> diff --git a/tutor/app/views/solutions_constraints/_form.html.erb b/tutor/app/views/solutions_constraints/_form.html.erb index 5126076d..475dc477 100644 --- a/tutor/app/views/solutions_constraints/_form.html.erb +++ b/tutor/app/views/solutions_constraints/_form.html.erb @@ -17,7 +17,8 @@ <%= u.text_field :parameter, placeholder: "Variable Name", id:"params_name" %> - <%= image_tag "add_buttom.png", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_params(this);" %> + <%= image_tag "add_buttom.png", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", + onclick: "add_params(this);" %> <% end %> @@ -41,7 +42,8 @@ <%= u.text_field :variable_name, placeholder: "Variable Name", id:"variable_name" %> - <%= image_tag "add_buttom.png", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", onclick: "add_variable(this);" %> + <%= image_tag "add_buttom.png", style: "width:15%;height:15%;margin_top:10px;cursor:pointer", + onclick: "add_variable(this);" %> <% end %> From 1e28332c53c7885ab663294297adcc04bc0b9e41 Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Thu, 24 Apr 2014 18:59:33 +0200 Subject: [PATCH 28/55] fixing indextations --- tutor/app/assets/javascripts/solutions_constraints.js | 3 +-- tutor/app/views/solutions_constraints/_form.html.erb | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tutor/app/assets/javascripts/solutions_constraints.js b/tutor/app/assets/javascripts/solutions_constraints.js index c07848de..5864732f 100644 --- a/tutor/app/assets/javascripts/solutions_constraints.js +++ b/tutor/app/assets/javascripts/solutions_constraints.js @@ -237,8 +237,7 @@ function submitParams() { method_return: method, method_name: name }, - success: function(data) - { + success: function(data) { if (data) { alert("Data have been Added successfully"); window.location = window.location diff --git a/tutor/app/views/solutions_constraints/_form.html.erb b/tutor/app/views/solutions_constraints/_form.html.erb index 475dc477..47407cc0 100644 --- a/tutor/app/views/solutions_constraints/_form.html.erb +++ b/tutor/app/views/solutions_constraints/_form.html.erb @@ -28,11 +28,11 @@
- + border: 0; + border-top: 1px solid #ccc; + margin: 1em 0; + padding: 0;"> + <%= fields_for :@variables do |u| %> From 7382c5cf4478af2f034a5ceb6613445f925bea42 Mon Sep 17 00:00:00 2001 From: Ahmed ELAssuty Date: Thu, 24 Apr 2014 19:02:12 +0200 Subject: [PATCH 29/55] fix layout sizing issues --- tutor/app/assets/stylesheets/application.css | 7 +++++++ tutor/app/views/layouts/_footer.html.erb | 2 +- tutor/app/views/layouts/_right_side_bar.html.erb | 3 +-- tutor/app/views/layouts/application.html.erb | 9 +++++---- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/tutor/app/assets/stylesheets/application.css b/tutor/app/assets/stylesheets/application.css index 5dd23c89..2288e797 100644 --- a/tutor/app/assets/stylesheets/application.css +++ b/tutor/app/assets/stylesheets/application.css @@ -28,6 +28,9 @@ margin-bottom:70px; width:78%; margin-left:1%; + min-width:500px; + overflow:scroll; + position:static; } .footer { @@ -46,4 +49,8 @@ .button-devise { margin-top: 10px; +} + +.home { + overflow:scroll; } \ No newline at end of file diff --git a/tutor/app/views/layouts/_footer.html.erb b/tutor/app/views/layouts/_footer.html.erb index b26c482f..94abcf86 100644 --- a/tutor/app/views/layouts/_footer.html.erb +++ b/tutor/app/views/layouts/_footer.html.erb @@ -3,7 +3,7 @@ # General layout for footer # Author: Ahmed Elassuty --> -
+
<%= link_to "About us"%> diff --git a/tutor/app/views/layouts/_right_side_bar.html.erb b/tutor/app/views/layouts/_right_side_bar.html.erb index 29814900..58035bf4 100644 --- a/tutor/app/views/layouts/_right_side_bar.html.erb +++ b/tutor/app/views/layouts/_right_side_bar.html.erb @@ -3,7 +3,7 @@ # General layout for right side bar # Author: Ahmed Elassuty --> - <%= button_to "Back", {:controller => 'courses', :action => 'index'}, class: "btn btn-success" , style: "margin-left: - 600px; margin-top: 250px", :method => :get%> \ No newline at end of file + 600px; margin-top: 250px", :method => :get%> +
+
+
\ No newline at end of file diff --git a/tutor/app/views/courses/index.html.erb b/tutor/app/views/courses/index.html.erb index 37388dff..4f2b3e4b 100644 --- a/tutor/app/views/courses/index.html.erb +++ b/tutor/app/views/courses/index.html.erb @@ -1,57 +1,61 @@ -<% if !@courses.any? %> -

You have no courses

-<% end %> -<% if current_lecturer %> - <%= button_to "Create course", { :action => 'new', :controller => 'courses' }, { - class: 'btn btn-primary'} %> -<% end %> - -
-<% if flash[:success_creation] %> -
<%= flash[:success_creation] %>
-<% end %> -<% if flash[:success_deletion] %> -
<%= flash[:success_deletion] %>
-<% end %> -
- -<% if @courses.any? %> -

Your Courses

- - - - - - - - - <% @courses.each do |c| %> - - - - - - - + +
+
NameCodeOptions
<%= link_to c.name, { :controller => 'courses', :action => 'show', :id => c.id }, - :method => :get, class: "btn btn-success" %><%= c.code %> - <% if current_lecturer %> - <%= link_to "Manage Course", { :controller => 'courses', :action => 'edit', - :method => :get, :id => c.id }, class: "btn btn-success", style: "text-decoration:none" %> - <% end %> - - <%= link_to "Discussion Board", { :controller => 'discussion_boards', :action => 'show', :id => c.id }, - class: "btn btn-success", method: :get, style: "text-decoration:none" %> - - <% if current_student %> - <% if @share[c.id] == "Show" %> - <%= button_to "Show Performance", {:controller => 'courses', :action => 'share', - :id => c.id, :value => true}, class: "btn btn-success", style: "text-decoration:none" %> - <% else %> - <%= button_to "Hide Performance", {:controller => 'courses', :action => 'share', - :id => c.id, :value => false}, class: "btn btn-success", style: "text-decoration:none" %> - <% end %> - <% end %> -
-<% end %> + +
+
+ <% if !@courses.any? %> +

You have no courses

+ <% end %> +
+ <%= flash[:success_deletion] %> + <%= flash[:success_creation] %> + <% if @courses.any? %> +

Your Courses

+ + + + + + + + + <% @courses.each do |c| %> + + + + + + + + <% end %> +
NameCodeOptions
<%= link_to c.name, { :controller => 'courses', :action => 'show', :id => c.id }, + :method => :get, class: "btn btn-success" %><%= c.code %> + <% if current_lecturer %> + <%= link_to "Manage Course", { :controller => 'courses', :action => 'edit', + :method => :get, :id => c.id }, class: "btn btn-success", style: "text-decoration:none" %> + <% end %> + + <%= link_to "Discussion Board", { :controller => 'discussion_boards', :action => 'show', :id => c.id }, + class: "btn btn-success", method: :get, style: "text-decoration:none" %> + + <% if current_student %> + <% if @share[c.id] == "Show" %> + <%= button_to "Show Performance", {:controller => 'courses', :action => 'share', + :id => c.id, :value => true}, class: "btn btn-success", style: "text-decoration:none" %> + <% else %> + <%= button_to "Hide Performance", {:controller => 'courses', :action => 'share', + :id => c.id, :value => false}, class: "btn btn-success", style: "text-decoration:none" %> + <% end %> + <% end %> +
+ <% end %> +
+
+
diff --git a/tutor/app/views/courses/new.html.erb b/tutor/app/views/courses/new.html.erb index 15f67d88..fbacdd7f 100644 --- a/tutor/app/views/courses/new.html.erb +++ b/tutor/app/views/courses/new.html.erb @@ -1,58 +1,68 @@ -

Create New Course

+ +
+ +
+
+

Create New Course

+ <%= form_for :course, url: courses_path do |f| %> +

+ <%= f.label :Name %>
+ <% unless @new_course.errors[:name].blank? %> + + Name <%= @new_course.errors[:name].join(", ") %> + +
+ <% end %> + <%= f.text_field :name, :value => @new_course.name, class:"form-control", style: "width:300px" %> +

+

+ <%= f.label :Code %>
+ <% unless @new_course.errors[:code].blank? %> + + Code <%= @new_course.errors[:code].join(", ") %> + +
+ <% end %> + <%= f.text_field :code, :value => @new_course.code, class:"form-control", style: "width:300px" %> +

+

+ <%= f.label :Description %>
+ <% unless @new_course.errors[:description].blank? %> + + Description <%= @new_course.errors[:description].join(", ") %> + +
+ <% end %> + <%= f.text_area :description, class:"form-control", style:"width:300px",placeholder:"Description", :value => @new_course.description %> +

+

+ <%= f.label :Semester %>
+ <% unless @new_course.errors[:semester].blank? %> + + Semester <%= @new_course.errors[:semester].join(", ") %> + +
+ <% end %> + <%= f.text_field :semester, :value => @new_course.semester, class:"form-control", style: "width:50px" %> +

+

+ <%= f.label :Year %>
+ <% unless @new_course.errors[:year].blank? %> + + Year <%= @new_course.errors[:year].join(", ") %> + +
+ <% end %> + <%= f.text_field :year, :value => @new_course.year, class:"form-control", style: "width:100px" %> +

+

+ <%= f.submit "Save", class: "btn btn-success" %> +

<% end %> - <%= f.text_field :year, :value => @new_course.year, class:"form-control", style: "width:100px" %> -

-

- <%= f.submit "Save", class: "btn btn-success" %> -

-<% end %> \ No newline at end of file +
+
+
diff --git a/tutor/app/views/courses/show.html.erb b/tutor/app/views/courses/show.html.erb index d1574083..a0032e2f 100644 --- a/tutor/app/views/courses/show.html.erb +++ b/tutor/app/views/courses/show.html.erb @@ -1,50 +1,64 @@ -

<%= @course.name %>

-
-
-

- Code: - <%= @course.code %> -

-

- Year: - <%= @course.year %> -

-

- Semester: - <%= @course.semester %> -

-

- Description: - <%= @course.description %> -

-
- -
- <%= link_to "View Discussion Board", { :controller => 'discussion_boards', :action => 'show', :id => @course.id }, class: "btn btn-success", method: :get, style: "text-decoration:none" %> -
+
+ +
+
+

<%= @course.name %>

+
+
+

+ Code: + <%= @course.code %> +

+

+ Year: + <%= @course.year %> +

+

+ Semester: + <%= @course.semester %> +

+

+ Description: + <%= @course.description %> +

+
-
- <% @topics.each do |t| %> -
-
- - <%= link_to t.title, t, style: 'color:#003366;'%> - <%= t.tracks.count %> +
+ <%= link_to "View Discussion Board", { :controller => 'discussion_boards', :action => 'show', :id => @course.id }, class: "btn btn-success", method: :get, style: "text-decoration:none" %>
-
-
    - <% t.tracks.each do |tt|%> - <% color = "label label-default" %> -
  • - <%= link_to tt.title, tt, class: color %> -
  • - <% end %> -
+ +
+ <% @topics.each do |t| %> +
+
+ + <%= link_to t.title, t, style: 'color:#003366;'%> + <%= t.tracks.count %> +
+
+
    + <% t.tracks.each do |tt|%> + <% color = "label label-default" %> +
  • + <%= link_to tt.title, tt, class: color %> +
  • + <% end %> +
+
+
+ <% end %>
-
- <% end %> +
+
diff --git a/tutor/app/views/courses/sign_up.html.erb b/tutor/app/views/courses/sign_up.html.erb index 7ef61281..494e1fb6 100644 --- a/tutor/app/views/courses/sign_up.html.erb +++ b/tutor/app/views/courses/sign_up.html.erb @@ -1,69 +1,81 @@ - -

Course Sign-Up

- - - <% case @status%> - <% when "0" %> -

Sorry, only students can sign up for courses!

- <% when "1" %> -

<%=@status%> / 6

-

Please choose a University

- <% @courses.each do |course| %> - - - - <% end %> - <% when "2" %> -

<%=@status%> / 6

-

Please choose a Semester

- <% @courses.each do |course| %> - - - - <% end %> - <% when "3" %> -

<%=@status%> / 6

-

Please choose a Course

- <% @courses.each do |course| %> - - - - <% end %> - <% when "4" %> -

<%=@status%> / 6

-

Pleas choose an Instructor

- <% @course.lecturers.each do |lecturer| %> - - - - <% end %> - <% when "5" %> -

<%=@status%> / 6

-

Semester: <%=@course.semester%> - Course: <%=@course.name%> - Instructor: <%=@lecturer.name%>

- - - - <% when "6" %> -

<%=@status%> / 6

-

You have signed up to:

-

Semester: <%=@course.semester%> - Course: <%=@course.name%> - Instructor: <%=@lecturer.name%>

- <% when "7" %> -

You are already signed up to this course!

- <% end %> - -
- <%= link_to(course.university, {:action => "sign_up", :university => course.university, - :status => "2"}) %> -
- <%= link_to(course.semester, {:action => "sign_up", :university => params[:university], - :semester => course.semester, :status => "3"}) %> -
- <%= link_to(course.name, {:action => "sign_up", :university => params[:university], - :semester =>course.semester, :id => course.id, :status => "4"} )%> -
- <%= link_to(lecturer.name, {:action => "sign_up", :university => params[:university], - :semester =>@course.semester, :id => @course.id, :lecturer => lecturer.id, :status => "5"} )%> -
- <%= link_to("Sign-Up!", {:action => "sign_up", :university => params[:university], - :semester => @course.semester, :id => @course.id, :lecturer => params[:lecturer], :status => "6"} )%> -
\ No newline at end of file + +
+ +
+
+ +

Course Sign-Up

+ + + <% case @status%> + <% when "0" %> +

Sorry, only students can sign up for courses!

+ <% when "1" %> +

<%=@status%> / 6

+

Please choose a University

+ <% @courses.each do |course| %> + + + + <% end %> + <% when "2" %> +

<%=@status%> / 6

+

Please choose a Semester

+ <% @courses.each do |course| %> + + + + <% end %> + <% when "3" %> +

<%=@status%> / 6

+

Please choose a Course

+ <% @courses.each do |course| %> + + + + <% end %> + <% when "4" %> +

<%=@status%> / 6

+

Pleas choose an Instructor

+ <% @course.lecturers.each do |lecturer| %> + + + + <% end %> + <% when "5" %> +

<%=@status%> / 6

+

Semester: <%=@course.semester%> - Course: <%=@course.name%> - Instructor: <%=@lecturer.name%>

+ + + + <% when "6" %> +

<%=@status%> / 6

+

You have signed up to:

+

Semester: <%=@course.semester%> - Course: <%=@course.name%> - Instructor: <%=@lecturer.name%>

+ <% when "7" %> +

You are already signed up to this course!

+ <% end %> + +
+ <%= link_to(course.university, {:action => "sign_up", :university => course.university, + :status => "2"}) %> +
+ <%= link_to(course.semester, {:action => "sign_up", :university => params[:university], + :semester => course.semester, :status => "3"}) %> +
+ <%= link_to(course.name, {:action => "sign_up", :university => params[:university], + :semester =>course.semester, :id => course.id, :status => "4"} )%> +
+ <%= link_to(lecturer.name, {:action => "sign_up", :university => params[:university], + :semester =>@course.semester, :id => @course.id, :lecturer => lecturer.id, :status => "5"} )%> +
+ <%= link_to("Sign-Up!", {:action => "sign_up", :university => params[:university], + :semester => @course.semester, :id => @course.id, :lecturer => params[:lecturer], :status => "6"} )%> +
+
+
+
\ No newline at end of file From 60f03111d5e2d26ed667bdd5c3c37d3e845a06bf Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Thu, 24 Apr 2014 21:17:24 +0200 Subject: [PATCH 36/55] fixing indentations --- .../javascripts/solutions_constraints.js | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/tutor/app/assets/javascripts/solutions_constraints.js b/tutor/app/assets/javascripts/solutions_constraints.js index 1483ac96..6217872e 100644 --- a/tutor/app/assets/javascripts/solutions_constraints.js +++ b/tutor/app/assets/javascripts/solutions_constraints.js @@ -1,17 +1,17 @@ -// # Place all the behaviors and hooks related to the matching controller here. -// # All this logic will automatically be available in application.js. -// # You can use CoffeeScript in this file: http://coffeescript.org/ +//# Place all the behaviors and hooks related to the matching controller here. +//# All this logic will automatically be available in application.js. +//# You can use CoffeeScript in this file: http://coffeescript.org/ var type = new Array(); var param_name = new Array(); var var_type = new Array(); var var_name = new Array(); -// # [Add Solutions' constraints - Story 4.14] -// # Description: Adds the parameters from the text_fields to array -// # Parameters: none -// # Returns: none -// # Author: Ahmed Mohamed Magdi +//# [Add Solutions' constraints - Story 4.14] +//# Description: Adds the parameters from the text_fields to array +//# Parameters: none +//# Returns: none +//# Author: Ahmed Mohamed Magdi function add_params(field) { var tmp_type = document.getElementById("params_type").value; var tmp_name = document.getElementById("params_name").value; @@ -55,11 +55,11 @@ function add_params(field) { } } -// # [Add Solutions' constraints - Story 4.14] -// # Description: removes selected variable from method Contraints -// # Parameters: none -// # Returns: none -// # Author: Ahmed Mohamed Magdi +//# [Add Solutions' constraints - Story 4.14] +//# Description: removes selected variable from method Contraints +//# Parameters: none +//# Returns: none +//# Author: Ahmed Mohamed Magdi function remove_params(field) { var index = field.id.split("_")[1]; type.splice(index,1); @@ -83,11 +83,11 @@ function remove_params(field) { $('#parameter').append(""); } -// # [Add Solutions' constraints - Story 4.14] -// # Description: Adds the parameters from the text_fields to array -// # Parameters: none -// # Returns: none -// # Author: Ahmed Mohamed Magdi +//# [Add Solutions' constraints - Story 4.14] +//# Description: Adds the parameters from the text_fields to array +//# Parameters: none +//# Returns: none +//# Author: Ahmed Mohamed Magdi function add_variable(field) { var tmp_type = document.getElementById("variable_type").value; var tmp_name = document.getElementById("variable_name").value; @@ -131,11 +131,11 @@ function add_variable(field) { } } -// # [Add Solutions' constraints - Story 4.14] -// # Description: removes selected variable from Variable Contraints -// # Parameters: none -// # Returns: none -// # Author: Ahmed Mohamed Magdi +//# [Add Solutions' constraints - Story 4.14] +//# Description: removes selected variable from Variable Contraints +//# Parameters: none +//# Returns: none +//# Author: Ahmed Mohamed Magdi function remove_variable(field) { var index = field.id.split("_")[1]; var_type.splice(index,1); @@ -159,24 +159,24 @@ function remove_variable(field) { $('#variable').append(""); } -// # [Add Solutions' constraints - Story 4.14] -// # Description: for showing the error massages for the user -// # Parameters: -// # errorArray: array of Error, for multi error massage show -// # Returns: none -// # Author: Ahmed Mohamed Magdi +//# [Add Solutions' constraints - Story 4.14] +//# Description: for showing the error massages for the user +//# Parameters: +//# errorArray: array of Errors, for multi error massage show +//# Returns: none +//# Author: Ahmed Mohamed Magdi function showErrorMessage(arrayOfErrors) { for (var i = 0; i < arrayOfErrors.length; i++) { $("#errors").append("
"+arrayOfErrors[i]+"
"); }; } -// # [Add Solutions' constraints - Story 4.14] -// # Description: Validates Data before sending it to the Server side -// # Parameters: -// # errorArray: array of Error, for multi error massage show -// # Returns: none -// # Author: Ahmed Mohamed Magdi +//# [Add Solutions' constraints - Story 4.14] +//# Description: Validates Data before sending it to the Server side +//# Parameters: +//# errorArray: array of Errors, for multi error massage show +//# Returns: none +//# Author: Ahmed Mohamed Magdi function testingValidation(errorArray,method,name) { if (type.length == 0 && var_type.length == 0 && @@ -206,11 +206,11 @@ function testingValidation(errorArray,method,name) { return errorArray.length == 0; } -// # [Add Solutions' constraints - Story 4.14] -// # Description: submits via ajax to the controller -// # Parameters: none -// # Returns: none -// # Author: Ahmed Mohamed Magdi +//# [Add Solutions' constraints - Story 4.14] +//# Description: submits via ajax to the controller +//# Parameters: none +//# Returns: none +//# Author: Ahmed Mohamed Magdi function submitParams() { $("#errors").html(""); errorArray = new Array(); From 5cf94fab3807a79b8833854391a26d71f448830f Mon Sep 17 00:00:00 2001 From: Ahmed Atef Date: Thu, 24 Apr 2014 21:29:05 +0200 Subject: [PATCH 37/55] Fixing conflicts in problem controller --- tutor/app/controllers/problems_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tutor/app/controllers/problems_controller.rb b/tutor/app/controllers/problems_controller.rb index 7389b747..d5ba96aa 100644 --- a/tutor/app/controllers/problems_controller.rb +++ b/tutor/app/controllers/problems_controller.rb @@ -84,7 +84,6 @@ def new end end -<<<<<<< HEAD # [Remove Problem - Story 4.18] # This action takes the problem id, remove it from the database # and then redirects the user to the show page of the track that had the problem @@ -103,7 +102,6 @@ def destroy end end -======= # [Edit Problem - 4.5] # Update the problem's title or description # Parameters: @@ -178,5 +176,5 @@ def done def problem_params params.require(:Problem).permit(:title, :description, :track_id) end ->>>>>>> master + end \ No newline at end of file From c0ab70b345b2ee0b891d509955f6bf4c697721c1 Mon Sep 17 00:00:00 2001 From: Mohab Date: Thu, 24 Apr 2014 21:29:21 +0200 Subject: [PATCH 38/55] fixing TA problem --- tutor/app/views/courses/index.html.erb | 2 +- tutor/app/views/courses/new.html.erb | 2 +- tutor/app/views/courses/show.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tutor/app/views/courses/index.html.erb b/tutor/app/views/courses/index.html.erb index 4f2b3e4b..0ce82820 100644 --- a/tutor/app/views/courses/index.html.erb +++ b/tutor/app/views/courses/index.html.erb @@ -4,7 +4,7 @@
  • My Courses
  • <% if lecturer_signed_in? %>
  • Create new Course
  • - <% else %> + <% elsif student_signed_in? %>
  • Sign up for a course
  • <% end %> diff --git a/tutor/app/views/courses/new.html.erb b/tutor/app/views/courses/new.html.erb index fbacdd7f..70618fcf 100644 --- a/tutor/app/views/courses/new.html.erb +++ b/tutor/app/views/courses/new.html.erb @@ -65,4 +65,4 @@ <% end %>
    -
    +
    \ No newline at end of file diff --git a/tutor/app/views/courses/show.html.erb b/tutor/app/views/courses/show.html.erb index a0032e2f..18f5a9e4 100644 --- a/tutor/app/views/courses/show.html.erb +++ b/tutor/app/views/courses/show.html.erb @@ -3,7 +3,7 @@
  • My Courses
  • <% if lecturer_signed_in? %>
  • Create new Course
  • - <% else %> + <% elsif student_signed_in? %>
  • Sign up for a course
  • <% end %> From 4849766300cf51bb2264cdcd624387bebaf88556 Mon Sep 17 00:00:00 2001 From: Ahmed Atef Date: Thu, 24 Apr 2014 21:36:05 +0200 Subject: [PATCH 39/55] Fixed typo --- tutor/app/views/problems/edit.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutor/app/views/problems/edit.html.erb b/tutor/app/views/problems/edit.html.erb index ee3ce125..6bf63c14 100644 --- a/tutor/app/views/problems/edit.html.erb +++ b/tutor/app/views/problems/edit.html.erb @@ -25,7 +25,7 @@ <%= render partial: "test_cases/index" %> -<%= render partial: "model_answers/new" %> +<%= render partial: "model_answers/index" %> <%= render partial: "problems/success_options" %> <% if flash[:notice] %> From 0f33971c9eb5691248bfab550ebcf7abf0514a54 Mon Sep 17 00:00:00 2001 From: ahmed93 Date: Thu, 24 Apr 2014 21:49:01 +0200 Subject: [PATCH 40/55] hadling error --- tutor/app/assets/javascripts/solutions_constraints.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tutor/app/assets/javascripts/solutions_constraints.js b/tutor/app/assets/javascripts/solutions_constraints.js index 6217872e..4b764148 100644 --- a/tutor/app/assets/javascripts/solutions_constraints.js +++ b/tutor/app/assets/javascripts/solutions_constraints.js @@ -161,8 +161,8 @@ function remove_variable(field) { //# [Add Solutions' constraints - Story 4.14] //# Description: for showing the error massages for the user -//# Parameters: -//# errorArray: array of Errors, for multi error massage show +//# Parameters: +//# errorArray: array of Errors,for multi error massage show //# Returns: none //# Author: Ahmed Mohamed Magdi function showErrorMessage(arrayOfErrors) { @@ -173,8 +173,8 @@ function showErrorMessage(arrayOfErrors) { //# [Add Solutions' constraints - Story 4.14] //# Description: Validates Data before sending it to the Server side -//# Parameters: -//# errorArray: array of Errors, for multi error massage show +//# Parameters: +//# method_cons: Hash containting the Method parameters //# Returns: none //# Author: Ahmed Mohamed Magdi function testingValidation(errorArray,method,name) { From bed857bbe4d6d662aa60ac326fb0632b5ebc7775 Mon Sep 17 00:00:00 2001 From: MohabGhanim Date: Thu, 24 Apr 2014 22:06:38 +0200 Subject: [PATCH 41/55] adding space before tag --- tutor/app/views/courses/edit.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutor/app/views/courses/edit.html.erb b/tutor/app/views/courses/edit.html.erb index 4ea8a085..32b758d5 100644 --- a/tutor/app/views/courses/edit.html.erb +++ b/tutor/app/views/courses/edit.html.erb @@ -85,7 +85,7 @@ <%= button_to "Back", {:controller => 'courses', :action => 'index'}, class: "btn btn-success" , style: "margin-left: - 600px; margin-top: 250px", :method => :get%> + 600px; margin-top: 250px", :method => :get %>
    - \ No newline at end of file + From db020a58149bcb381431601630c581ca89b5299b Mon Sep 17 00:00:00 2001 From: MohabGhanim Date: Thu, 24 Apr 2014 22:09:19 +0200 Subject: [PATCH 42/55] adding space before tag --- tutor/app/views/courses/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutor/app/views/courses/show.html.erb b/tutor/app/views/courses/show.html.erb index 18f5a9e4..62dad37a 100644 --- a/tutor/app/views/courses/show.html.erb +++ b/tutor/app/views/courses/show.html.erb @@ -49,7 +49,7 @@ <% t.tracks.each do |tt|%> <% color = "label label-default" %>
  • + data-placement="top" title="<%= tt.difficulty %>"> <%= link_to tt.title, tt, class: color %>
  • <% end %> From 2d81d2e5a8de915991291bab1dc5c92cc12b1de0 Mon Sep 17 00:00:00 2001 From: MohabGhanim Date: Thu, 24 Apr 2014 22:09:53 +0200 Subject: [PATCH 43/55] removing empty line --- tutor/app/views/courses/sign_up.html.erb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tutor/app/views/courses/sign_up.html.erb b/tutor/app/views/courses/sign_up.html.erb index 494e1fb6..47b7d4f0 100644 --- a/tutor/app/views/courses/sign_up.html.erb +++ b/tutor/app/views/courses/sign_up.html.erb @@ -3,7 +3,6 @@
    @@ -78,4 +77,4 @@
    - \ No newline at end of file + From 2508f8ec09ae08d1b3c9d35367e9e09eaf176832 Mon Sep 17 00:00:00 2001 From: MohabGhanim Date: Thu, 24 Apr 2014 22:11:05 +0200 Subject: [PATCH 44/55] removing empty line --- tutor/app/views/courses/edit.html.erb | 1 - 1 file changed, 1 deletion(-) diff --git a/tutor/app/views/courses/edit.html.erb b/tutor/app/views/courses/edit.html.erb index 32b758d5..9eb04e8d 100644 --- a/tutor/app/views/courses/edit.html.erb +++ b/tutor/app/views/courses/edit.html.erb @@ -2,7 +2,6 @@