|
|
|
@ -1,8 +1,9 @@
|
|
|
|
|
class HacksController < ApplicationController
|
|
|
|
|
before_action :require_login, except: [:index]
|
|
|
|
|
before_action :find_hack, only: [:edit, :update, :publish, :start, :update_set, :delete_set]
|
|
|
|
|
before_action :require_teacher_identity, only: [:create, :update_set]
|
|
|
|
|
before_action :require_auth_identity, only: [:update, :edit, :publish, :update_set, :delete_set]
|
|
|
|
|
before_action :find_hack, only: [:edit, :update, :publish, :start, :update_set, :delete_set]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 开启编程,如果第一次开启,创建一条记录,如果已经开启过的话,直接返回标识即可
|
|
|
|
|
def start
|
|
|
|
|