diff --git a/app/views/exercise/_exercise.html.erb b/app/views/exercise/_exercise.html.erb index f5896c5e3..40654d327 100644 --- a/app/views/exercise/_exercise.html.erb +++ b/app/views/exercise/_exercise.html.erb @@ -1,61 +1,63 @@ -<%# has_commit = has_commit_poll?(poll.id ,User.current)%> -<% exercise_name = exercise.exercise_name.empty? ? l(:label_poll_new) : exercise.exercise_name%> -<% if @is_teacher%> -
  • -
    - <%# if has_commit %> - <%#= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue"%> - <%# else %> - <%#= link_to poll_name, exercise_path(poll.id), :class => "polls_title polls_title_w fl c_dblue" %> - <%# end %> - <%= link_to exercise_name, exercise_path(exercise.id), :class => "polls_title polls_title_w fl c_dblue" %> -
    -
  • - - <% if exercise.exercise_status == 1%> -
  • 统计结果
  • - <% else %> -
  • <%= link_to l(:label_statistical_results), student_exercise_list_exercise_path(exercise.id,:course_id => @course.id), :class => "pollsbtn fl ml10"%>
  • - <% end%> - - <% if exercise.exercise_status == 1 %> -
  • 发布试卷
  • - <% elsif exercise.exercise_status == 2%> -
  • 取消发布
  • - <% else%> -
  • 发布试卷
  • - <% end%> - - <%= link_to(l(:button_delete), exercise,:method => :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml5 mr10") %> - - <% if exercise.exercise_status == 1 %> -
  • <%= link_to l(:button_edit), edit_exercise_path(exercise.id), :class => "polls_de fr ml5"%>
  • - <% else%> -
  • 编辑
  • - <% end%> - - <%# if exercise.exercise_status == 2 %> - - <%# else %> - - <%# end%> - - <%# if exercise.exercise_status == 1%> - - <%# elsif exercise.exercise_status == 2 || exercise.exercise_status == 3 %> - - <%# end%> - - -
  • <%= format_date exercise.created_at.to_date%>
  • -<% else%> - <% if exercise.exercise_status == 2%> - <%# if has_commit%> - - <%#else%> - <%= link_to exercise_name, exercise_path(exercise.id), :class => "polls_title polls_title_st fl c_dblue"%> - <%#end%> - <% end%> -
  • <%= format_date exercise.created_at.to_date%>
  • +<%# has_commit = has_commit_poll?(poll.id ,User.current)%> +<% exercise_name = exercise.exercise_name.empty? ? l(:label_poll_new) : exercise.exercise_name%> +<% if @is_teacher%> +
  • +
    + <%# if has_commit %> + <%#= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue"%> + <%# else %> + <%#= link_to poll_name, exercise_path(poll.id), :class => "polls_title polls_title_w fl c_dblue" %> + <%# end %> + <%= link_to exercise_name, exercise_path(exercise.id), :class => "polls_title polls_title_w fl c_dblue" %> +
    +
  • + + <%= link_to(l(:button_delete), exercise,:method => :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml5 mr10") %> + + <% if exercise.exercise_status == 1 %> +
  • <%= link_to l(:button_edit), edit_exercise_path(exercise.id), :class => "polls_de fr ml5"%>
  • + <% else%> +
  • 编辑
  • + <% end%> + + <%# if exercise.exercise_status == 2 %> + + <%# else %> + + <%# end%> + + <%# if exercise.exercise_status == 1%> + + <%# elsif exercise.exercise_status == 2 || exercise.exercise_status == 3 %> + + <%# end%> + + +
  • <%= format_date exercise.created_at.to_date%>
  • + + + <% if exercise.exercise_status == 1 %> +
  • 发布试卷
  • + <% elsif exercise.exercise_status == 2%> +
  • 取消发布
  • + <% else%> +
  • 发布试卷
  • + <% end%> + + <% if exercise.exercise_status == 1%> +
  • 统计结果
  • + <% else %> +
  • <%= link_to l(:label_statistical_results), student_exercise_list_exercise_path(exercise.id,:course_id => @course.id), :class => "pollsbtn fr mr10"%>
  • + <% end%> + +<% else%> + <% if exercise.exercise_status == 2%> + <%# if has_commit%> + + <%#else%> + <%= link_to exercise_name, exercise_path(exercise.id), :class => "polls_title polls_title_st fl c_dblue"%> + <%#end%> + <% end%> +
  • <%= format_date exercise.created_at.to_date%>
  • <% end%> \ No newline at end of file diff --git a/app/views/exercise/_exercises_list.html.erb b/app/views/exercise/_exercises_list.html.erb index d1774f637..f277ebdf5 100644 --- a/app/views/exercise/_exercises_list.html.erb +++ b/app/views/exercise/_exercises_list.html.erb @@ -1,25 +1,25 @@ -
    -

    所有试卷 - (<%= @obj_count%>) -

    - <% if @is_teacher%> - <%#= link_to "导入", other_poll_poll_index_path(:polls_group_id => @course.id), :remote=>true,:class => "newbtn"%> - <%= link_to "新建试卷 ", new_exercise_path(:course_id => @course.id), :class => "newbtn" %> - <% end%> -
    -
    -
    - - <% @exercises.each do |exercise|%> - -
    - <% end%> - - - -
    +
    +

    所有试卷 + (<%= @obj_count%>) +

    + <% if @is_teacher%> + <%#= link_to "导入", other_poll_poll_index_path(:polls_group_id => @course.id), :remote=>true,:class => "newbtn"%> + <%= link_to "新建试卷 ", new_exercise_path(:course_id => @course.id), :class => "newbtn" %> + <% end%> +
    +
    +
    + + <% @exercises.each do |exercise|%> + +
    + <% end%> + + + +
    \ No newline at end of file diff --git a/app/views/exercise/index.html.erb b/app/views/exercise/index.html.erb index 3cff84e1c..aacc79950 100644 --- a/app/views/exercise/index.html.erb +++ b/app/views/exercise/index.html.erb @@ -1,63 +1,68 @@ -<%= stylesheet_link_tag 'polls', :media => 'all' %> - -
    - <%= render :partial => 'exercises_list'%> +<%= stylesheet_link_tag 'polls', :media => 'all' %> + +
    + <%= render :partial => 'exercises_list'%>
    \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index 912911185..ced4e23f5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,11 @@ # # It's strongly recommended to check this file into your version control system. +<<<<<<< HEAD +ActiveRecord::Schema.define(:version => 20151124032319) do +======= ActiveRecord::Schema.define(:version => 20151120115137) do +>>>>>>> 1ae514ca4857d7e2ad53b338731c1e01f899fb4d create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -1137,6 +1141,10 @@ ActiveRecord::Schema.define(:version => 20151120115137) do create_table "org_members", :force => true do |t| t.integer "user_id" t.integer "organization_id" +<<<<<<< HEAD + t.string "role" +======= +>>>>>>> 1ae514ca4857d7e2ad53b338731c1e01f899fb4d t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end