diff --git a/controllers/project.go b/controllers/project.go
index fe4b4be..d7bd398 100644
--- a/controllers/project.go
+++ b/controllers/project.go
@@ -227,7 +227,6 @@ func (p *ProjectController) UpdateProjectWeight() {
}
pid, err := p.GetInt64(":id")
learnMinuteWeight, err := p.GetInt("learnMinuteWeight")
- learnMinute, err := p.GetInt("learnMinute")
if err != nil {
resp = Response{
@@ -241,7 +240,6 @@ func (p *ProjectController) UpdateProjectWeight() {
project := models.Project{
Id: pid,
LearnMinuteWeight: learnMinuteWeight,
- LearnMinute: learnMinute,
}
tasks := make([]models.Task, 0)
err = json.Unmarshal([]byte(p.GetString("tasks")), &tasks)
diff --git a/controllers/task.go b/controllers/task.go
index e3a8bcf..0250d16 100644
--- a/controllers/task.go
+++ b/controllers/task.go
@@ -11,14 +11,14 @@ type TaskResponse struct {
Learning bool `json:"learning"`
}
-// GetSectionTasks
+// GetSectionTasksDetail
// @Title
-// @Description get all the tasks of a section
+// @Description get section tasks with submit and survey
// @Param sid path string true ""
-// @Success 200 {object}
+// @Success 200 {object} TaskResponse
// @Failure 400
// @router /:projectId/section/:sectionId/tasks [get]
-func (p *ProjectController) GetSectionTasks() {
+func (p *ProjectController) GetSectionTasksDetail() {
var resp TaskResponse
sid := p.GetString(":sectionId")
var learning bool
diff --git a/models/project.go b/models/project.go
index 7355d3d..bad0b6f 100644
--- a/models/project.go
+++ b/models/project.go
@@ -28,7 +28,6 @@ type Project struct {
Published bool `json:"published" xorm:"default false index"`
- LearnMinute int `json:"learnMinute" xorm:"default 10"`
LearnMinuteWeight int `json:"learnMinuteWeight" xorm:"default 100"`
}
diff --git a/openpbl-landing/src/pages/Project/ProjectInfo/component/StudentAdmin.jsx b/openpbl-landing/src/pages/Project/ProjectInfo/component/StudentAdmin.jsx
index 4c4cc00..fba6a0e 100644
--- a/openpbl-landing/src/pages/Project/ProjectInfo/component/StudentAdmin.jsx
+++ b/openpbl-landing/src/pages/Project/ProjectInfo/component/StudentAdmin.jsx
@@ -68,21 +68,23 @@ function StudentAdmin(obj) {
{util.FilterTime(joinTime)}
)
},
+ {
+ title: '',
+ dataIndex: 'showEvidence',
+ render: (text, item, index) => (
+
+
+
+ )
+ },
{
title: '操作',
dataIndex: 'action',
key: 'action',
- render: (action, record) => (
- <>
-
-
- } style={{marginRight: '30px', width: '50px'}}/>
-
-
- removeStudent(action, record)}>
+ render: (action, item) => (
+ removeStudent(action, item)}>
- >
)
},
]}
diff --git a/routers/commentsRouter_controllers.go b/routers/commentsRouter_controllers.go
index ddfd85d..7047aa9 100644
--- a/routers/commentsRouter_controllers.go
+++ b/routers/commentsRouter_controllers.go
@@ -45,18 +45,18 @@ func init() {
beego.GlobalControllerRouter["OpenPBL/controllers:ProjectController"] = append(beego.GlobalControllerRouter["OpenPBL/controllers:ProjectController"],
beego.ControllerComments{
- Method: "GetProjectDetail",
+ Method: "UpdateProject",
Router: "/:id",
- AllowHTTPMethods: []string{"get"},
+ AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})
beego.GlobalControllerRouter["OpenPBL/controllers:ProjectController"] = append(beego.GlobalControllerRouter["OpenPBL/controllers:ProjectController"],
beego.ControllerComments{
- Method: "UpdateProject",
+ Method: "GetProjectDetail",
Router: "/:id",
- AllowHTTPMethods: []string{"post"},
+ AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})
@@ -207,7 +207,7 @@ func init() {
beego.GlobalControllerRouter["OpenPBL/controllers:ProjectController"] = append(beego.GlobalControllerRouter["OpenPBL/controllers:ProjectController"],
beego.ControllerComments{
- Method: "GetSectionTasks",
+ Method: "GetSectionTasksDetail",
Router: "/:projectId/section/:sectionId/tasks",
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),