Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
c2904c88
Commit
c2904c88
authored
Oct 27, 2016
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课堂通过审核时,自动将关联的用户身份改为讲师。
parent
b020598e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
ClassesController.php
src/backend/controllers/ClassesController.php
+7
-3
index.php
src/backend/views/classes/index.php
+2
-2
No files found.
src/backend/controllers/ClassesController.php
View file @
c2904c88
...
@@ -79,10 +79,14 @@ class ClassesController extends Controller
...
@@ -79,10 +79,14 @@ class ClassesController extends Controller
case
Classes
::
STATUS_OK
:
case
Classes
::
STATUS_OK
:
$class
->
status
=
$check
;
$class
->
status
=
$check
;
$class
->
reason
=
''
;
$class
->
reason
=
''
;
if
(
$class
->
save
()
&&
$msg
)
{
$user
->
role
=
User
::
ROLE_TEACHER
;
if
(
$class
->
update
()
&&
$user
->
update
()
&&
$msg
)
{
$template
=
Yii
::
$app
->
params
[
'classes.check.msg.ok'
];
$template
=
Yii
::
$app
->
params
[
'classes.check.msg.ok'
];
$sms
->
send
(
$user
->
telephone
,
str_replace
(
'{className}'
,
$class
->
name
,
$template
));
$sms
->
send
(
$user
->
telephone
,
str_replace
(
'{className}'
,
$class
->
name
,
$template
));
}
}
Utils
::
ajaxResponse
(
true
);
Utils
::
ajaxResponse
(
true
);
break
;
break
;
...
@@ -96,7 +100,7 @@ class ClassesController extends Controller
...
@@ -96,7 +100,7 @@ class ClassesController extends Controller
$class
->
status
=
$check
;
$class
->
status
=
$check
;
$class
->
reason
=
$reason
;
$class
->
reason
=
$reason
;
if
(
$class
->
sav
e
()
&&
$msg
)
{
if
(
$class
->
updat
e
()
&&
$msg
)
{
$template
=
Yii
::
$app
->
params
[
'classes.check.msg.failed'
];
$template
=
Yii
::
$app
->
params
[
'classes.check.msg.failed'
];
$sms
->
send
(
$user
->
telephone
,
str_replace
([
'{className}'
,
'{reason}'
],
[
$class
->
name
,
$reason
],
$template
));
$sms
->
send
(
$user
->
telephone
,
str_replace
([
'{className}'
,
'{reason}'
],
[
$class
->
name
,
$reason
],
$template
));
}
}
...
@@ -114,7 +118,7 @@ class ClassesController extends Controller
...
@@ -114,7 +118,7 @@ class ClassesController extends Controller
$class
->
status
=
$check
;
$class
->
status
=
$check
;
$class
->
reason
=
$reason
;
$class
->
reason
=
$reason
;
if
(
$class
->
sav
e
()
&&
$msg
)
{
if
(
$class
->
updat
e
()
&&
$msg
)
{
$template
=
Yii
::
$app
->
params
[
'classes.check.msg.locked'
];
$template
=
Yii
::
$app
->
params
[
'classes.check.msg.locked'
];
$sms
->
send
(
$user
->
telephone
,
str_replace
([
'{className}'
,
'{reason}'
],
[
$class
->
name
,
$reason
],
$template
));
$sms
->
send
(
$user
->
telephone
,
str_replace
([
'{className}'
,
'{reason}'
],
[
$class
->
name
,
$reason
],
$template
));
}
}
...
...
src/backend/views/classes/index.php
View file @
c2904c88
...
@@ -99,11 +99,11 @@ $this->title = "课堂管理";
...
@@ -99,11 +99,11 @@ $this->title = "课堂管理";
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
$
(
function
()
{
$
(
function
()
{
$
(
"button.CLASS_CHECK"
).
click
(
function
()
{
$
(
"button.CLASS_CHECK"
).
click
(
function
()
{
accessAction
(
this
,
1
,
'确定要通过该课堂申请吗?'
,
true
);
accessAction
(
this
,
1
,
'确定要通过该课堂申请吗?'
,
"已通过该课堂申请。"
,
true
);
});
});
$
(
"button.CLASS_REFUSE"
).
click
(
function
()
{
$
(
"button.CLASS_REFUSE"
).
click
(
function
()
{
refuseAction
(
this
,
2
,
"请输入拒绝原因!"
,
"已拒绝课堂申请!"
,
true
);
refuseAction
(
this
,
2
,
"请输入拒绝原因!"
,
"已拒绝
该
课堂申请!"
,
true
);
});
});
$
(
"button.CLASS_LOCK"
).
click
(
function
()
{
$
(
"button.CLASS_LOCK"
).
click
(
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment