From 696be1edbf338905e98c5971a030324515ee7a81 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 5 Jul 2019 11:08:54 +0800
Subject: [PATCH 1/9] id
---
.../modules/courses/members/teacherList.js | 20 ++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js
index c0c450ac0..9e20bd64d 100644
--- a/public/react/src/modules/courses/members/teacherList.js
+++ b/public/react/src/modules/courses/members/teacherList.js
@@ -39,15 +39,17 @@ function buildColumns(that) {
render: (content, item, index) => {
return {(that.state.page - 1) * 20 + index + 1}
}
- },{
- title: '用户ID',
- width: 120,
- dataIndex: 'login',
- key: 'login',
- render: (login, record) => {
- return 8 ? login : ''}`}>{login}
- }
- }, {
+ }
+ // ,{
+ // title: '用户ID',
+ // width: 120,
+ // dataIndex: 'login',
+ // key: 'login',
+ // render: (login, record) => {
+ // return 8 ? login : ''}`}>{login}
+ // }
+ // }
+ , {
title: '姓名',
dataIndex: 'name',
width: 120,
From 34130459741f9e04e7f4699809ebd974efd0ac16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Fri, 5 Jul 2019 12:54:57 +0800
Subject: [PATCH 2/9] b
---
.../courses/shixunHomework/Listofworks.js | 31 ++-----------------
1 file changed, 3 insertions(+), 28 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js
index ada6254bc..7dd49a203 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworks.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js
@@ -1346,7 +1346,7 @@ class Listofworks extends Component {
// }
// let url = "/zip/shixun_report";
// let homeworkid = this.props.match.params.homeworkid;
- axios.get((url),{headers:{'filename':'utf-8'},responseType: 'blob'}).then((response) => {
+ axios.get((url),{responseType: 'blob'}).then((response) => {
console.log("1350");
console.log(response);
if(response.data.status&&response.data.status===-1){
@@ -1374,31 +1374,6 @@ class Listofworks extends Component {
console.log(error)
});
}
- //字节装为字符串
- utf8ByteArrayToString(bytes) {
- var out = [], pos =0, c =0;
- while (pos < bytes.length) {
- var c1 = bytes[pos++];
- if (c1 <128) {
- out[c++] = String.fromCharCode(c1);
- }else if (c1 >191 && c1 <224) {
- var c2 = bytes[pos++];
- out[c++] = String.fromCharCode((c1 &31) <<6 | c2 &63);
- }else if (c1 >239 && c1 <365) {
- var c2 = bytes[pos++];
- var c3 = bytes[pos++];
- var c4 = bytes[pos++];
- var u = ((c1 &7) <<18 | (c2 &63) <<12 | (c3 &63) <<6 | c4 &63) -0x10000;
- out[c++] = String.fromCharCode(0xD800 + (u >>10));
- out[c++] = String.fromCharCode(0xDC00 + (u &1023));
- }else {
- var c2 = bytes[pos++];
- var c3 = bytes[pos++];
- out[c++] =String.fromCharCode((c1 &15) <<12 | (c2 &63) <<6 | c3 &63);
- }
- }
- return out.join('');
- }
// 课堂学生成绩的导出下载
Classstudentachievement=(url)=>{
console.log("Classstudentachievement");
@@ -1410,7 +1385,7 @@ class Listofworks extends Component {
// search: this.state.searchtext,
// }
// },{responseType: 'blob'})
- axios.get((url),{headers:{'filename':'utf-8'},responseType: 'blob'}).then((response) => {
+ axios.get((url),{responseType: 'blob'}).then((response) => {
console.log("1374");
console.log(response);
if(response.data.status&&response.data.status===-1){
@@ -1428,7 +1403,7 @@ class Listofworks extends Component {
console.log(response.headers['content-disposition'].split('=')[1]);
console.log(name);
downloadElement.href = href
- downloadElement.download = name
+ downloadElement.download = '201975.xlsx'
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement) // 下载完成移除元素
From b2f0d818c8d2b09236865b9c5cc4fe6c9e8577c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Fri, 5 Jul 2019 13:39:05 +0800
Subject: [PATCH 3/9] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/courses/shixunHomework/Listofworks.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js
index 7dd49a203..d697694cb 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworks.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js
@@ -1403,7 +1403,7 @@ class Listofworks extends Component {
console.log(response.headers['content-disposition'].split('=')[1]);
console.log(name);
downloadElement.href = href
- downloadElement.download = '201975.xlsx'
+ downloadElement.download = name
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement) // 下载完成移除元素
From bca7a89c8c51cc0b22a942b415d9c16cc2c1c6a7 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 5 Jul 2019 14:11:31 +0800
Subject: [PATCH 4/9] && isAdmin
---
.../modules/courses/busyWork/reply/CommonWorkAppraiseReply.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js b/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js
index 146511712..e933bc411 100644
--- a/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js
+++ b/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js
@@ -277,7 +277,7 @@ class CommonWorkAppraiseReply extends Component{
showModulationtype={this.showModulationtype}
addSuccess={this.addSuccess} ref={this.editorRef} totalCount={comment_scores.length}
onReply={this.onReply} placeholder={"请在此输入对本作品的评语,最大限制2000个字符"}
- showSameScore={isGroup}
+ showSameScore={isGroup && isAdmin}
> }
{/* ${!!comment_scores.length ? 'bor-bottom-greyE' : ''} */}
From 4a023f553d068b5a854e9d47447e57348d729568 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Fri, 5 Jul 2019 14:13:22 +0800
Subject: [PATCH 5/9] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/exercise/Studentshavecompletedthelist.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
index a3ee9ef1a..f35e17ab7 100644
--- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
+++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
@@ -760,7 +760,9 @@ class Studentshavecompletedthelist extends Component {
{record.operating==="--"?
{record.operating}
- :
+ :record.submitstate === "未提交"?
+ --
+ :
{record.operating}
}
@@ -954,6 +956,9 @@ class Studentshavecompletedthelist extends Component {
{record.finalscore==="--"?
--
+ :record.submitstate === "未提交"?
+ --
:
{record.finalscore}
@@ -1141,6 +1146,9 @@ class Studentshavecompletedthelist extends Component {
{record.finalscore==="--"?
--
+ :record.submitstate === "未提交"?
+ --
:
{record.finalscore}
From 00053c02e356e1b84b3b26deac2fea742d819cf1 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Fri, 5 Jul 2019 14:30:51 +0800
Subject: [PATCH 6/9] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E3=80=81=E6=AF=95?=
=?UTF-8?q?=E8=AE=BE=E9=80=89=E9=A2=98=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/graduation/topics/index.js | 2 +-
.../courses/poll/PollDetailTabForth.js | 68 +++----------------
.../src/modules/courses/poll/PollListItem.js | 2 +-
3 files changed, 11 insertions(+), 61 deletions(-)
diff --git a/public/react/src/modules/courses/graduation/topics/index.js b/public/react/src/modules/courses/graduation/topics/index.js
index 391bcac18..8ed3118b9 100644
--- a/public/react/src/modules/courses/graduation/topics/index.js
+++ b/public/react/src/modules/courses/graduation/topics/index.js
@@ -352,8 +352,8 @@ onBoardsNew=()=>{
(
{/* 参考普通作业 - 题库选用 */}
{/* this.useFromBank()}>题库选用 正式版没有,先隐藏*/}
+ < a href={`/api/courses/${this.props.match.params.coursesId}/graduation_topics/export.xlsx`} className={"fl color-blue mr30 font-16"}>导出
- < a href={`/api/courses/${this.props.match.params.coursesId}/graduation_topics/export.xlsx`} className={"color-blue mr20 font-16"}>导出
this.onBoardsNew()}>新建
):""
}
diff --git a/public/react/src/modules/courses/poll/PollDetailTabForth.js b/public/react/src/modules/courses/poll/PollDetailTabForth.js
index 3dff2bc87..e0cca8716 100644
--- a/public/react/src/modules/courses/poll/PollDetailTabForth.js
+++ b/public/react/src/modules/courses/poll/PollDetailTabForth.js
@@ -187,56 +187,6 @@ class PollDetailTabForth extends Component{
}
UnifiedSetting=()=>{
let { unit_e_tip , unit_p_tip , publish_time , end_time ,course_group }=this.state
- // 如果两个时间都没有填写或者只选择了截止时间则先保存设置然后弹出立即发布弹框
- // if ( !publish_time ){
- // if(moment(end_time,dataformat)<=moment()){
- // this.setState({
- // unit_e_tip:"截止时间不能小于当前时间"
- // })
- // }else{
- // this.setState({
- // unit_e_tip:""
- // })
-
- // let list=[];
- // let pollId=this.props.match.params.pollId;
- // let coursesId=this.props.match.params.coursesId;
- // let url=`/courses/${coursesId}/polls/publish_modal.json`;
- // axios.get(url,{
- // params:{
- // check_ids:[pollId]
- // }
- // }).then((response) => {
- // if(response.data.course_info){
- // for(var i=0;i 0 ? 1 : 2,
- // visible:true,
- // Topval:"本操作只对“未发布”的对象生效",
- // Botvalleft:"暂不发布",
- // Botval:"则通过后续手动设置,定时发布",
- // starttime:"发布时间:"+this.props.getNowFormatDates(1),
- // endtime:"截止时间:" + moment(end_time || this.props.getNowFormatDates(2)).format(dataformat),
- // Cancelname:"暂不发布",
- // Savesname:"立即发布",
- // Cancel:this.homeworkhide,
- // Saves:this.homeworkstartend,
- // publishCourse:list,
- // publish_time:this.props.getNowFormatDates(1)
- // })
- // }
- // }).catch((error)=>{
- // console.log(error);
- // })
-
- // }
- // }
if( this.state.un_change_unified == false){
if ( !publish_time ){
this.setState({
@@ -275,16 +225,16 @@ class PollDetailTabForth extends Component{
unit_e_tip:""
})
}
- this.commitSetting((result)=>{
- if(result.status==200){
- this.props.showNotification(`${result.data.message}`);
- this.getSettingInfo();
- this.setState({
- flagPageEdit:false
- })
- }
- })
}
+ this.commitSetting((result)=>{
+ if(result.status==200){
+ this.props.showNotification(`${result.data.message}`);
+ this.getSettingInfo();
+ this.setState({
+ flagPageEdit:false
+ })
+ }
+ })
}
// 非统一设置提交
diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js
index 8c1d814ed..16770ce43 100644
--- a/public/react/src/modules/courses/poll/PollListItem.js
+++ b/public/react/src/modules/courses/poll/PollListItem.js
@@ -60,7 +60,7 @@ class PollListItem extends Component{
}
{
item.polls_status ==1 && item.publish_time ==null && item.created_at &&
- 创建于{moment(item.created_at).format(dataformat)}
+ 创建于{moment(item.created_at).fromNow()}
}
{
item.polls_status ==1 && item.publish_time !=null &&
From d54294c600f2609baad0fc52fb600a15d877e7a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Fri, 5 Jul 2019 14:33:08 +0800
Subject: [PATCH 7/9] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/courses/poll/PollNew.js | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js
index 0316cd8fe..63143c59a 100644
--- a/public/react/src/modules/courses/poll/PollNew.js
+++ b/public/react/src/modules/courses/poll/PollNew.js
@@ -2763,7 +2763,17 @@ class PollNew extends Component {
- : ""
+ :
+
+
+ this.deleteadddom(indexo)}>取消
+ this.deleteadddomthree(indexo, itemo)}>保存
+ this.deleteadddomtwo(indexo, itemo)}>保存并继续
+
+
)
: itemo.question.question_type === 3 ?
From f04f6f7e5ebe47e1b519643e175fca75d71ce6f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Fri, 5 Jul 2019 15:17:43 +0800
Subject: [PATCH 8/9] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/shixunHomework/Listofworks.js | 14 ++--
.../shixunHomework/ShixunStudentWork.js | 75 ++++++++++++++++++-
2 files changed, 79 insertions(+), 10 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js
index d697694cb..17b9179d4 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworks.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js
@@ -115,6 +115,7 @@ class Listofworks extends Component {
key: 'name',
align: 'center',
className:'font-14',
+ width:'120px',
render: (text, record) => (
{record.name}
)
@@ -139,7 +140,7 @@ class Listofworks extends Component {
dataIndex: 'classroom',
align: 'center',
className:'font-14',
- width:'288px',
+ width:"260px",
render: (text, record) => (
{record.classroom}
)
@@ -239,9 +240,9 @@ class Listofworks extends Component {
:
-
+
--
-
+
)
:
(
{record.name}
)
@@ -391,7 +393,7 @@ class Listofworks extends Component {
dataIndex: 'classroom',
align: 'center',
className:'font-14',
- width:'288px',
+ width:"260px",
render: (text, record) => (
{record.classroom}
)
@@ -491,9 +493,9 @@ class Listofworks extends Component {
:
-
+
--
-
+
)
:
{
+ console.log("internshipreport");
+ // var homeworkid = this.props.match.params.homeworkid;
+ // let url = "/zip/shixun_report";
+ axios.get(url).then((response) => {
+ console.log("326");
+ console.log(response);
+ if(response.data.status&&response.data.status===-1){
+
+
+ }else if(response.data.status&&response.data.status===-2){
+
+ }else{
+ window.open("/api"+url, '_blank');
+ }
+
+ }).catch((error) => {
+ console.log(error)
+ });
+ }
+
+ // 课堂学生成绩的导出下载
+ Classstudentachievement = (url) => {
+ console.log("Classstudentachievement");
+ // const course_id = this.props.match.params.coursesId;
+ // let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx";
+ axios.get(url).then((response) => {
+ console.log("1374");
+ console.log(response);
+ if(response.data.status&&response.data.status===-1){
+ }else if(response.data.status&&response.data.status===-2){
+
+ }else{
+ window.open("/api"+url, '_blank');
+
+ }
+ }).catch((error) => {
+ console.log(error)
+ });
+ }
+
render() {
let {
data,
@@ -606,10 +648,35 @@ class ShixunStudentWork extends Component {
设置
- {this.props.isAdmin() ? 导出 : ""}
+
+ {this.props.isAdmin() ?
+ 导出
+
+ : ""}
{this.props.isAdmin()?
data&&data.end_immediately===true?
立即截止 : "" : ""}
From d6fe4bee4094f0c32000cbd1e285151491c2e553 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Fri, 5 Jul 2019 15:45:58 +0800
Subject: [PATCH 9/9] b
---
public/react/src/modules/courses/shixunHomework/Listofworks.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js
index 17b9179d4..09516a5f9 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworks.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js
@@ -1404,6 +1404,7 @@ class Listofworks extends Component {
const name = decodeURI(response.headers['content-disposition'].split('=')[1])
console.log(response.headers['content-disposition'].split('=')[1]);
console.log(name);
+ console.log(decodeURIComponent(response.headers['content-disposition'].split('=')[1]));
downloadElement.href = href
downloadElement.download = name
document.body.appendChild(downloadElement)