编辑普通作业功能完成

This commit is contained in:
sw 2015-09-11 09:36:44 +08:00
parent 948a6c9138
commit a94521f2e1
4 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,7 @@ class HomeworkCommonController < ApplicationController
require 'json'
require "base64"
layout "base_courses"
include StudentWorkHelper
before_filter :find_course, :only => [:index,:new,:create,:next_step]
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy]

View File

@ -1,4 +1,5 @@
# encoding: utf-8
include UsersHelper
module HomeworkCommonHelper
#迟交扣分下拉框
def late_penalty_option

View File

@ -46,7 +46,7 @@
<div class="mt5">
<% if edit_mode %>
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="submit_homework('edit_homework_common');">确定</a>
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="submit_homework('edit_homework_common_<%= homework.id%>');">确定</a>
<span class="fr mr10 mt3">或</span>
<%= link_to "取消",user_homeworks_user_path(User.current.id),:class => "fr mr10 mt3"%>
<% else %>

View File

@ -71,6 +71,7 @@ function submit_homework(id)
$("#course_id").focus();
}
else{
homework_description_editor.sync();
$("#"+id).submit();
}