mirror of
https://shylinux.com/x/education
synced 2025-04-25 01:58:05 +08:00
add some
This commit is contained in:
parent
109a06534b
commit
f3421afe4a
@ -9,8 +9,8 @@ const (
|
||||
TYPE = "type"
|
||||
TITLE = "title"
|
||||
CONTENT = "content"
|
||||
AVATAR = "avatar"
|
||||
BACKGROUND = "background"
|
||||
AVATAR = "avatar"
|
||||
BACKGROUND = "background"
|
||||
USER_UID = "user_uid"
|
||||
USER_LIBRARY_ROLE = "user_library_role"
|
||||
LIBRARY_UID = "library_uid"
|
||||
@ -19,8 +19,8 @@ const (
|
||||
DOCUMENT_TYPE = "document_type"
|
||||
SCHOOL_NAME = "school_name"
|
||||
SCHOOL_INFO = "school_info"
|
||||
SCHOOL_AVATAR = "school_avatar"
|
||||
SCHOOL_BACKGROUND = "school_background"
|
||||
SCHOOL_AVATAR = "school_avatar"
|
||||
SCHOOL_BACKGROUND = "school_background"
|
||||
CITY_UID = "city_uid"
|
||||
CITY_NAME = "city_name"
|
||||
LINK = "link"
|
||||
|
@ -12,7 +12,6 @@
|
||||
"library_name": "文库名称",
|
||||
"library_type": "文库类型",
|
||||
"document_type": "文档类型",
|
||||
"school_name": "学校名称",
|
||||
"school": "学校",
|
||||
"subject": "学科",
|
||||
"grade": "年级"
|
||||
|
@ -45,8 +45,9 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
||||
})
|
||||
return s.Table.RewriteAppend(m)
|
||||
}
|
||||
func (s Table) SelectJoinSchool(m *ice.Message) *ice.Message {
|
||||
return s.SelectJoin(m, school{}, model.NAME, model.CITY_UID)
|
||||
func (s Table) SelectJoinSchool(m *ice.Message) {
|
||||
s.SelectJoin(m, school{}, model.NAME, model.CITY_UID)
|
||||
s.SelectJoinCity(m)
|
||||
}
|
||||
func (s Table) CheckRole(m *ice.Message, arg ...string) {
|
||||
role := UserClassRole(s.UserPlaceRole(m))
|
||||
|
@ -6,7 +6,7 @@ type homework struct {
|
||||
Table
|
||||
fields string `data:"title,content,user_uid"`
|
||||
create string `name:"create title* content*" role:"teacher"`
|
||||
remove string `name:"remove" role:"leader"`
|
||||
remove string `name:"remove" role:"teacher"`
|
||||
}
|
||||
|
||||
func (s homework) List(m *ice.Message, arg ...string) { s.ValueList(m, arg).Display("") }
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"portal": "教务系统",
|
||||
"portal": "教务系统", "member": "班级成员",
|
||||
"homework": "家庭作业",
|
||||
"member": "班级成员",
|
||||
"school": "学校信息",
|
||||
"icons": {
|
||||
"homework": "https://img.icons8.com/officel/80/homework.png"
|
||||
},
|
||||
@ -11,7 +9,6 @@
|
||||
"user_class_role": "用户角色",
|
||||
"class_name": "班级名称",
|
||||
"class_type": "班级类型",
|
||||
"school_name": "学校名称",
|
||||
"grade": "入学年份"
|
||||
},
|
||||
"value": {
|
||||
|
@ -2,7 +2,6 @@ package jiaowuxitong
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/education/src/jiaowuxitong/model"
|
||||
)
|
||||
@ -23,24 +22,22 @@ func (s school) FindOrCreateByName(m *ice.Message, arg ...string) {
|
||||
}
|
||||
}
|
||||
func (s school) Modify(m *ice.Message, arg ...string) {
|
||||
s.Update(m, kit.Dict(m.OptionSimple(model.INFO)), m.OptionSimple(model.UID)...)
|
||||
s.Update(m, m.OptionSimple(model.INFO), m.OptionSimple(model.UID)...)
|
||||
}
|
||||
func (s school) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 0 {
|
||||
s.CityList(m)
|
||||
} else if len(arg) == 1 {
|
||||
msg := s.CityList(m.Spawn(), arg[0])
|
||||
} else if msg := s.CityList(m.Spawn(), arg[0]); len(arg) == 1 {
|
||||
s.Select(m, model.CITY_UID, msg.Append(model.UID))
|
||||
} else if len(arg) == 2 {
|
||||
msg := s.CityList(m.Spawn(), arg[0])
|
||||
s.Select(m, model.CITY_UID, msg.Append(model.UID), model.NAME, arg[1])
|
||||
if m.Append(model.AUTH_UID) == "" && m.IsTech() {
|
||||
if m.Append(model.AUTH_UID) == "" {
|
||||
m.EchoInfoButton("请申请学校认证", s.AuthCreate)
|
||||
}
|
||||
}
|
||||
}
|
||||
func (s school) AuthCreate(m *ice.Message, arg ...string) {
|
||||
msg := m.Cmd("web.team.gonganxitong.city", s.Select, model.UID, m.Option(model.CITY_UID))
|
||||
msg := s.CityCmd(m, s.Select, model.UID, m.Option(model.CITY_UID))
|
||||
s.Table.AuthCreate(m, 5, msg.Append(model.AUTH_UID), m.OptionSimple(model.UID)...)
|
||||
}
|
||||
|
||||
|
@ -5,17 +5,15 @@ import "shylinux.com/x/mysql-story/src/db"
|
||||
const (
|
||||
UID = "uid"
|
||||
NAME = "name"
|
||||
INFO = "info"
|
||||
TYPE = "type"
|
||||
TITLE = "title"
|
||||
CONTENT = "content"
|
||||
USER_UID = "user_uid"
|
||||
USER_EXAM_ROLE = "user_exam_role"
|
||||
EXAM_UID = "exam_uid"
|
||||
EXAM_NAME = "exam_name"
|
||||
EXAM_TYPE = "exam_type"
|
||||
QUESTION_UID = "question_uid"
|
||||
SCHOOL_UID = "school_uid"
|
||||
CITY_UID = "city_uid"
|
||||
)
|
||||
|
||||
type UserExam struct {
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
|
||||
type Portal struct {
|
||||
jiaowuxitong.Portal
|
||||
placeCreate string `name:"placeCreate city_name* school_name* exam_name* exam_type*:select" role:"void"`
|
||||
placeCreate string `name:"placeCreate city_name* school_name* exam_name* exam_type:select" role:"void"`
|
||||
}
|
||||
|
||||
func init() { gonganxitong.PortalCmd(Portal{Portal: jiaowuxitong.NewPortal(userExam{}, exam{})}) }
|
||||
|
@ -8,8 +8,7 @@
|
||||
"My Exam": "我的考试",
|
||||
"user_exam_role": "用户角色",
|
||||
"exam_name": "考试名称",
|
||||
"exam_type": "考试类型",
|
||||
"school_name": "学校名称"
|
||||
"exam_type": "考试类型"
|
||||
},
|
||||
"value": {
|
||||
"user_exam_role": {
|
||||
|
@ -5,17 +5,15 @@ import "shylinux.com/x/mysql-story/src/db"
|
||||
const (
|
||||
UID = "uid"
|
||||
NAME = "name"
|
||||
INFO = "info"
|
||||
TYPE = "type"
|
||||
TITLE = "title"
|
||||
CONTENT = "content"
|
||||
USER_UID = "user_uid"
|
||||
USER_COURSE_ROLE = "user_course_role"
|
||||
COURSE_UID = "course_uid"
|
||||
COURSE_NAME = "course_name"
|
||||
COURSE_TYPE = "course_type"
|
||||
LESSON_UID = "lesson_uid"
|
||||
SCHOOL_UID = "school_uid"
|
||||
CITY_UID = "city_uid"
|
||||
)
|
||||
|
||||
type UserCourse struct {
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
|
||||
type Portal struct {
|
||||
jiaowuxitong.Portal
|
||||
placeCreate string `name:"placeCreate city_name* school_name* course_name* course_type*:select" role:"void"`
|
||||
placeCreate string `name:"placeCreate city_name* school_name* course_name* course_type:select" role:"void"`
|
||||
}
|
||||
|
||||
func init() { gonganxitong.PortalCmd(Portal{Portal: jiaowuxitong.NewPortal(userCourse{}, course{})}) }
|
||||
|
@ -8,8 +8,7 @@
|
||||
"My Course": "我的课程",
|
||||
"user_course_role": "用户角色",
|
||||
"course_name": "课程名称",
|
||||
"course_type": "课程类型",
|
||||
"school_name": "学校名称"
|
||||
"course_type": "课程类型"
|
||||
},
|
||||
"value": {
|
||||
"user_course_role": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user