chen02
This commit is contained in:
parent
5f6e6555a8
commit
b5d846ccae
|
@ -0,0 +1,8 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="8" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
||||
</project>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" project-jdk-name="15" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/openscore.iml" filepath="$PROJECT_DIR$/.idea/openscore.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -2,15 +2,26 @@
|
|||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="90d49d24-cd7e-4f14-b075-c6e5fe5ae2ce" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/.idea/.gitignore" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/.idea/openscore.iml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/controllers/Administrator.go" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/controllers/supervisor.go" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/requests/supervisor.go" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/responses/supervisor.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/conf/mysql.conf" beforeDir="false" afterPath="$PROJECT_DIR$/conf/mysql.conf" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/controllers/base.go" beforeDir="false" afterPath="$PROJECT_DIR$/controllers/base.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/controllers/score.go" beforeDir="false" afterPath="$PROJECT_DIR$/controllers/score.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/lastupdate.tmp" beforeDir="false" afterPath="$PROJECT_DIR$/lastupdate.tmp" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/models/paperDistribution.go" beforeDir="false" afterPath="$PROJECT_DIR$/models/paperDistribution.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/models/scoreRecord.go" beforeDir="false" afterPath="$PROJECT_DIR$/models/scoreRecord.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/models/testPaper.go" beforeDir="false" afterPath="$PROJECT_DIR$/models/testPaper.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/models/topic.go" beforeDir="false" afterPath="$PROJECT_DIR$/models/topic.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/models/underCorrectedPaper.go" beforeDir="false" afterPath="$PROJECT_DIR$/models/underCorrectedPaper.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/models/user.go" beforeDir="false" afterPath="$PROJECT_DIR$/models/user.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/requests/test.go" beforeDir="false" afterPath="$PROJECT_DIR$/requests/test.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/routers/router.go" beforeDir="false" afterPath="$PROJECT_DIR$/routers/router.go" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
|
@ -54,13 +65,13 @@
|
|||
<option name="indexEntireGoPath" value="false" />
|
||||
</component>
|
||||
<component name="HighlightingSettingsPerFile">
|
||||
<setting file="file://$PROJECT_DIR$/controllers/supervisor.go" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/requests/supervisor.go" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/responses/test.go" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/controllers/base.go" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/controllers/Administrator.go" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/controllers/score.go" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/controllers/supervisor.go" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/controllers/base.go" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/controllers/default.go" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/controllers/Administrator.go" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/responses/test.go" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/requests/supervisor.go" root0="FORCE_HIGHLIGHTING" />
|
||||
</component>
|
||||
<component name="MavenImportPreferences">
|
||||
<option name="generalSettings">
|
||||
|
@ -85,7 +96,7 @@
|
|||
<property name="go.import.settings.migrated" value="true" />
|
||||
<property name="go.sdk.automatically.set" value="true" />
|
||||
<property name="go.tried.to.enable.integration.vgo.integrator" value="true" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
<property name="last_opened_file_path" value="$USER_HOME$/Desktop/open-ct" />
|
||||
<property name="node.js.detected.package.eslint" value="true" />
|
||||
<property name="node.js.detected.package.tslint" value="true" />
|
||||
<property name="node.js.selected.package.eslint" value="(autodetect)" />
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="8" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
||||
</project>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" project-jdk-name="15" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/openscore.iml" filepath="$PROJECT_DIR$/.idea/openscore.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -4,7 +4,7 @@ runmode = dev
|
|||
SessionOn = true
|
||||
copyrequestbody = true
|
||||
driverName = mysql
|
||||
dataSourceName = root:123@tcp(localhost:3306)/
|
||||
dataSourceName = root:cappuccino@tcp(localhost:3306)/
|
||||
dbName = casdoor
|
||||
authState = "casdoor"
|
||||
httpProxy = "127.0.0.1:10808"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
version: '3.1'
|
||||
services:
|
||||
# casdoor:
|
||||
# build:
|
||||
# context: ./
|
||||
# dockerfile: go-dockerfile
|
||||
# ports:
|
||||
# - 8000:8000
|
||||
# depends_on:
|
||||
# - db
|
||||
casdoor:
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: go-dockerfile
|
||||
ports:
|
||||
- 8000:8000
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
restart: always
|
||||
image: mysql:8.0.25
|
||||
|
|
|
@ -6,13 +6,9 @@ copyrequestbody = true
|
|||
sessionon = true
|
||||
casdoorEndpoint = http://localhost:8000
|
||||
# clientId = 70e1935bf72eb360d0fa
|
||||
# clientId = 1e1b5a3bd4a6a284553a
|
||||
# clientSecret = 4a350afb057ac3fea619c89bfcd316f51f788149
|
||||
clientId = 1e1b5a3bd4a6a284553a
|
||||
clientSecret = 4a350afb057ac3fea619c89bfcd316f51f788149
|
||||
# clientSecret = 636ab7ccf862b7e0fb4192c9989dc6e732756c5c
|
||||
|
||||
|
||||
clientId = 9162cb3914b3f1559e9e
|
||||
clientSecret =470d86682d57a75486ed9ae74e748cfbfa6c8774
|
||||
jwtSecret = CasdoorSecret
|
||||
casdoorOrganization = "built-in"
|
||||
include "mysql.conf"
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
[mysql]
|
||||
# MYSQL_HOST=127.0.0.1
|
||||
# MYSQL_PORT=3306
|
||||
# MYSQL_USER=root
|
||||
# MYSQL_PASSWORD=cappuccino
|
||||
# MYSQL_DATABASE=openct
|
||||
|
||||
|
||||
MYSQL_HOST=101.34.69.185
|
||||
MYSQL_PORT=3308
|
||||
MYSQL_USER=root
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
package controllers
|
|
@ -39,6 +39,10 @@ type TestPaperApiController struct {
|
|||
beego.Controller
|
||||
}
|
||||
|
||||
type SupervisorApiController struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
func (c *ApiController) GetSessionUser() *auth.Claims {
|
||||
s := c.GetSession("user")
|
||||
if s == nil {
|
||||
|
|
|
@ -299,7 +299,6 @@ func (c *TestPaperApiController) Problem() {
|
|||
userId := requestBody.UserId
|
||||
problemType := requestBody.ProblemType
|
||||
testId := requestBody.TestId
|
||||
problemMessage := requestBody.ProblemMessage
|
||||
|
||||
var underTest models.UnderCorrectedPaper
|
||||
var record models.ScoreRecord
|
||||
|
@ -321,13 +320,6 @@ func (c *TestPaperApiController) Problem() {
|
|||
newUnderTest.User_id = "10000"
|
||||
newUnderTest.Test_question_type = 6
|
||||
newUnderTest.Problem_type = problemType
|
||||
if problemType == 0 {
|
||||
newUnderTest.Problem_message = "The test is not clear"
|
||||
} else if problemType == 1 {
|
||||
newUnderTest.Problem_message = "Wrong question"
|
||||
} else {
|
||||
newUnderTest.Problem_message = problemMessage
|
||||
}
|
||||
has, _ := newUnderTest.IsDuplicate()
|
||||
if !has {
|
||||
err = newUnderTest.Save()
|
||||
|
@ -343,14 +335,6 @@ func (c *TestPaperApiController) Problem() {
|
|||
return
|
||||
}
|
||||
test.Question_status = 3
|
||||
test.Problem_type = problemType
|
||||
if problemType == 0 {
|
||||
test.Problem_message = "The test is not clear"
|
||||
} else if problemType == 1 {
|
||||
test.Problem_message = "Wrong question"
|
||||
} else {
|
||||
test.Problem_message = problemMessage
|
||||
}
|
||||
err = test.Update()
|
||||
if err != nil {
|
||||
resp := Response{"10005", "update testPaper fail", err}
|
||||
|
@ -522,76 +506,3 @@ func (c *TestPaperApiController) Review() {
|
|||
resp := Response{"10000", "ok", response}
|
||||
c.Data["json"] = resp
|
||||
}
|
||||
|
||||
func (c *TestPaperApiController) ReviewPoint() {
|
||||
defer c.ServeJSON()
|
||||
var requestBody requests.TestPoint
|
||||
err := json.Unmarshal(c.Ctx.Input.RequestBody, &requestBody)
|
||||
if err != nil {
|
||||
resp := Response{"10001", "cannot unmarshal", err}
|
||||
c.Data["json"] = resp
|
||||
return
|
||||
}
|
||||
log.Println(requestBody)
|
||||
userId := requestBody.UserId
|
||||
scoresstr := requestBody.Scores
|
||||
testId := requestBody.TestId
|
||||
testDetailIdstr := requestBody.TestDetailId
|
||||
scores := strings.Split(scoresstr, "-")
|
||||
testDetailIds := strings.Split(testDetailIdstr, "-")
|
||||
var scoreArr []int64
|
||||
var sum int64 = 0
|
||||
for _, i := range scores {
|
||||
j, err := strconv.ParseInt(i, 10, 64)
|
||||
sum += j
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
scoreArr = append(scoreArr, j)
|
||||
}
|
||||
|
||||
var test models.TestPaper
|
||||
err = test.GetTestPaper(testId)
|
||||
if err != nil || test.Test_id == 0 {
|
||||
resp := Response{"10002", "get test paper fail", err}
|
||||
c.Data["json"] = resp
|
||||
return
|
||||
}
|
||||
num := 0
|
||||
if test.Examiner_first_id == userId {
|
||||
num = 0
|
||||
test.Examiner_first_score = sum
|
||||
} else if test.Examiner_second_id == userId {
|
||||
num = 1
|
||||
test.Examiner_second_score = sum
|
||||
} else {
|
||||
num = 2
|
||||
test.Examiner_third_score = sum
|
||||
}
|
||||
err = test.Update()
|
||||
if err != nil || test.Test_id == 0 {
|
||||
resp := Response{"10003", "update test paper fail", err}
|
||||
c.Data["json"] = resp
|
||||
return
|
||||
}
|
||||
|
||||
for i := 0; i < len(testDetailIds); i++ {
|
||||
var testInfo models.TestPaperInfo
|
||||
testInfoId, _ := strconv.ParseInt(testDetailIds[i], 10, 64)
|
||||
testInfo.GetTestPaperInfo(testInfoId)
|
||||
if num == 0 {
|
||||
testInfo.Examiner_first_score = scoreArr[i]
|
||||
} else if num == 1 {
|
||||
testInfo.Examiner_second_score = scoreArr[i]
|
||||
} else {
|
||||
testInfo.Examiner_third_score = scoreArr[i]
|
||||
}
|
||||
err = testInfo.Update()
|
||||
if err != nil || test.Test_id == 0 {
|
||||
resp := Response{"10004", "update testinfo paper fail", err}
|
||||
c.Data["json"] = resp
|
||||
return
|
||||
}
|
||||
}
|
||||
c.Data["json"] = Response{"10000", "ok", nil}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1 +1 @@
|
|||
{"/home/cappuccino/Codes/open-ct/controllers":1629360447390750775}
|
||||
{"C:\\Users\\chen\\go\\src\\openscore\\controllers":1629735164262258600}
|
|
@ -21,3 +21,10 @@ func (u *PaperDistribution) GetPaperDistribution(id string) error {
|
|||
}
|
||||
return err
|
||||
}
|
||||
func FindPaperDistributionByQuestionId(paperDistributions *[]PaperDistribution,questionId int64) error{
|
||||
err:= x.Where("question_id = ?", questionId).Find(paperDistributions)
|
||||
if err!=nil {
|
||||
log.Println("FindPaperDistributionByQuestionId err ")
|
||||
}
|
||||
return err
|
||||
}
|
|
@ -16,6 +16,7 @@ type ScoreRecord struct {
|
|||
Score int64 `json:"score"`
|
||||
Test_record_type int64 `json:"test_record_type"`
|
||||
Problem_type int64 `json:"problem_type" xorm:"default(-1)"`
|
||||
Test_finish int64 `json:"test_finish"`
|
||||
}
|
||||
|
||||
func (s *ScoreRecord) GetTopic(id int64) error {
|
||||
|
@ -43,3 +44,121 @@ func GetLatestRecords(userId string, records *[]ScoreRecord) error {
|
|||
|
||||
return err
|
||||
}
|
||||
func CountSelfScore(userId string,questionId int64)(count int64,err error) {
|
||||
record :=new (ScoreRecord)
|
||||
count, err1 := x.Where("question_id = ?", questionId).Where("test_record_type=0").Where("user_id=?", userId).Count(record)
|
||||
if err!=nil {
|
||||
log.Println("CountFailTestNumberByUserId err ")
|
||||
}
|
||||
return count ,err1
|
||||
}
|
||||
func CountFailTestNumberByUserId(userId string,questionId int64)(count int64,err error) {
|
||||
record :=new (ScoreRecord)
|
||||
count, err1 := x.Where("question_id = ?", questionId).Where("test_record_type=5").Where("user_id=?", userId).Count(record)
|
||||
if err!=nil {
|
||||
log.Println("CountFailTestNumberByUserId err ")
|
||||
}
|
||||
return count,err1
|
||||
}
|
||||
func CountProblemNumberByQuestionId(questionId int64)(count int64) {
|
||||
record :=new (ScoreRecord)
|
||||
count, err := x.Where("question_id = ?", questionId).Where("test_record_type=?",5).Count(record)
|
||||
if err!=nil {
|
||||
log.Println("CountProblemNumberByQuestionId err ")
|
||||
}
|
||||
return count
|
||||
}
|
||||
func CountArbitramentFinishNumberByQuestionId(questionId int64)(count int64,err error) {
|
||||
record :=new (ScoreRecord)
|
||||
count, err1 := x.Where("question_id = ?", questionId).Where("test_record_type=?",4).Count(record)
|
||||
if err!=nil {
|
||||
log.Println("CountArbitramentFinishNumberByQuestionId err ")
|
||||
}
|
||||
return count,err1
|
||||
}
|
||||
|
||||
|
||||
|
||||
func CountFinishScoreNumberByQuestionId(questionId int64)(count int64 ,err error) {
|
||||
record :=new (ScoreRecord)
|
||||
count, err1 := x.Where("question_id = ?", questionId).Where("test_finish=1").Count(record)
|
||||
if err!=nil {
|
||||
log.Println("CountFinishScoreNumberByQuestionId err ")
|
||||
}
|
||||
return count,err1
|
||||
}
|
||||
|
||||
func CountFirstScoreNumberByQuestionId(questionId int64)(count int64 ,err error) {
|
||||
record :=new (ScoreRecord)
|
||||
count, err1:= x.Where("question_id = ?", questionId).Where("test_record_type=?",1).Count(record)
|
||||
if err!=nil {
|
||||
log.Println("CountFirstScoreNumberByQuestionId err ")
|
||||
}
|
||||
return count ,err1
|
||||
}
|
||||
func CountSecondScoreNumberByQuestionId(questionId int64)(count int64 ,err error) {
|
||||
record :=new (ScoreRecord)
|
||||
count, err1 := x.Where("question_id = ?", questionId).Where("test_record_type=?",2).Count(record)
|
||||
if err!=nil {
|
||||
log.Println("CountSecondScoreNumberByQuestionId err ")
|
||||
}
|
||||
return count,err1
|
||||
}
|
||||
func CountThirdScoreNumberByQuestionId(questionId int64)(count int64,err error) {
|
||||
record :=new (ScoreRecord)
|
||||
count, err1 := x.Where("question_id = ?", questionId).Where("test_record_type=?",3).Count(record)
|
||||
if err!=nil {
|
||||
log.Println("CountThirdScoreNumberByQuestionId err ")
|
||||
}
|
||||
return count,err1
|
||||
}
|
||||
func CountFinishTestNumberByUserId(userId string,questionId int64)(count int64,err1 error) {
|
||||
record :=new (ScoreRecord)
|
||||
count, err := x.Where("question_id = ?", questionId).Where("test_finish=1").Where("user_id=?", userId).Count(record)
|
||||
if err!=nil {
|
||||
log.Println("CountFinishTestNumberByUserId err ")
|
||||
}
|
||||
return count,err
|
||||
}
|
||||
func SumFinishScore(userId string,questionId int64)(sum float64,err1 error) {
|
||||
record :=new (ScoreRecord)
|
||||
sum, err := x.Where("question_id = ?", questionId).Where("test_record_type!=0").Where("user_id=?", userId).Sum(record,"score")
|
||||
if err!=nil {
|
||||
log.Println("SumFinishScore err ")
|
||||
}
|
||||
return sum,err
|
||||
}
|
||||
func FindFinishScoreRecordListByQuestionId (scoreRecordList *[]ScoreRecord , questionId int64) error{
|
||||
err := x.Where("question_id = ?",questionId).Find(scoreRecordList)
|
||||
if err!=nil {
|
||||
log.Println("FindFinishScoreRecordListByQuestionId err ")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func FindSelfScoreRecordByUserId(selfScoreRecord *[] ScoreRecord,examinerId string)error {
|
||||
|
||||
err := x.Where("user_id=?", examinerId).Where("test_score_type =?",0).Find(selfScoreRecord)
|
||||
if err!=nil {
|
||||
log.Println("FindSelfScoreRecordByUserId err ")
|
||||
}
|
||||
return err
|
||||
|
||||
}
|
||||
func GetTestScoreRecordByTestIdAndUserId(testScoreRecord *ScoreRecord,testId int64,examinerId string) error {
|
||||
|
||||
_, err := x.Where("user_id=?", examinerId).Where("test_id =?", testId).Where(" test_score_type !=?", 0).Get(testScoreRecord)
|
||||
if err!=nil {
|
||||
log.Println("FindSelfScoreRecordByUserId err ")
|
||||
}
|
||||
return err
|
||||
}
|
||||
func CountTestByScore(question int64, score int64) (count int64,err1 error){
|
||||
scoreRecord := new(ScoreRecord)
|
||||
count, err := x.Where("score = ?", score).Where("question_id=?",question).Count(scoreRecord)
|
||||
if err!=nil {
|
||||
log.Println("CountTestByScored err ")
|
||||
}
|
||||
return count,err
|
||||
}
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@ type TestPaper struct {
|
|||
Final_score int64 `json:"final_score"`
|
||||
Final_score_id string `json:"finale_score_id"`
|
||||
Pratice_error int64 `json:"pratice_error"`
|
||||
Problem_type int64 `json:"problem_type"`
|
||||
Problem_message string `json:"problem_message"`
|
||||
}
|
||||
|
||||
func (t *TestPaper) GetTestPaperByQuestionIdAndQuestionStatus(question_id int64, question_statue int64) error {
|
||||
|
@ -62,3 +60,11 @@ func (t *TestPaper) Update() error {
|
|||
}
|
||||
return err
|
||||
}
|
||||
func CountProblemFinishNumberByQuestionId(questionId int64)(count int64,err error) {
|
||||
record :=new (ScoreRecord)
|
||||
count, err1 := x.Where("question_id = ?", questionId).Where("test_record_type=?",6).Count(record)
|
||||
if err!=nil {
|
||||
log.Println("CountProblemFinishNumberByQuestionId err ")
|
||||
}
|
||||
return count,err1
|
||||
}
|
||||
|
|
|
@ -37,3 +37,10 @@ func GetDistributedTestIdPaperByUserId(id string, up *[]int64) error {
|
|||
}
|
||||
return err
|
||||
}
|
||||
func GetTopicList ( topics *[]Topic) error{
|
||||
err := x.Find(topics)
|
||||
if err!=nil {
|
||||
log.Println("GetTopicList err ")
|
||||
}
|
||||
return err
|
||||
}
|
|
@ -13,7 +13,7 @@ type UnderCorrectedPaper struct {
|
|||
Question_id int64 `json:"question_id"`
|
||||
Test_question_type int64 `json:"test_question_type"`
|
||||
Problem_type int64 `json:"problem_type" xorm:"default(-1)"`
|
||||
Problem_message string `json:"problem_message"`
|
||||
Problem_message string `json:"test_message"`
|
||||
}
|
||||
|
||||
func (u *UnderCorrectedPaper) GetUnderCorrectedPaper(userId string, testId int64) error {
|
||||
|
@ -58,3 +58,55 @@ func GetDistributedPaperByUserId(id string, up *[]UnderCorrectedPaper) error {
|
|||
}
|
||||
return err
|
||||
}
|
||||
func CountRemainingTestNumberByUserId(questionId int64 ,userId string)(count int64,err error) {
|
||||
underCorrectedPaper:=new (UnderCorrectedPaper)
|
||||
count, err1 := x.Where("question_id = ?", questionId).Where("user_id=?",userId).Count(underCorrectedPaper)
|
||||
if err!=nil {
|
||||
log.Println("CountRemainingTestNumberByUserId err ")
|
||||
}
|
||||
return count,err1
|
||||
}
|
||||
func CountArbitramentUnFinishNumberByQuestionId(questionId int64 )(count int64,err error) {
|
||||
underCorrectedPaper:=new (UnderCorrectedPaper)
|
||||
count, err1 := x.Where("question_id = ?", questionId).Where("test_question_type=4").Count(underCorrectedPaper)
|
||||
if err!=nil {
|
||||
log.Println("CountRemainingTestNumberByUserId err ")
|
||||
}
|
||||
return count,err1
|
||||
}
|
||||
func CountProblemUnFinishNumberByQuestionId(questionId int64 )(count int64,err error) {
|
||||
underCorrectedPaper:=new (UnderCorrectedPaper)
|
||||
count, err1 := x.Where("question_id = ?", questionId).Where("test_question_type=6").Count(underCorrectedPaper)
|
||||
if err!=nil {
|
||||
log.Println("CountProblemUnFinishNumberByQuestionId err ")
|
||||
}
|
||||
return count,err1
|
||||
}
|
||||
|
||||
func GetUnderCorrectedPaperByUserIdAndTestId(underCorrectedPaper * UnderCorrectedPaper ,userId string,testId int64) error {
|
||||
|
||||
_, err := x.Where("user_id=?", userId).Where("test_id =?", testId).Where(" test_question_type !=?", 0).Get(underCorrectedPaper)
|
||||
if err!=nil {
|
||||
log.Println("GetUnderCorrectedPaperByUserIdAndTestId err ")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
func FindArbitramentUnderCorrectedPaperByQuestionId(arbitramentUnderCorrectedPaper *[] UnderCorrectedPaper,questionId int64)error{
|
||||
|
||||
err := x.Where("question_id=?", questionId).Where(" test_score_type =?", 4).Find(arbitramentUnderCorrectedPaper)
|
||||
if err!=nil {
|
||||
log.Println("FindArbitramentUnderCorrectedPaperByQuestionId err ")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func FindProblemUnderCorrectedPaperByQuestionId(problemUnderCorrectedPaper *[] UnderCorrectedPaper,questionId int64) error{
|
||||
|
||||
err := x.Where("question_id=?", questionId).Where(" test_question_type =?", 6).Find(problemUnderCorrectedPaper)
|
||||
if err!=nil {
|
||||
log.Println("FindProblemUnderCorrectedPaperByQuestionId err ")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ type User struct {
|
|||
IsDistribute int64 `json:"isDistribute"`
|
||||
}
|
||||
|
||||
func (u *User) GetUser(id int64) error {
|
||||
func (u *User) GetUser(id string) error {
|
||||
has, err := x.Where(builder.Eq{"user_id": id}).Get(u)
|
||||
if !has || err != nil {
|
||||
log.Println("could not found user")
|
||||
|
|
25
openct.http
25
openct.http
|
@ -6,12 +6,12 @@
|
|||
# "testId":1
|
||||
# }
|
||||
|
||||
# POST http://localhost:8080/openct/marking/score/test/list HTTP/1.1
|
||||
# Content-Type: application/json
|
||||
POST http://localhost:8080/openct/marking/score/test/list HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
# {
|
||||
# "userId":"1"
|
||||
# }
|
||||
{
|
||||
"userId":"1"
|
||||
}
|
||||
|
||||
# POST http://localhost:8080/openct/marking/score/test/point HTTP/1.1
|
||||
# Content-Type: application/json
|
||||
|
@ -23,15 +23,14 @@
|
|||
# "testDetailId": "109-110-111"
|
||||
# }
|
||||
|
||||
POST http://localhost:8080/openct/marking/score/test/problem HTTP/1.1
|
||||
Content-Type: application/json
|
||||
# POST http://localhost:8080/openct/marking/score/test/problem HTTP/1.1
|
||||
# Content-Type: application/json
|
||||
|
||||
{
|
||||
"userId":"1",
|
||||
"problemType": 2,
|
||||
"testId":50,
|
||||
"problemMessage": "test paper"
|
||||
}
|
||||
# {
|
||||
# "userId":"1",
|
||||
# "problemType": "2",
|
||||
# "testId":38
|
||||
# }
|
||||
|
||||
# POST http://localhost:8080/openct/marking/score/test/answer HTTP/1.1
|
||||
# Content-Type: application/json
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
package requests
|
||||
type QuestionList struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
}
|
||||
type UserInfo struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
}
|
||||
type ScoreDistribution struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
QuestionId int64 `joson:"questionId"`
|
||||
}
|
||||
type TeachersByQuestion struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
QuestionId int64 `joson:"questionId"`
|
||||
}
|
||||
type SelfScore struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
ExaminerId string `joson:"examinerId"`
|
||||
}
|
||||
type AverageScore struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
QuestionId int64 `joson:"questionId"`
|
||||
}
|
||||
type ProblemTest struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
QuestionId int64 `joson:"questionId"`
|
||||
}
|
||||
type ArbitramentTest struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
QuestionId int64 `joson:"questionId"`
|
||||
}
|
||||
type TeacherMonitoring struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
|
||||
QuestionId int64 `joson:"questionId"`
|
||||
}
|
||||
type SupervisorPoint struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
TestId int64 `joson:"testId"`
|
||||
TestDetailIds string `joson:"testDetailIds"`
|
||||
Scores string `joson:"scores"`
|
||||
|
||||
}
|
||||
|
||||
type ScoreProgress struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
}
|
|
@ -17,10 +17,9 @@ type TestPoint struct {
|
|||
}
|
||||
|
||||
type TestProblem struct {
|
||||
UserId string `json:"userId"`
|
||||
ProblemType int64 `json:"problemType"`
|
||||
ProblemMessage string `json:"problemMessage"`
|
||||
TestId int64 `json:"testId"`
|
||||
UserId string `json:"userId"`
|
||||
ProblemType int64 `json:"problemType"`
|
||||
TestId int64 `json:"testId"`
|
||||
}
|
||||
|
||||
type TestAnswer struct {
|
||||
|
|
|
@ -0,0 +1,120 @@
|
|||
package responses
|
||||
|
||||
type QuestionListVO struct {
|
||||
QuestionId int64
|
||||
QuestionName string
|
||||
}
|
||||
|
||||
type UserInfoVO struct {
|
||||
UserName string
|
||||
SubjectName string
|
||||
}
|
||||
|
||||
type TeacherMonitoringVO struct {
|
||||
UserId string
|
||||
UserName string
|
||||
TestDistributionNumber int64
|
||||
TestSuccessNumber int64
|
||||
TestRemainingNumber int64
|
||||
TestProblemNumber int64
|
||||
MarkingSpeed float64
|
||||
AverageScore float64
|
||||
Validity float64
|
||||
StandardDeviation float64
|
||||
EvaluationIndex float64
|
||||
OnlineTime float64
|
||||
}
|
||||
|
||||
type ScoreDistributionVO struct {
|
||||
Score int64
|
||||
Rate float64
|
||||
}
|
||||
|
||||
type TeacherVO struct {
|
||||
UserId string
|
||||
UserName string
|
||||
}
|
||||
|
||||
type SelfScoreRecordVO struct {
|
||||
TestId int64
|
||||
Score int64
|
||||
SelfScore int64
|
||||
|
||||
}
|
||||
type ScoreAverageVO struct {
|
||||
UserId string
|
||||
UserName string
|
||||
Average float64
|
||||
|
||||
}
|
||||
type ProblemUnderCorrectedPaperVO struct {
|
||||
|
||||
TestId int64
|
||||
ExaminerId string
|
||||
ExaminerName string
|
||||
ProblemType int64
|
||||
ProblemMes string
|
||||
}
|
||||
|
||||
type ArbitramentTestVO struct {
|
||||
TestId int64
|
||||
ExaminerFirstId string
|
||||
ExaminerFirstName string
|
||||
ExaminerFirstScore int64
|
||||
ExaminerSecondId string
|
||||
ExaminerSecondName string
|
||||
ExaminerSecondScore int64
|
||||
PracticeError int64
|
||||
StandardError int64
|
||||
|
||||
}
|
||||
|
||||
type ScoreProgressVO struct {
|
||||
QuestionId int64
|
||||
QuestionName string
|
||||
SubjectName string
|
||||
ImportNumber int64
|
||||
AverageScore float64
|
||||
|
||||
FinishNumber int64
|
||||
FinishRate float64
|
||||
UnfinishedNumber float64
|
||||
UnfinishedRate float64
|
||||
IsAllFinished int64
|
||||
//AverageSpeed float64
|
||||
FirstFinishedNumber int64
|
||||
FirstFinishedRate float64
|
||||
FirstUnfinishedNumber float64
|
||||
FirstUnfinishedRate float64
|
||||
IsFirstFinished int64
|
||||
|
||||
SecondFinishedNumber int64
|
||||
SecondFinishedRate float64
|
||||
SecondUnfinishedNumber float64
|
||||
SecondUnfinishedRate float64
|
||||
IsSecondFinished int64
|
||||
|
||||
ThirdFinishedNumber int64
|
||||
ThirdFinishedRate float64
|
||||
ThirdUnfinishedNumber float64
|
||||
ThirdUnfinishedRate float64
|
||||
IsThirdFinished int64
|
||||
|
||||
ArbitramentNumber int64
|
||||
ArbitramentRate float64
|
||||
ArbitramentFinishedNumber int64
|
||||
ArbitramentFinishedRate float64
|
||||
ArbitramentUnfinishedNumber int64
|
||||
ArbitramentUnfinishedRate float64
|
||||
IsArbitramentFinished int64
|
||||
|
||||
|
||||
ProblemNumber int64
|
||||
ProblemRate float64
|
||||
ProblemFinishedNumber int64
|
||||
ProblemFinishedRate float64
|
||||
ProblemUnfinishedNumber int64
|
||||
ProblemUnfinishedRate float64
|
||||
IsProblemFinished int64
|
||||
}
|
||||
|
|
@ -27,7 +27,26 @@ func init() {
|
|||
beego.Router("/openct/marking/score/test/example/detail", &controllers.TestPaperApiController{}, "post:ExampleDeatil")
|
||||
beego.Router("/openct/marking/score/test/example/list", &controllers.TestPaperApiController{}, "post:ExampleList")
|
||||
beego.Router("/openct/marking/score/test/review", &controllers.TestPaperApiController{}, "post:Review")
|
||||
beego.Router("/openct/marking/score/test/review/point", &controllers.TestPaperApiController{}, "post:ReviewPoint")
|
||||
|
||||
// beego.Router("/api/get-users", &controllers.ApiController{}, "GET:GetUsers")
|
||||
|
||||
|
||||
/**
|
||||
chen :阅卷组长端
|
||||
*/
|
||||
beego.Router("/openct/marking/supervisor/question/list",&controllers.SupervisorApiController{},"post:QuestionList")
|
||||
beego.Router("/openct/marking/supervisor/user/info",&controllers.SupervisorApiController{},"post:UserInfo")
|
||||
beego.Router("/openct/marking/supervisor/teacher/monitoring",&controllers.SupervisorApiController{},"post:TeacherMonitoring")
|
||||
beego.Router("/openct/marking/supervisor/score/distribution",&controllers.SupervisorApiController{},"post:ScoreDistribution")
|
||||
beego.Router("/openct/marking/supervisor/question/teacher/list",&controllers.SupervisorApiController{},"post:TeachersByQuestion")
|
||||
beego.Router("/openct/marking/supervisor/self/score",&controllers.SupervisorApiController{},"post:SelfScore")
|
||||
beego.Router("/openct/marking/supervisor/average/score",&controllers.SupervisorApiController{},"post:AverageScore")
|
||||
beego.Router("/openct/marking/supervisor/problem/list",&controllers.SupervisorApiController{},"post:ProblemTest")
|
||||
beego.Router("/openct/marking/supervisor/arbitrament/list",&controllers.SupervisorApiController{},"post:ArbitramentTest")
|
||||
beego.Router("/openct/marking/supervisor/score/progress",&controllers.SupervisorApiController{},"post:ScoreProgress")
|
||||
beego.Router("/openct/marking/supervisor/point",&controllers.SupervisorApiController{},"post:SupervisorPoint")
|
||||
|
||||
/**
|
||||
chen :管理员端
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
package requests
|
||||
type QuestionList struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
}
|
||||
type UserInfo struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
}
|
||||
type ScoreDistribution struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
QuestionId int64 `joson:"questionId"`
|
||||
}
|
||||
type TeachersByQuestion struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
QuestionId int64 `joson:"questionId"`
|
||||
}
|
||||
type SelfScore struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
ExaminerId string `joson:"examinerId"`
|
||||
}
|
||||
type AverageScore struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
QuestionId int64 `joson:"questionId"`
|
||||
}
|
||||
type ProblemTest struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
QuestionId int64 `joson:"questionId"`
|
||||
}
|
||||
type ArbitramentTest struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
QuestionId int64 `joson:"questionId"`
|
||||
}
|
||||
type TeacherMonitoring struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
|
||||
QuestionId int64 `joson:"questionId"`
|
||||
}
|
||||
type SupervisorPoint struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
TestId int64 `joson:"testId"`
|
||||
TestDetailIds string `joson:"testDetailIds"`
|
||||
Scores string `joson:"scores"`
|
||||
|
||||
}
|
||||
|
||||
type ScoreProgress struct {
|
||||
SupervisorId string `joson:"supervisorId"`
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package requests
|
||||
|
||||
type TestDisplay struct {
|
||||
UserId string `json:"userId"`
|
||||
TestId int64 `json:"testId"`
|
||||
}
|
||||
|
||||
type TetsList struct {
|
||||
UserId string `json:"userId"`
|
||||
}
|
||||
|
||||
type TestPoint struct {
|
||||
UserId string `json:"userId"`
|
||||
Scores string `json:"scores"`
|
||||
TestId int64 `json:"testId"`
|
||||
TestDetailId string `json:"testDetailId"`
|
||||
}
|
||||
|
||||
type TestProblem struct {
|
||||
UserId string `json:"userId"`
|
||||
ProblemType int64 `json:"problemType"`
|
||||
TestId int64 `json:"testId"`
|
||||
}
|
||||
|
||||
type TestAnswer struct {
|
||||
UserId string `json:"userId"`
|
||||
TestId int64 `json:"testId"`
|
||||
}
|
||||
|
||||
type ExampleDetail struct {
|
||||
UserId string `json:"userId"`
|
||||
ExampleTestId int64 `json:"exampleTestId"`
|
||||
}
|
||||
|
||||
type ExampleList struct {
|
||||
UserId string `json:"userId"`
|
||||
TestId int64 `json:"TestId"`
|
||||
}
|
||||
|
||||
type TestReview struct {
|
||||
UserId string `json:"userId"`
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
package responses
|
||||
|
||||
type QuestionListVO struct {
|
||||
QuestionId int64
|
||||
QuestionName string
|
||||
}
|
||||
|
||||
type UserInfoVO struct {
|
||||
UserName string
|
||||
SubjectName string
|
||||
}
|
||||
|
||||
type TeacherMonitoringVO struct {
|
||||
UserId string
|
||||
UserName string
|
||||
TestDistributionNumber int64
|
||||
TestSuccessNumber int64
|
||||
TestRemainingNumber int64
|
||||
TestProblemNumber int64
|
||||
MarkingSpeed float64
|
||||
AverageScore float64
|
||||
Validity float64
|
||||
StandardDeviation float64
|
||||
EvaluationIndex float64
|
||||
OnlineTime float64
|
||||
}
|
||||
|
||||
type ScoreDistributionVO struct {
|
||||
Score int64
|
||||
Rate float64
|
||||
}
|
||||
|
||||
type TeacherVO struct {
|
||||
UserId string
|
||||
UserName string
|
||||
}
|
||||
|
||||
type SelfScoreRecordVO struct {
|
||||
TestId int64
|
||||
Score int64
|
||||
SelfScore int64
|
||||
|
||||
}
|
||||
type ScoreAverageVO struct {
|
||||
UserId string
|
||||
UserName string
|
||||
Average float64
|
||||
|
||||
}
|
||||
type ProblemUnderCorrectedPaperVO struct {
|
||||
|
||||
TestId int64
|
||||
ExaminerId string
|
||||
ExaminerName string
|
||||
ProblemType int64
|
||||
ProblemMes string
|
||||
}
|
||||
|
||||
type ArbitramentTestVO struct {
|
||||
TestId int64
|
||||
ExaminerFirstId string
|
||||
ExaminerFirstName string
|
||||
ExaminerFirstScore int64
|
||||
ExaminerSecondId string
|
||||
ExaminerSecondName string
|
||||
ExaminerSecondScore int64
|
||||
PracticeError int64
|
||||
StandardError int64
|
||||
|
||||
}
|
||||
|
||||
type ScoreProgressVO struct {
|
||||
QuestionId int64
|
||||
QuestionName string
|
||||
SubjectName string
|
||||
ImportNumber int64
|
||||
AverageScore float64
|
||||
|
||||
FinishNumber int64
|
||||
FinishRate float64
|
||||
UnfinishedNumber float64
|
||||
UnfinishedRate float64
|
||||
IsAllFinished int64
|
||||
//AverageSpeed float64
|
||||
FirstFinishedNumber int64
|
||||
FirstFinishedRate float64
|
||||
FirstUnfinishedNumber float64
|
||||
FirstUnfinishedRate float64
|
||||
IsFirstFinished int64
|
||||
|
||||
SecondFinishedNumber int64
|
||||
SecondFinishedRate float64
|
||||
SecondUnfinishedNumber float64
|
||||
SecondUnfinishedRate float64
|
||||
IsSecondFinished int64
|
||||
|
||||
ThirdFinishedNumber int64
|
||||
ThirdFinishedRate float64
|
||||
ThirdUnfinishedNumber float64
|
||||
ThirdUnfinishedRate float64
|
||||
IsThirdFinished int64
|
||||
|
||||
ArbitramentNumber int64
|
||||
ArbitramentRate float64
|
||||
ArbitramentFinishedNumber int64
|
||||
ArbitramentFinishedRate float64
|
||||
ArbitramentUnfinishedNumber int64
|
||||
ArbitramentUnfinishedRate float64
|
||||
IsArbitramentFinished int64
|
||||
|
||||
|
||||
ProblemNumber int64
|
||||
ProblemRate float64
|
||||
ProblemFinishedNumber int64
|
||||
ProblemFinishedRate float64
|
||||
ProblemUnfinishedNumber int64
|
||||
ProblemUnfinishedRate float64
|
||||
IsProblemFinished int64
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package responses
|
||||
|
||||
import (
|
||||
"openscore/models"
|
||||
"time"
|
||||
)
|
||||
|
||||
type SubTopicPlus struct {
|
||||
models.SubTopic
|
||||
Test_detail_id int64 `json:"test_detail_id"`
|
||||
}
|
||||
|
||||
type TestDisplay struct {
|
||||
QuestionId int64 `json:"questionId"`
|
||||
QuestionName string `json:"questionName"`
|
||||
TestId int64 `json:"testId"`
|
||||
SubTopics []SubTopicPlus `json:"subTopic"`
|
||||
TestInfos []models.TestPaperInfo `json:"testInfos"`
|
||||
}
|
||||
|
||||
type TestList struct {
|
||||
TestId []int64 `json:"papers"`
|
||||
}
|
||||
|
||||
type TestAnswer struct {
|
||||
Pic_src []string `json:"keyTest"`
|
||||
}
|
||||
|
||||
type ExampleList struct {
|
||||
TestPapers []models.TestPaper `json:"exampleTestPapers"`
|
||||
}
|
||||
|
||||
type TestReview struct {
|
||||
TestId []int64 `json:"testId"`
|
||||
Score []int64 `json:"score"`
|
||||
ScoreTime []time.Time `json:"score_time"`
|
||||
}
|
||||
|
||||
type ExampleDeatil struct {
|
||||
QuestionName string `json:"quetsionName"`
|
||||
Test [][]models.TestPaperInfo `json:"test"`
|
||||
}
|
|
@ -23,7 +23,8 @@ export const DefaultProgramName = "talent2021";
|
|||
|
||||
export const AuthConfig = {
|
||||
serverUrl: "http://localhost:8000",
|
||||
clientId: "9162cb3914b3f1559e9e",
|
||||
// clientId: "70e1935bf72eb360d0fa",
|
||||
clientId: "1e1b5a3bd4a6a284553a", // your Casdoor OAuth Client ID
|
||||
appName: "application_1",
|
||||
organizationName: "built-in",
|
||||
};
|
||||
|
|
|
@ -23,7 +23,8 @@ import {trim} from "./Util";
|
|||
|
||||
export let authConfig = {
|
||||
serverUrl: "http://localhost:8000", // your Casdoor URL, like the official one: https://door.casbin.com
|
||||
clientId: "9162cb3914b3f1559e9e", // your Casdoor OAuth Client ID
|
||||
// clientId: "70e1935bf72eb360d0fa", // your Casdoor OAuth Client ID
|
||||
clientId: "1e1b5a3bd4a6a284553a", // your Casdoor OAuth Client ID
|
||||
appName: "application_1", // your Casdoor application name, like: "app-built-in"
|
||||
organizationName: "built-in", // your Casdoor organization name, like: "built-in"
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ class AuthCallback extends React.Component {
|
|||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
componentWillMount() {
|
||||
this.login();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue