学生答题界面的修改
This commit is contained in:
parent
e9998edbc2
commit
99945d5bb5
|
@ -353,7 +353,7 @@ class ExerciseController < ApplicationController
|
||||||
ea.exercise_choice_id = params[:exercise_choice_id]
|
ea.exercise_choice_id = params[:exercise_choice_id]
|
||||||
if ea.save
|
if ea.save
|
||||||
@percent = get_percent(@exercise,User.current)
|
@percent = get_percent(@exercise,User.current)
|
||||||
render :json => {:text => "true",:percent => format("%.2f" ,@percent)}
|
render :json => {:text => "ok",:percent => format("%.2f" ,@percent)}
|
||||||
else
|
else
|
||||||
render :json => {:text => "failure"}
|
render :json => {:text => "failure"}
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
$("#homework_page_right").css("min-height",$("#LSide").height()-30);
|
$("#homework_page_right").css("min-height",$("#LSide").height()-30);
|
||||||
$("#Container").css("width","1000px");
|
$("#Container").css("width","1000px");
|
||||||
});
|
});
|
||||||
|
function getTime() {
|
||||||
|
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<div class="homepageRight mt0 ml10">
|
<div class="homepageRight mt0 ml10">
|
||||||
<div class="resources">
|
<div class="resources">
|
||||||
|
@ -50,7 +53,7 @@
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
var dataObj = eval(data);
|
var dataObj = eval(data);
|
||||||
if(dataObj.text == "true")
|
if(dataObj.text == "ok")
|
||||||
{
|
{
|
||||||
obj.checked = true;
|
obj.checked = true;
|
||||||
}
|
}
|
||||||
|
@ -105,7 +108,7 @@
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
var dataObj = eval(data);
|
var dataObj = eval(data);
|
||||||
if(dataObj.text == "true")
|
if(dataObj.text == "ok")
|
||||||
{
|
{
|
||||||
obj.checked = true;
|
obj.checked = true;
|
||||||
}
|
}
|
||||||
|
@ -117,7 +120,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<input class="ur_radio" type="checkbox" onclick="click_<%= exercise_choice.id %>(this);return false;" <%= answer_be_selected?(exercise_choice,User.current) ? "checked":"" %> <%= @can_edit_poll?"":"disabled=disabled" %> >
|
<input class="ur_radio" type="checkbox" onclick="click_<%= exercise_choice.id %>(this);return false;" <%= answer_be_selected?(exercise_choice,User.current) ? "checked":"" %> <%= @can_edit_excercise?"":"disabled=disabled" %> >
|
||||||
<%= convert_to_char((index+1).to_s)%> <%= exercise_choice.choice_text%>
|
<%= convert_to_char((index+1).to_s)%> <%= exercise_choice.choice_text%>
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<div class="ur_buttons">
|
<div class="ur_buttons">
|
||||||
<a class="ur_button_submit" onclick="poll_submit();"> 提交 </a>
|
<a class="ur_button_submit" onclick="poll_submit();"> 提交 </a>
|
||||||
<div class="polls_cha">
|
<div class="polls_cha">
|
||||||
<input name="exercise[show_result]" value="" type="checkbox">
|
<input name="exercise[show_result]" value="1" type="checkbox" checked="true">
|
||||||
<label for="">允许学生查看测验结果</label>
|
<label for="">允许学生查看测验结果</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
52
db/schema.rb
52
db/schema.rb
|
@ -241,6 +241,58 @@ ActiveRecord::Schema.define(:version => 20151120021958) do
|
||||||
|
|
||||||
add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true
|
add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true
|
||||||
|
|
||||||
|
create_table "code_review_assignments", :force => true do |t|
|
||||||
|
t.integer "issue_id"
|
||||||
|
t.integer "change_id"
|
||||||
|
t.integer "attachment_id"
|
||||||
|
t.string "file_path"
|
||||||
|
t.string "rev"
|
||||||
|
t.string "rev_to"
|
||||||
|
t.string "action_type"
|
||||||
|
t.integer "changeset_id"
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "code_review_project_settings", :force => true do |t|
|
||||||
|
t.integer "project_id"
|
||||||
|
t.integer "tracker_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.integer "updated_by"
|
||||||
|
t.boolean "hide_code_review_tab", :default => false
|
||||||
|
t.integer "auto_relation", :default => 1
|
||||||
|
t.integer "assignment_tracker_id"
|
||||||
|
t.text "auto_assign"
|
||||||
|
t.integer "lock_version", :default => 0, :null => false
|
||||||
|
t.boolean "tracker_in_review_dialog", :default => false
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "code_review_user_settings", :force => true do |t|
|
||||||
|
t.integer "user_id", :default => 0, :null => false
|
||||||
|
t.integer "mail_notification", :default => 0, :null => false
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "code_reviews", :force => true do |t|
|
||||||
|
t.integer "project_id"
|
||||||
|
t.integer "change_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.integer "line"
|
||||||
|
t.integer "updated_by_id"
|
||||||
|
t.integer "lock_version", :default => 0, :null => false
|
||||||
|
t.integer "status_changed_from"
|
||||||
|
t.integer "status_changed_to"
|
||||||
|
t.integer "issue_id"
|
||||||
|
t.string "action_type"
|
||||||
|
t.string "file_path"
|
||||||
|
t.string "rev"
|
||||||
|
t.string "rev_to"
|
||||||
|
t.integer "attachment_id"
|
||||||
|
t.integer "file_count", :default => 0, :null => false
|
||||||
|
t.boolean "diff_all"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "comments", :force => true do |t|
|
create_table "comments", :force => true do |t|
|
||||||
t.string "commented_type", :limit => 30, :default => "", :null => false
|
t.string "commented_type", :limit => 30, :default => "", :null => false
|
||||||
t.integer "commented_id", :default => 0, :null => false
|
t.integer "commented_id", :default => 0, :null => false
|
||||||
|
|
Loading…
Reference in New Issue