diff --git a/app/controllers/exercise_controller.rb b/app/controllers/exercise_controller.rb
index dffa3d403..cfa534ffe 100644
--- a/app/controllers/exercise_controller.rb
+++ b/app/controllers/exercise_controller.rb
@@ -5,6 +5,7 @@ class ExerciseController < ApplicationController
before_filter :find_course, :only => [:index,:new,:create,:student_exercise_list]
include ExerciseHelper
+ include ExerciseHelper
def index
remove_invalid_exercise(@course)
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
diff --git a/app/helpers/exercise_helper.rb b/app/helpers/exercise_helper.rb
index 6b8d8644e..513f27c16 100644
--- a/app/helpers/exercise_helper.rb
+++ b/app/helpers/exercise_helper.rb
@@ -8,7 +8,7 @@ module ExerciseHelper
#判断用户是否已经提交了问卷
def has_commit_exercise?(exercise_id, user_id)
- pu = PollUser.find_by_poll_id_and_user_id(exercise_id, user_id)
+ pu = ExerciseUser.find_by_excercise_id_and_user_id(exercise_id, user_id)
if pu.nil?
false
else
@@ -16,4 +16,13 @@ module ExerciseHelper
end
end
+ def convert_to_char(str)
+ result = ""
+ if str.count >= 1
+ for i in 0 .. str.count do i
+ result += (str[i].to_i + 64).chr
+ end
+ end
+ end
+
end
\ No newline at end of file
diff --git a/app/views/exercise/_edit_MC.html.erb b/app/views/exercise/_edit_MC.html.erb
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/views/exercise/_edit_MCQ.html.erb b/app/views/exercise/_edit_MCQ.html.erb
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/views/exercise/_edit_head.html.erb b/app/views/exercise/_edit_head.html.erb
index 21326e2c8..9868a4465 100644
--- a/app/views/exercise/_edit_head.html.erb
+++ b/app/views/exercise/_edit_head.html.erb
@@ -7,14 +7,14 @@
<%# end %>
\ No newline at end of file
diff --git a/app/views/exercise/_new_single.html.erb b/app/views/exercise/_new_single.html.erb
index 8ef1e1e04..f48c7673d 100644
--- a/app/views/exercise/_new_single.html.erb
+++ b/app/views/exercise/_new_single.html.erb
@@ -1,11 +1,16 @@
-
-
+
+
+
+
+ 分
+
+
@@ -23,6 +28,9 @@
-
+
\ No newline at end of file
diff --git a/app/views/exercise/_show_MC.html.erb b/app/views/exercise/_show_MC.html.erb
new file mode 100644
index 000000000..bfaea32aa
--- /dev/null
+++ b/app/views/exercise/_show_MC.html.erb
@@ -0,0 +1,36 @@
+
\ No newline at end of file
diff --git a/app/views/exercise/_show_MCQ.html.erb b/app/views/exercise/_show_MCQ.html.erb
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/views/exercise/_show_head.html.erb b/app/views/exercise/_show_head.html.erb
index f7d2b9295..ec9f06035 100644
--- a/app/views/exercise/_show_head.html.erb
+++ b/app/views/exercise/_show_head.html.erb
@@ -1,6 +1,12 @@
-