From 5e12bc722553f362897be5da5d78d91be30918bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 30 Dec 2019 16:26:51 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/shixunHomework.js | 39 ++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 4705e7a8f..36d5129f5 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -1,12 +1,10 @@ import React,{ Component } from "react"; -import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin } from "antd"; -import { WordsBtn,on, off, trigger } from 'educoder'; -import {BrowserRouter as Router,Route,Switch,Link} from 'react-router-dom'; +import { Input,Checkbox, Pagination,Menu, AutoComplete,Spin } from "antd"; +import { WordsBtn,on, trigger } from 'educoder'; +import {Link} from 'react-router-dom'; import axios from'axios'; import HomeworkModal from "../coursesPublic/HomeworkModal"; -import OneSelfOrderModal from "../coursesPublic/OneSelfOrderModal"; -import ShixunModal from "../coursesPublic/ShixunModal"; -import PathModal from "../coursesPublic/PathModal"; + import NewShixunModel from '../coursesPublic/NewShixunModel'; import AddcoursesNav from "../coursesPublic/AddcoursesNav"; import Modals from '../../modals/Modals'; @@ -16,7 +14,7 @@ import '../css/busyWork.css' import ShixunhomeWorkItem from "./ShixunhomeWorkItem"; import NoneData from "../coursesPublic/NoneData"; -const Search = Input.Search; + class ShixunHomework extends Component{ constructor(props){ @@ -1212,12 +1210,27 @@ class ShixunHomework extends Component{
新增
-智能组卷
+人工组卷
+前端开发评测试题1
试题数:35
+总分:100
+难度:适中
++ 更新时间:2019-12-09 + +
++ 使用次数:1245 +
++ 创建者:王老师 +
+ +发起考试
+暂时还没有相关数据哦!
+{this.state.searchtypes===false?"暂时还没有相关数据哦!":"抱歉没有您要搜索的内容,请换个词语试试看"}
暂时还没有相关数据哦!
+{this.state.searchtypes===false?"暂时还没有相关数据哦!":"抱歉没有您要搜索的内容,请换个词语试试看"}
暂时还没有相关数据哦!
+{searchtypes===true?"抱歉没有您要搜索的内容,请换个词语试试看":"暂时还没有相关数据哦!"}
) } diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 84a04687e..8c73793f1 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -2961,10 +2961,9 @@ class Listofworksstudentone extends Component { } //搜索学生 文字输入 inputSearchValuest = (e) => { - // console.log(e.target.value) - if (e.target.value === "") { + if (e.target.value === ""||e.target.value===undefined) { this.setState({ - searchtext: undefined + searchtext: undefined, }) } else { this.setState({ From 827d8b568c624bf4d4d835adcfc607e63f92e64e Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 2 Jan 2020 09:56:42 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 15 +++++++++++++-- config/routes.rb | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 4f2a19536..c641231a6 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -19,7 +19,7 @@ class ShixunsController < ApplicationController :add_file, :jupyter_exec] before_action :allowed, only: [:update, :close, :update_propaedeutics, :settings, :publish, :apply_public, - :shixun_members_added, :change_manager, :collaborators_delete, + :shixun_members_added, :change_manager, :collaborators_delete, :upload_git_file, :cancel_apply_public, :cancel_publish, :add_collaborators, :add_file] before_action :portion_allowed, only: [:copy] @@ -883,7 +883,18 @@ class ShixunsController < ApplicationController author_name = current_user.real_name author_email = current_user.git_mail @content = update_file_content content, @repo_path, @path, author_email, author_name, "Edit by browser" - end + end + + def upload_git_file + upload_file = params["file"] + uid_logger("#########################file_params####{params["#{params[:file]}"]}") + raise "未上传文件" unless upload_file + 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") + render_ok + end def add_collaborators member_ids = "(" + @shixun.shixun_members.map(&:user_id).join(',') + ")" diff --git a/config/routes.rb b/config/routes.rb index b61b2e608..69d6d9377 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -279,6 +279,7 @@ Rails.application.routes.draw do post :set_secret_dir post :commits post :file_content + post :upload_git_file post :update_file post :close post :add_file From 8dd3414c37eddf08bccf661f9682f22fd945a674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 2 Jan 2020 10:06:38 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/Question.js | 26 ++++++++-------- .../question/questioncss/questioncom.css | 4 ++- .../src/modules/testpaper/Testpaperlibrary.js | 26 ++++++++++++++-- .../testpaper/component/Contentpart.js | 3 ++ .../modules/testpaper/component/Listjihe.js | 31 +++++++++++-------- .../testpaper/testioncss/testioncss.css | 8 ++++- 6 files changed, 68 insertions(+), 30 deletions(-) diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index 2da5f0d0e..26b909fea 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -394,19 +394,19 @@ class Question extends Component { this.setState({ keywords: e.target.value }) - var data = { - discipline_id:this.state.discipline_id, - sub_discipline_id:this.state.sub_discipline_id, - tag_discipline_id:this.state.tag_discipline_id, - public: this.state.defaultActiveKey, - difficulty: this.state.difficulty, - item_type: this.state.item_type, - keywords: e.target.value, - page: this.state.page, - per_page:10, - }; - - this.getdata(data); + // var data = { + // discipline_id:this.state.discipline_id, + // sub_discipline_id:this.state.sub_discipline_id, + // tag_discipline_id:this.state.tag_discipline_id, + // public: this.state.defaultActiveKey, + // difficulty: this.state.difficulty, + // item_type: this.state.item_type, + // keywords: e.target.value, + // page: this.state.page, + // per_page:10, + // }; + // + // this.getdata(data); } setdatafuns = (value) => { diff --git a/public/react/src/modules/question/questioncss/questioncom.css b/public/react/src/modules/question/questioncss/questioncom.css index 1eaed0f85..6c5e54924 100644 --- a/public/react/src/modules/question/questioncss/questioncom.css +++ b/public/react/src/modules/question/questioncss/questioncom.css @@ -258,8 +258,10 @@ width:70%; } .w30s{ - width:70%; + width:30%; } + + .w50s{ width: 50%; } diff --git a/public/react/src/modules/testpaper/Testpaperlibrary.js b/public/react/src/modules/testpaper/Testpaperlibrary.js index 4c2ae7a00..89768e2fc 100644 --- a/public/react/src/modules/testpaper/Testpaperlibrary.js +++ b/public/react/src/modules/testpaper/Testpaperlibrary.js @@ -35,7 +35,7 @@ class Testpaperlibrary extends Component { booljupyterurls:false, Contentdata:[], items_count:0, - + defaultActiveKey:"0", } } getContainer = () => { @@ -86,9 +86,28 @@ class Testpaperlibrary extends Component { this.getdata(data); } + setdatafunsval = (e) => { + this.setState({ + keywords: e.target.value + }) - callback=()=>{ + } + setdatafuns = (value) => { + this.setState({ + keywords: value, + }) + } + callback = (key) => { + this.setState({ + defaultActiveKey: key, + }) + var data={ + page:1, + per_page:10, + public:key, + } + this.getdata(data); } //搜索框的内容 @@ -217,6 +236,9 @@ class Testpaperlibrary extends Component {前端开发评测试题1
{names}
试题数:35
-总分:100
-难度:适中
+试题数:{question_counts}
+总分:{total_scores}
+难度:{difficultys}
- 更新时间:2019-12-09 + 更新时间:{update_times}
-- 使用次数:1245 +
+ 使用次数:{quotess}
-- 创建者:王老师 +
+ 创建者:{authors}
删除 diff --git a/public/react/src/modules/testpaper/testioncss/testioncss.css b/public/react/src/modules/testpaper/testioncss/testioncss.css index fb4bf231b..6cfb3a724 100644 --- a/public/react/src/modules/testpaper/testioncss/testioncss.css +++ b/public/react/src/modules/testpaper/testioncss/testioncss.css @@ -258,7 +258,13 @@ width:70%; } .w30s{ - width:70%; + width:30%; +} +.w60s{ + width:60%; +} +.w40s{ + width:40%; } .w50s{ width: 50%; From 54474ccbb5706bcaaf51115baf719d0ba93a71f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 2 Jan 2020 10:12:36 +0800 Subject: [PATCH 13/13] =?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/busyWork/CommonWorkList.js | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index d60f68b22..35b2a1ee8 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -403,7 +403,8 @@ class CommonWorkList extends Component{ left_time: {}, category: {}, b_order: 'desc', - searchtypes:false + searchtypes:false, + loadingstate:false } } onTablePagination = (page) => { @@ -420,9 +421,11 @@ class CommonWorkList extends Component{ }) }else{ this.setState({ - searchtypes:true + searchtypes:true, + loadingstate:true }) } + this.fetchList() } onSearchValueInput = (e) => { @@ -482,7 +485,8 @@ class CommonWorkList extends Component{ if (response.data) { this.setState({ ...response.data, - isSpin:false + isSpin:false, + loadingstate:false }) this.props.initWorkDetailCommonState && this.props.initWorkDetailCommonState( Object.assign({...response.data}, { @@ -492,7 +496,8 @@ class CommonWorkList extends Component{ }).catch((error)=>{ console.log(error) this.setState({ - isSpin:false + isSpin:false, + loadingstate:false }) }) @@ -850,9 +855,9 @@ class CommonWorkList extends Component{