Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

chromesetting
daiao 5 years ago
commit f45fcdcacd

@ -10,7 +10,7 @@ class ShixunsController < ApplicationController
before_action :find_shixun, except: [:index, :new, :create, :menus, :get_recommend_shixuns,
:propaedeutics, :departments, :apply_shixun_mirror,
:get_mirror_script, :download_file, :shixun_list]
:get_mirror_script, :download_file, :shixun_list, :batch_send_to_course]
before_action :shixun_access_allowed, except: [:index, :new, :create, :menus, :get_recommend_shixuns,
:propaedeutics, :departments, :apply_shixun_mirror,
@ -990,6 +990,16 @@ class ShixunsController < ApplicationController
CreateStudentWorkJob.perform_later(homework.id)
end
# 批量发送
def batch_send_to_course
@course = Course.find_by!(id: params[:course_id])
shixuns = Shixun.where(id: params[:shixun_ids]).unhidden
shixuns.each do |shixun|
homework = HomeworksService.new.create_homework shixun, @course, nil, current_user
CreateStudentWorkJob.perform_later(homework.id)
end
end
# 二维码扫描下载
def download_file
file_path = params[:file_name]

@ -0,0 +1,4 @@
json.status 1
json.message "发送成功"
json.course_id @course.id
json.first_category_url module_url(@course.none_hidden_course_modules.first, @course)

@ -224,6 +224,7 @@ Rails.application.routes.draw do
post :apply_shixun_mirror
get :download_file
get :shixun_lists
post :batch_send_to_course
end
member do

@ -127,11 +127,12 @@
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}],
cancel : [lang.buttons.cancel, function() {
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}]
}

@ -127,11 +127,13 @@
enter : [lang.buttons.enter, function() {
cm.replaceSelection(selecteds.join(" "));
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}],
cancel : [lang.buttons.cancel, function() {
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}]

@ -107,12 +107,14 @@
_this.gotoLine(line);
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}],
cancel : [lang.buttons.cancel, function() {
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}]

@ -19,6 +19,7 @@
exports.fn.helpDialog = function() {
var _this = this;
var lang = this.lang;
var cm = this.cm;
var editor = this.editor;
var settings = this.settings;
var path = settings.pluginPath + pluginName + "/";
@ -46,6 +47,7 @@
buttons : {
close : [lang.buttons.close, function() {
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}]

@ -71,12 +71,12 @@
enter : [lang.buttons.enter, function() {
cm.replaceSelection(selecteds.join(" "));
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}],
cancel : [lang.buttons.cancel, function() {
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}]
}

@ -89,13 +89,14 @@
cm.replaceSelection(str);
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
return false;
}],
cancel : [lang.buttons.cancel, function() {
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}]
}

@ -82,11 +82,13 @@
cm.replaceSelection(codeTexts);
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}],
cancel : [lang.buttons.cancel, function() {
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}]

@ -98,11 +98,13 @@
cm.setValue(cm.getValue() + "\n[" + rid + "]: " + url + title + "");
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}],
cancel : [lang.buttons.cancel, function() {
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}]

@ -154,12 +154,14 @@
cm.replaceSelection(table);
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}],
cancel : [lang.buttons.cancel, function() {
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus();
return false;
}]

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -62,7 +62,7 @@ class Addshixuns extends Component {
<Modal
className={this.props.className}
keyboard={false}
title="添加实训项目"
title="新建实训项目"
visible={this.props.Addshixunstype===undefined?false:this.props.Addshixunstype}
closable={false}
footer={null}

@ -429,17 +429,16 @@ class DetailCardsEditAndAdd extends Component{
</div>
<p className="clearfix mb10">
<a onClick={()=>this.AddShixunBox()} className="fl defalutGreyBorder color-grey-6 ml37">
<a onClick={()=>this.Addshixuns()} className="fl defalutGreyBorder color-grey-6 ml37">
<i className="iconfont icon-tianjiafangda fl mr5"></i>
选用实训项目</a>
<span id="sx_notice" className="fl ml20 color-grey-9 mt5">选择下面实训后可以通过拖拽进行排序调整</span>
新建实训项目</a>
</p>
<p className="clearfix mb30">
<a onClick={()=>this.Addshixuns()} className="fl defalutGreyBorder color-grey-6 ml37">
<a onClick={()=>this.AddShixunBox()} className="fl defalutGreyBorder color-grey-6 ml37">
<i className="iconfont icon-tianjiafangda fl mr5"></i>
添加实训项目</a>
<span id="sx_notice" className="fl ml20 color-grey-9 mt5">您只需输入实训名称即可完成实训项目的添加进入实训详情后可进行具体配置操作</span>
选用实训项目</a>
<span id="sx_notice" className="fl ml20 color-grey-9 mt5">选择下面实训后可以通过拖拽进行排序调整</span>
</p>
{selectShixun===true?<style>

@ -430,17 +430,16 @@ class DetailCardsEditAndEdit extends Component{
</div>
<p className="clearfix mb10">
<a onClick={this.AddShixunBox} className="fl defalutGreyBorder color-grey-6 ml37">
<i className="iconfont icon-tianjiafangda fl mr5"></i>
<a onClick={this.Addshixuns} className="fl defalutGreyBorder color-grey-6 ml37">
<i className="iconfont icon-tianjiafangda fl mr5"></i>
</a>
<span id="sx_notice" className="fl ml20 color-grey-9 mt5">选择下面实训后可以通过拖拽进行排序调整</span>
</p>
<p className="clearfix mb30">
<a onClick={this.Addshixuns} className="fl defalutGreyBorder color-grey-6 ml37">
<i className="iconfont icon-tianjiafangda fl mr5"></i>
<a onClick={this.AddShixunBox} className="fl defalutGreyBorder color-grey-6 ml37">
<i className="iconfont icon-tianjiafangda fl mr5"></i>
</a>
<span id="sx_notice" className="fl ml20 color-grey-9 mt5">您只需输入实训名称即可完成实训项目的添加进入实训详情后可进行具体配置操作</span>
<span id="sx_notice" className="fl ml20 color-grey-9 mt5">选择下面实训后可以通过拖拽进行排序调整</span>
</p>
{selectShixun===true?<style>

Loading…
Cancel
Save