Merge branches 'dev_aliyun', 'dev_new_shixunsrepository' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_new_shixunsrepository

dev_new_shixunsrepository
杨树明 5 years ago
commit 96d2bdf953

@ -1,7 +1,7 @@
class EduSettingsController < ApplicationController
before_action :require_admin
before_action :set_edu_setting, only: [:show, :edit, :update, :destroy]
skip_before_action :check_sign
# GET /edu_settings
# GET /edu_settings.json
def index

@ -170,12 +170,13 @@ class GraduationTopicsController < ApplicationController
teacher_group = @course.teacher_course_groups.where(:user_id => @graduation_topic.tea_id, :id => params[:group_id]).first
unless teacher_group.present?
member = @course.course_members.where(:user_id => @graduation_topic.tea_id).first
tip_exception("分班名称不能为空") if params[:course_group_name].blank?
course_group = CourseGroup.create(:name => params[:course_group_name], :course_id => @course.id)
teacher_group = TeacherCourseGroup.create(:course_id => @course.id, :course_member_id => member.try(:id),
if params[:course_group_name].present?
course_group = CourseGroup.find_or_create_by!(:name => params[:course_group_name], :course_id => @course.id)
teacher_group = TeacherCourseGroup.find_or_create_by!(:course_id => @course.id, :course_member_id => member.try(:id),
:user_id => @graduation_topic.tea_id,
:course_group_id => course_group.try(:id))
end
end
student_member = @course.course_members.where(:user_id => student_graduation_topic.user_id).first
student_member.update_attributes(:course_group_id => teacher_group.course_group_id) if student_member.present?

@ -194,7 +194,7 @@ class HomeworkCommonsController < ApplicationController
# TODO user_extension 如果修改 请调整
unless params[:search].blank?
@student_works = @student_works.joins(user: :user_extension).where("concat(lastname, firstname) like ?
or student_id like ?", "%#{params[:search]}%", "%#{params[:search]}%")
or student_id like ?", "%#{params[:search].strip}%", "%#{params[:search].strip}%")
end
@work_count = @student_works.size

@ -892,7 +892,7 @@ class ShixunsController < ApplicationController
content = upload_file.tempfile.read
author_name = current_user.real_name
author_email = current_user.git_mail
update_file_content(content, @repo_path, author_email, author_name, "upload by browser")
update_file_content(content, @repo_path, author_email, author_name, "upload file by browser")
render_ok
end

@ -2,13 +2,15 @@ class CourseGroup < ApplicationRecord
default_scope { order("course_groups.position ASC") }
belongs_to :course, counter_cache: true
has_many :course_members
has_many :exercise_group_settings,:dependent => :destroy
has_many :attachment_group_settings, :dependent => :destroy
has_many :homework_group_reviews, :dependent => :destroy
has_many :teacher_course_groups, :dependent => :destroy
has_many :homework_group_settings, :dependent => :destroy
scope :by_group_ids, lambda { |ids| where(id: ids)}
validates :name, length: { maximum: 60 }
validates_uniqueness_of :name, scope: :course_id, message: "不能创建相同名称的分班"
after_create :generate_invite_code

@ -8,6 +8,8 @@ class TeacherCourseGroup < ApplicationRecord
scope :find_teacher_group_ids, lambda { |ids| where(course_group_id: ids) unless ids.blank?}
scope :get_user_groups,lambda {|ids| where(user_id:ids)}
validates_uniqueness_of :course_group_id, scope: :course_member_id
def course_members
self.course_group.course_members
end

@ -305,14 +305,21 @@ class HomeworksService
myshixun_endtime = games.select{|game| game.status == 2}.size == games.size ? games.map(&:end_time).max : nil
if work.work_status == 0
is_complete = myshixun_endtime && (myshixun_endtime < setting_time.end_time)
if is_complete || (myshixun.created_at < setting_time.end_time && (!homework.allow_late || setting_time.end_time >= Time.now))
# if work.work_status == 0
# if is_complete || (myshixun.created_at < setting_time.end_time && (!homework.allow_late || setting_time.end_time >= Time.now))
# work.work_status = 1
# elsif homework.allow_late && myshixun.created_at < homework.late_time
# work.work_status = 2
# end
# end
if !homework.allow_late || is_complete
work.work_status = 1
elsif homework.allow_late && myshixun.created_at < homework.late_time
elsif myshixun.created_at < homework.late_time
work.work_status = 2
end
end
if work.work_status != 0
if myshixun_endtime.present?

@ -8,7 +8,7 @@ module JupyterService
uri = "#{shixun_tomcat}/bridge/jupyter/get"
tpiID = "tpm#{shixun.id}"
mount = shixun.data_sets.present?
params = {tpiID: tpiID, identifier: shixun.identifier, needMount: mount,
params = {tpiID: tpiID, identifier: shixun.identifier, needMount: mount, gitUrl: '',
:containers => "#{Base64.urlsafe_encode64(shixun_container_limit(shixun))}"}
logger.info "test_juypter: uri->#{uri}, params->#{params}"
@ -48,7 +48,13 @@ module JupyterService
tpiID = myshixun.id
mount = myshixun.shixun.data_sets.present?
params = {tpiID: tpiID, identifier: shixun.identifier, myshixunIdentifier: myshixun.identifier, needMount: mount,
gitUrl = "#{edu_setting('git_address_domain')}/#{myshixun.repo_path}"
params = { tpiID: tpiID,
identifier: shixun.identifier,
myshixunIdentifier: myshixun.identifier,
gitUrl: gitUrl,
needMount: mount,
:containers => "#{Base64.urlsafe_encode64(shixun_container_limit(shixun))}"}
res = uri_post uri, params

@ -43,7 +43,8 @@ elsif @user_course_identity == Course::STUDENT
json.efficiency work_score_format(@work.efficiency, true, @score_open)
json.eff_score work_score_format(@work.eff_score, true, @score_open)
json.current_complete_count myshixun.try(:passed_count) if @homework.end_or_late
json.complete_count @work.myshixun&.time_passed_count(@homework.homework_group_setting(@work.user_id)&.end_time)
end_time = @homework.allow_late ? @homework.late_time : @homework.homework_group_setting(@work.user_id)&.end_time
json.complete_count @work.myshixun&.time_passed_count(end_time)
json.view_answer_count @work.myshixun.try(:view_answer_count).to_i
json.work_status @work.compelete_status
else
@ -101,7 +102,8 @@ if @homework.homework_type == "practice"
json.cost_time work.myshixun.try(:total_spend_time)
json.current_complete_count myshixun.try(:passed_count) if @homework.end_or_late
json.complete_count work.myshixun&.time_passed_count(@homework.homework_group_setting(work.user_id)&.end_time)
end_time = @homework.allow_late ? @homework.late_time : @homework.homework_group_setting(work.user_id)&.end_time
json.complete_count work.myshixun&.time_passed_count(end_time)
json.view_answer_count work.myshixun.try(:view_answer_count).to_i
json.user_login work.user.try(:login)
json.user_name work.user.try(:real_name)

@ -0,0 +1,20 @@
class ModifyCourseGroupForCourses < ActiveRecord::Migration[5.2]
def change
groups = CourseGroup.where(course_id:3429).order("created_at desc").group(:name)
ActiveRecord::Base.transaction do
groups.each do |g|
CourseGroup.where(name: g.name).where.not(id: g.id).each do |cg|
cg.course_members.each do |cm|
cm.update_attributes!(course_group_id: g.id)
end
cg.exercise_group_settings.update_all(course_group_id: g.id)
cg.attachment_group_settings.update_all(course_group_id: g.id)
cg.homework_group_reviews.update_all(course_group_id: g.id)
cg.homework_group_settings.update_all(course_group_id: g.id)
cg.teacher_course_groups.update_all(course_group_id: g.id)
cg.destroy!
end
end
end
end
end

@ -81,7 +81,7 @@ namespace :homework_publishtime do
end
end
student_works.joins(:myshixun).where("myshixuns.status != 1").update_all(late_penalty: homework.late_penalty) if student_works.present?
student_works.joins(:myshixun).where("myshixuns.status != 1").update_all(late_penalty: homework.late_penalty, work_status: 2) if student_works.present?
else
HomeworkEndUpdateScoreJob.perform_later(homework.id)

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

@ -1818,6 +1818,54 @@
<div class="code-name">&amp;#xe711;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe712;</span>
<div class="name">左右拖动</div>
<div class="code-name">&amp;#xe712;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe713;</span>
<div class="name">上下拖动</div>
<div class="code-name">&amp;#xe713;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe714;</span>
<div class="name">试卷</div>
<div class="code-name">&amp;#xe714;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe715;</span>
<div class="name">删除</div>
<div class="code-name">&amp;#xe715;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe716;</span>
<div class="name">减去</div>
<div class="code-name">&amp;#xe716;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe717;</span>
<div class="name">加上</div>
<div class="code-name">&amp;#xe717;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe718;</span>
<div class="name">减去2</div>
<div class="code-name">&amp;#xe718;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe719;</span>
<div class="name">加上2</div>
<div class="code-name">&amp;#xe719;</div>
</li>
</ul>
<div class="article markdown">
<h2 id="unicode-">Unicode 引用</h2>
@ -4550,6 +4598,78 @@
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-zuoyoutuodong"></span>
<div class="name">
左右拖动
</div>
<div class="code-name">.icon-zuoyoutuodong
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shangxiatuodong"></span>
<div class="name">
上下拖动
</div>
<div class="code-name">.icon-shangxiatuodong
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shijuan1"></span>
<div class="name">
试卷
</div>
<div class="code-name">.icon-shijuan1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shanchu2"></span>
<div class="name">
删除
</div>
<div class="code-name">.icon-shanchu2
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jianqu"></span>
<div class="name">
减去
</div>
<div class="code-name">.icon-jianqu
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jiashang"></span>
<div class="name">
加上
</div>
<div class="code-name">.icon-jiashang
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jianqu1"></span>
<div class="name">
减去2
</div>
<div class="code-name">.icon-jianqu1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jiashang1"></span>
<div class="name">
加上2
</div>
<div class="code-name">.icon-jiashang1
</div>
</li>
</ul>
<div class="article markdown">
<h2 id="font-class-">font-class 引用</h2>
@ -6963,6 +7083,70 @@
<div class="code-name">#icon-bianzu2</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-zuoyoutuodong"></use>
</svg>
<div class="name">左右拖动</div>
<div class="code-name">#icon-zuoyoutuodong</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shangxiatuodong"></use>
</svg>
<div class="name">上下拖动</div>
<div class="code-name">#icon-shangxiatuodong</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shijuan1"></use>
</svg>
<div class="name">试卷</div>
<div class="code-name">#icon-shijuan1</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shanchu2"></use>
</svg>
<div class="name">删除</div>
<div class="code-name">#icon-shanchu2</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jianqu"></use>
</svg>
<div class="name">减去</div>
<div class="code-name">#icon-jianqu</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jiashang"></use>
</svg>
<div class="name">加上</div>
<div class="code-name">#icon-jiashang</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jianqu1"></use>
</svg>
<div class="name">减去2</div>
<div class="code-name">#icon-jianqu1</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jiashang1"></use>
</svg>
<div class="name">加上2</div>
<div class="code-name">#icon-jiashang1</div>
</li>
</ul>
<div class="article markdown">
<h2 id="symbol-">Symbol 引用</h2>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -2090,6 +2090,62 @@
"font_class": "bianzu2",
"unicode": "e711",
"unicode_decimal": 59153
},
{
"icon_id": "12608146",
"name": "左右拖动",
"font_class": "zuoyoutuodong",
"unicode": "e712",
"unicode_decimal": 59154
},
{
"icon_id": "12608147",
"name": "上下拖动",
"font_class": "shangxiatuodong",
"unicode": "e713",
"unicode_decimal": 59155
},
{
"icon_id": "12621166",
"name": "试卷",
"font_class": "shijuan1",
"unicode": "e714",
"unicode_decimal": 59156
},
{
"icon_id": "12621173",
"name": "删除",
"font_class": "shanchu2",
"unicode": "e715",
"unicode_decimal": 59157
},
{
"icon_id": "12621174",
"name": "减去",
"font_class": "jianqu",
"unicode": "e716",
"unicode_decimal": 59158
},
{
"icon_id": "12621177",
"name": "加上",
"font_class": "jiashang",
"unicode": "e717",
"unicode_decimal": 59159
},
{
"icon_id": "12621395",
"name": "减去2",
"font_class": "jianqu1",
"unicode": "e718",
"unicode_decimal": 59160
},
{
"icon_id": "12621396",
"name": "加上2",
"font_class": "jiashang1",
"unicode": "e719",
"unicode_decimal": 59161
}
]
}

@ -914,6 +914,30 @@ Created by iconfont
<glyph glyph-name="bianzu2" unicode="&#59153;" d="M512 353.882353m-240.941176 0a240.941176 240.941176 0 1 1 481.882352 0 240.941176 240.941176 0 1 1-481.882352 0ZM512 534.588235m-361.411765 0a361.411765 361.411765 0 1 1 722.82353 0 361.411765 361.411765 0 1 1-722.82353 0ZM402.552471 426.285176L279.491765 527.600941a9.035294 9.035294 0 0 0 0 13.974588l123.030588 101.315765a9.035294 9.035294 0 0 0 14.757647-6.987294v-52.103529a9.035294 9.035294 0 0 1 9.035294-9.035295h171.309177a9.035294 9.035294 0 0 1 9.035294 9.035295v52.103529a9.035294 9.035294 0 0 0 14.757647 6.987294l123.030588-101.315765a9.035294 9.035294 0 0 0 0-13.974588l-123.030588-101.315765a9.035294 9.035294 0 0 0-14.757647 6.987295v52.103529a9.035294 9.035294 0 0 1-9.035294 9.035294H426.345412a9.035294 9.035294 0 0 1-9.035294-9.035294v-52.103529a9.035294 9.035294 0 0 0-14.757647-6.987295z" horiz-adv-x="1024" />
<glyph glyph-name="zuoyoutuodong" unicode="&#59154;" d="M558.848-76.288L35.84 354.304a38.4 38.4 0 0 0 0 59.392L558.848 844.288a38.4 38.4 0 0 0 62.72-29.696v-221.44a38.4 38.4 0 0 1 38.4-38.4h728.064a38.4 38.4 0 0 1 38.4 38.4V814.464a38.4 38.4 0 0 0 62.72 29.696l522.88-430.592a38.4 38.4 0 0 0 0-59.392l-522.88-430.592a38.4 38.4 0 0 0-62.72 29.696v221.44a38.4 38.4 0 0 1-38.4 38.4H659.968a38.4 38.4 0 0 1-38.4-38.4v-221.44a38.4 38.4 0 0 0-62.72-29.696z" horiz-adv-x="2048" />
<glyph glyph-name="shangxiatuodong" unicode="&#59155;" d="M742.144 151.424L526.848-110.08a19.2 19.2 0 0 0-29.696 0L281.856 151.424a19.2 19.2 0 0 0 14.848 31.36h110.72a19.2 19.2 0 0 1 19.2 19.2V566.016a19.2 19.2 0 0 1-19.2 19.2H296.768a19.2 19.2 0 0 0-14.848 31.36L497.152 878.08a19.2 19.2 0 0 0 29.696 0l215.296-261.44a19.2 19.2 0 0 0-14.848-31.36h-110.72a19.2 19.2 0 0 1-19.2-19.2v-364.032a19.2 19.2 0 0 1 19.2-19.2h110.72a19.2 19.2 0 0 0 14.848-31.36z" horiz-adv-x="1024" />
<glyph glyph-name="shijuan1" unicode="&#59156;" d="M352.256 865.28h436.224c112.64 0 204.8-92.16 204.8-204.8v-552.96c0-112.64-92.16-204.8-204.8-204.8H352.256c-112.64 0-204.8 92.16-204.8 204.8v552.96c0 112.64 90.112 204.8 204.8 204.8zM788.48-128H352.256c-129.024 0-235.52 106.496-235.52 235.52v552.96C116.736 789.504 221.184 896 352.256 896h436.224C917.504 896 1024 789.504 1024 660.48v-552.96C1024-21.504 917.504-128 788.48-128zM352.256 834.56c-96.256 0-174.08-77.824-174.08-174.08v-552.96c0-96.256 77.824-174.08 174.08-174.08h436.224c96.256 0 174.08 77.824 174.08 174.08v552.96C962.56 756.736 884.736 834.56 788.48 834.56H352.256zM311.296 564.224m-40.96 0a40.96 40.96 0 1 1 81.92 0 40.96 40.96 0 1 1-81.92 0ZM311.296 332.8m-40.96 0a40.96 40.96 0 1 1 81.92 0 40.96 40.96 0 1 1-81.92 0ZM841.728 545.792H471.04c-16.384 0-30.72 14.336-30.72 30.72s14.336 30.72 30.72 30.72h370.688c16.384 0 30.72-14.336 30.72-30.72s-12.288-30.72-30.72-30.72zM841.728 314.368H471.04c-16.384 0-30.72 14.336-30.72 30.72s14.336 30.72 30.72 30.72h370.688c16.384 0 30.72-14.336 30.72-30.72s-12.288-30.72-30.72-30.72zM819.2-97.28c-26.624 32.768-43.008 61.44-47.104 88.064-4.096 24.576-2.048 59.392 8.192 104.448v6.144c0 16.384-14.336 30.72-30.72 30.72H61.44c-16.384 0-30.72-14.336-30.72-30.72v-83.968c0-63.488 51.2-114.688 114.688-114.688H819.2zM882.688-128h-737.28C65.536-128 0-62.464 0 17.408v83.968c0 34.816 26.624 61.44 61.44 61.44h688.128c34.816 0 61.44-26.624 61.44-61.44 0-4.096 0-8.192-2.048-12.288-8.192-43.008-10.24-73.728-8.192-94.208 4.096-18.432 16.384-43.008 40.96-73.728l40.96-49.152zM61.44 101.376v-83.968C61.44-29.696 98.304-66.56 145.408-66.56h614.4c-10.24 18.432-16.384 34.816-18.432 51.2-4.096 26.624-2.048 63.488 8.192 116.736H61.44z" horiz-adv-x="1024" />
<glyph glyph-name="shanchu2" unicode="&#59157;" d="M512 384m-512 0a512 512 0 1 1 1024 0 512 512 0 1 1-1024 0ZM665.6 179.2c-15.36 0-25.6 5.12-35.84 15.36L512 312.32l-117.76-117.76c-20.48-20.48-51.2-20.48-71.68 0s-20.48 51.2 0 71.68L440.32 384 322.56 501.76c-20.48 20.48-20.48 51.2 0 71.68s51.2 20.48 71.68 0L512 455.68l117.76 117.76c20.48 20.48 51.2 20.48 71.68 0s20.48-51.2 0-71.68L583.68 384l117.76-117.76c20.48-20.48 20.48-51.2 0-71.68-10.24-10.24-20.48-15.36-35.84-15.36z" horiz-adv-x="1024" />
<glyph glyph-name="jianqu" unicode="&#59158;" d="M512-128C228.693333-128 0 100.693333 0 384S228.693333 896 512 896s512-228.693333 512-512-228.693333-512-512-512z m0 989.866667C249.173333 861.866667 34.133333 646.826667 34.133333 384s215.04-477.866667 477.866667-477.866667 477.866667 215.04 477.866667 477.866667S774.826667 861.866667 512 861.866667zM699.733333 332.8h-375.466666c-20.48 0-34.133333 13.653333-34.133334 34.133333s13.653333 34.133333 34.133334 34.133334h375.466666c20.48 0 34.133333-13.653333 34.133334-34.133334s-13.653333-34.133333-34.133334-34.133333z" horiz-adv-x="1024" />
<glyph glyph-name="jiashang" unicode="&#59159;" d="M512-128C228.693333-128 0 100.693333 0 384S228.693333 896 512 896s512-228.693333 512-512-228.693333-512-512-512z m0 989.866667C249.173333 861.866667 34.133333 646.826667 34.133333 384s215.04-477.866667 477.866667-477.866667 477.866667 215.04 477.866667 477.866667S774.826667 861.866667 512 861.866667zM699.733333 332.8h-375.466666c-20.48 0-34.133333 13.653333-34.133334 34.133333s13.653333 34.133333 34.133334 34.133334h375.466666c20.48 0 34.133333-13.653333 34.133334-34.133334s-13.653333-34.133333-34.133334-34.133333zM512 145.066667c-20.48 0-34.133333 13.653333-34.133333 34.133333V554.666667c0 20.48 13.653333 34.133333 34.133333 34.133333s34.133333-13.653333 34.133333-34.133333v-375.466667c0-20.48-13.653333-34.133333-34.133333-34.133333z" horiz-adv-x="1024" />
<glyph glyph-name="jianqu1" unicode="&#59160;" d="M512-128C228.693333-128 0 100.693333 0 384S228.693333 896 512 896s512-228.693333 512-512-228.693333-512-512-512z m0 989.866667C249.173333 861.866667 34.133333 646.826667 34.133333 384s215.04-477.866667 477.866667-477.866667 477.866667 215.04 477.866667 477.866667S774.826667 861.866667 512 861.866667zM699.733333 332.8h-375.466666c-20.48 0-34.133333 13.653333-34.133334 34.133333s13.653333 34.133333 34.133334 34.133334h375.466666c20.48 0 34.133333-13.653333 34.133334-34.133334s-13.653333-34.133333-34.133334-34.133333z" horiz-adv-x="1024" />
<glyph glyph-name="jiashang1" unicode="&#59161;" d="M512-128C228.693333-128 0 100.693333 0 384S228.693333 896 512 896s512-228.693333 512-512-228.693333-512-512-512z m0 989.866667C249.173333 861.866667 34.133333 646.826667 34.133333 384s215.04-477.866667 477.866667-477.866667 477.866667 215.04 477.866667 477.866667S774.826667 861.866667 512 861.866667zM699.733333 332.8h-375.466666c-20.48 0-34.133333 13.653333-34.133334 34.133333s13.653333 34.133333 34.133334 34.133334h375.466666c20.48 0 34.133333-13.653333 34.133334-34.133334s-13.653333-34.133333-34.133334-34.133333zM512 145.066667c-20.48 0-34.133333 13.653333-34.133333 34.133333V554.666667c0 20.48 13.653333 34.133333 34.133333 34.133333s34.133333-13.653333 34.133333-34.133333v-375.466667c0-20.48-13.653333-34.133333-34.133333-34.133333z" horiz-adv-x="1024" />
</font>

Before

Width:  |  Height:  |  Size: 375 KiB

After

Width:  |  Height:  |  Size: 381 KiB

@ -79,16 +79,15 @@ class GraduateTopicDetailTable extends Component{
})
}
sureAgreeTopic=(count)=>{
if(count > 0){
let{tableData}=this.props;
let{operationId,classesId}=this.state
let courseId=this.props.match.params.course_id;
if(classesId!=undefined){
let name=tableData.group_list.filter(item=>item.group_id==classesId)[0].group_name;
this.agreeChoose(courseId,operationId,classesId,name);
}else{
this.setState({
un_choose_notice:"请先添加分班"
})
this.agreeChoose(courseId,operationId,classesId);
}
}
@ -205,7 +204,7 @@ class GraduateTopicDetailTable extends Component{
>
<div className="newupload_conbox">
<p className="color-grey-9 mb15 edu-txt-center">确认同意学生的选题将学生加入我的分班</p>
<div className="df">
{ tableData.group_list && tableData.group_list.length===0?"":<div className="df">
<span className="lineh-40 mr10">选择</span>
<div className="flex1">
<Select placeholder="请选择分班" style={{"width":"100%"}} value={classesId} onChange={this.changeClasses}>
@ -220,7 +219,7 @@ class GraduateTopicDetailTable extends Component{
</Select>
<p style={{height:"20px",lineHeight:"20px"}}><span className="color-orange-tip">{un_choose_notice}</span></p>
</div>
</div>
</div>}
<div className="mt20 clearfix edu-txt-center">
<a onClick={this.hideAgreeTopic} className="pop_close task-btn mr30">取消</a>
<a className="task-btn task-btn-orange" onClick={()=>this.sureAgreeTopic(tableData.group_list.length)}>确定</a>

@ -363,7 +363,7 @@ class Listofworksstudentone extends Component {
),
},
{
title: '截止前完成关卡',
title: '结束前完成关卡',
dataIndex: 'completion',
key: 'completion',
align: "center",
@ -757,7 +757,7 @@ class Listofworksstudentone extends Component {
),
},
{
title: '截止前完成关卡',
title: '结束前完成关卡',
dataIndex: 'completion',
key: 'completion',
align: "center",
@ -1110,7 +1110,7 @@ class Listofworksstudentone extends Component {
),
},
{
title: '截止前完成关卡',
title: '结束前完成关卡',
dataIndex: 'completion',
key: 'completion',
align: 'center',
@ -1473,7 +1473,7 @@ class Listofworksstudentone extends Component {
),
},
{
title: '截止前完成关卡',
title: '结束前完成关卡',
dataIndex: 'completion',
key: 'completion',
align: 'center',

@ -39,6 +39,7 @@
user-select: none;
}
.btn_test_case,
.btn_test_case_active{
display: inline-block;
@ -80,6 +81,32 @@
bottom: 4px;
}
.blacktab_con_abs{
position: absolute !important;
left: 150px;
right: 150px;
top: 0;
height: 34px;
background: gold;
}
.code_evalute_icon{
position: absolute;
top: 0;
width: 56px;
height: 28px;
left: 50%;
margin-left: -28px;
background: rgba(42,58,79,1);
z-index: 10;
border-bottom-left-radius: 100px;
border-bottom-right-radius: 100px;
color: #fff;
text-align: center;
cursor: pointer;
opacity: .4;
transition: all .3s;
}
@keyframes mymove
{
from {right:0px;}

@ -224,6 +224,10 @@ class VNCContainer extends Component {
>
<style>{`
/* 评测结果 */
.codeEvaluateDrawer{
// position: absolute;
// bottom: 84px;
}
.codeEvaluateDrawer #game_test_set_results {
height: 198px;
}
@ -233,7 +237,10 @@ class VNCContainer extends Component {
.codeEvaluateDrawer .ant-drawer-content-wrapper, .codeEvaluateDrawer .ant-drawer-mask {
position: absolute;
}
.codeEvaluateDrawer .ant-drawer-content-wrapper .ant-drawer-content{
height: 100%;
background: rgb(5, 16, 26) !important;
}
.codeEvaluateFloatButton {
bottom: 180px !important;
@ -345,7 +352,8 @@ class VNCContainer extends Component {
className={'codeEvaluateDrawer'}
placement="bottom"
getContainer={false}
style={{ position: 'absolute', bottom: '-25px', zIndex: 1 }}
// style={{ position: 'absolute', bottom: '-25px', zIndex: 1 }}
style={{ position: 'absolute', bottom: '50px', zIndex: 1 }}
afterVisibleChange={(visible) => {
if (visible) {
const canvas = $('.vncDisply canvas')[0]
@ -356,16 +364,16 @@ class VNCContainer extends Component {
>
{ this.props.codeEvaluate }
</Drawer>
{/* <FloatButton onClick={this.swtichBottomDrawer}
<FloatButton onClick={this.swtichBottomDrawer}
className="codeEvaluateFloatButton"
>测试集</FloatButton> */}
<div
>测试集</FloatButton>
{/* <div
className={_classCtx}
onClick={this.swtichBottomDrawer}
>
> */}
{/* <span className="iconfont icon-shangjiantou btn-arrow"></span> */}
<span className={_classes}></span>
</div>
{/* <span className={_classes}></span> */}
{/* </div> */}
</VNCDisplay>

@ -1,9 +1,11 @@
#actionView {
position: relative;
background:rgba(5,16,26,1);
min-height: 49px;
/*box-shadow: inset 0 0 10px #27324c;*/
z-index: 9;
box-shadow: 0px -1px 4px 0px rgba(76,172,255,0.08);
z-index: 10001;
}
#time-consuming span {
color: #747A7F;

@ -1,3 +1,4 @@
import '../VNC.css';
import React, { Component } from 'react';
import IconButton from 'material-ui/IconButton';
@ -311,6 +312,11 @@ class CodeEvaluateView extends Component {
<li className={`blacktab_con ${ tabIndex === 1 ? 'tab_hover' : ''}`} onClick={() => this.tabIndexChange(1)}>
<a href="javascript:void(0);" className="tab_type tab_color">测试结果</a>
</li>
{/* <li className="blacktab_con_abs">
<span className="code_evalute_icon">
<span className="iconfont icon-xiajiantou btn-arrow"></span>
</span>
</li> */}
{this.props.inDrawer ? <Tooltip id="tooltip-icon-expand" title={ "收起" }>
{/*TODO 按钮大小改造css*/}

@ -296,6 +296,32 @@ class CodeRepositoryViewContainer extends Component {
render() {
return (
// <React.Fragment>
// {this.props.isOnlyContainer == true ?
// React.Children.map(this.props.children, child => {
// if(!child) {
// return ''
// }
// return React.cloneElement(child, Object.assign({...this.state}, {
// loadRepoFiles: this.loadRepoFiles,
// onTreeSelect: this.onTreeSelect,
// onLoadData: this.onLoadData,
// }))
// })
// :
// <CodeRepositoryView {...this.props}
// {...this.state}
// showFilesDrawer={this.showFilesDrawer}
// loadRepoFiles={this.loadRepoFiles}
// onLoadData={this.onLoadData}
// onTreeSelect={ this.onTreeSelect }
// onRepositoryViewExpand={this.onRepositoryViewExpand}
// tabIndexChange={this.tabIndexChange}
// showSettingDrawer={this.showSettingDrawer}
// ></CodeRepositoryView> }
// </React.Fragment>
<React.Fragment>
{this.props.isOnlyContainer == true ?
React.Children.map(this.props.children, child => {

@ -113,16 +113,16 @@ class Challengesjupyter extends Component {
}else{
if(response.data.status===0){
if(response.data.useSeconds===null){
if(response.data.remainingSeconds===null){
this.handleClickResetTpi()
}else{
let useSeconds=response.data.useSeconds;
let summain=3600 * 1000;
let sums= useSeconds * 1000;
let sum=summain-sums;
let remainingSeconds=response.data.remainingSeconds;
// let summain=3600 * 1000;
let sums= remainingSeconds * 1000;
// let sum=summain-sums;
setTimeout(()=>{
this.setState({
jupytertime:Date.now() +sum
jupytertime:Date.now() +sums
})
},500);
}
@ -278,7 +278,7 @@ class Challengesjupyter extends Component {
this.setState({
showtime:false
})
}, 500)
}, 800)
}else{
this.setState({
@ -292,7 +292,7 @@ class Challengesjupyter extends Component {
})
this.props.showNotification('实训保存失败!');
})
}, 500)
}, 800)
}
@ -420,6 +420,7 @@ class Challengesjupyter extends Component {
onFinish=()=>{
let id=this.props.match.params.shixunId;
let that=this;
Modal.confirm({
title: '倒计时截止',
content: (
@ -430,7 +431,7 @@ class Challengesjupyter extends Component {
okText: '确定',
cancelText: '取消',
onOk () {
this.handleClickResetTpisync_code(id)
that.handleClickResetTpisync_code(id)
}
})
}

@ -259,11 +259,11 @@ export const timeinfo_with_tpi = (identifier, dispatch) => {
onCancel() {}
})
}else{
let useSeconds=res.data.useSeconds;
let summain=3600 * 1000;
let sums= useSeconds * 1000;
let sum=summain-sums;
setTimeout(()=>{ dispatch(addjypertime(Date.now() +sum))},500);
let remainingSeconds=res.data.remainingSeconds;
// let summain=3600 * 1000;
let sums= remainingSeconds * 1000;
// let sum=summain-sums;
setTimeout(()=>{ dispatch(addjypertime(Date.now() +sums))},500);
}
}
}

Loading…
Cancel
Save