Merge branch 'jupyter' of https://bdgit.educoder.net/Hjqreturn/educoder into jupyter
@ -1,6 +1,7 @@
|
||||
class HackUserCode < ApplicationRecord
|
||||
# 用户编程题的信息
|
||||
belongs_to :hack
|
||||
belongs_to :hack_user_lastest_code
|
||||
|
||||
scope :created_order, ->{ order("created_at desc")}
|
||||
end
|
||||
|
@ -1 +1,3 @@
|
||||
$("#course-item-<%= @course.id %>").html("<%= j render partial: "admins/courses/shared/td",locals: {course: @course} %>")
|
||||
var index = $("#course-item-<%= @course.id %>").children(":first").html();
|
||||
$("#course-item-<%= @course.id %>").html("<%= j render partial: "admins/courses/shared/td",locals: {course: @course, no: 1} %>");
|
||||
$("#course-item-<%= @course.id %>").children(":first").html(index);
|
@ -1,4 +1,6 @@
|
||||
$('.modal.admin-add-department-member-modal').modal('hide');
|
||||
$.notify({ message: '操作成功' });
|
||||
|
||||
$('.department-list-table .department-item-<%= current_department.id %>').html("<%= j(render partial: 'admins/departments/shared/department_item', locals: { department: current_department }) %>")
|
||||
var index = $(".department-item-<%= current_department.id %>").children(":first").html();
|
||||
$('.department-list-table .department-item-<%= current_department.id %>').html("<%= j(render partial: 'admins/departments/shared/department_item', locals: { department: current_department, index: 1 }) %>");
|
||||
$(".department-item-<%= current_department.id %>").children(":first").html(index);
|
@ -1,4 +1,6 @@
|
||||
$('.modal.admin-edit-department-modal').modal('hide');
|
||||
$.notify({ message: '操作成功' });
|
||||
|
||||
$('.department-list-table .department-item-<%= current_department.id %>').html("<%= j(render partial: 'admins/departments/shared/department_item', locals: { department: current_department }) %>")
|
||||
var index = $(".department-item-<%= current_department.id %>").children(":first").html();
|
||||
$('.department-list-table .department-item-<%= current_department.id %>').html("<%= j(render partial: 'admins/departments/shared/department_item', locals: {department: current_department, index: 1}) %>");
|
||||
$(".department-item-<%= current_department.id %>").children(":first").html(index);
|
@ -1 +1,3 @@
|
||||
$(".laboratory-item-<%= @laboratory.id %>").html("<%= j render partial: "admins/laboratories/shared/laboratory_item",locals: {laboratory: @laboratory} %>")
|
||||
var index = $(".laboratory-item-<%= @laboratory.id %>").children(":first").html();
|
||||
$(".laboratory-item-<%= @laboratory.id %>").html("<%= j render partial: "admins/laboratories/shared/laboratory_item",locals: {laboratory: @laboratory, index: 1} %>");
|
||||
$(".laboratory-item-<%= @laboratory.id %>").children(":first").html(index);
|
@ -1 +1,3 @@
|
||||
$("#laboratory-item-<%= @laboratory.id %>").html("<%= j render partial: 'admins/laboratories/shared/laboratory_item', locals: {laboratory: @laboratory} %>")
|
||||
var index = $(".laboratory-item-<%= @laboratory.id %>").children(":first").html();
|
||||
$("#laboratory-item-<%= @laboratory.id %>").html("<%= j render partial: 'admins/laboratories/shared/laboratory_item', locals: {laboratory: @laboratory, index: 1} %>");
|
||||
$(".laboratory-item-<%= @laboratory.id %>").children(":first").html(index);
|
@ -1,4 +1,6 @@
|
||||
$('.modal.admin-add-laboratory-user-modal').modal('hide');
|
||||
$.notify({ message: '操作成功' });
|
||||
|
||||
$('.laboratory-list-table .laboratory-item-<%= current_laboratory.id %>').html("<%= j(render partial: 'admins/laboratories/shared/laboratory_item', locals: { laboratory: current_laboratory }) %>")
|
||||
var index = $(".laboratory-item-<%= current_laboratory.id %>").children(":first").html();
|
||||
$('.laboratory-list-table .laboratory-item-<%= current_laboratory.id %>').html("<%= j(render partial: 'admins/laboratories/shared/laboratory_item', locals: {laboratory: current_laboratory, index: 1}) %>");
|
||||
$(".laboratory-item-<%= current_laboratory.id %>").children(":first").html(index);
|
@ -1,4 +1,8 @@
|
||||
json.(@hack_user, :id, :status, :error_line, :error_msg, :expected_output,
|
||||
:input, :output, :execute_time, :execute_memory, :created_at, :code)
|
||||
json.language @hack_user.hack.language
|
||||
json.name @hack_user.hack.name
|
||||
json.name @hack_user.hack.name
|
||||
json.myproblem_identifier @my_hack.identifier
|
||||
json.user do
|
||||
json.partial! 'users/user', user: current_user
|
||||
end
|
@ -0,0 +1,6 @@
|
||||
class AddIndexForHackCodes < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
HackCode.destroy_all
|
||||
add_index :hack_codes, [:hack_id, :language], unique: true
|
||||
end
|
||||
end
|
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 16 KiB |