From 3a2e2c1174b9e0e6fae949ae24ac99af1fa10fd4 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 8 Jul 2016 16:40:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E5=91=BD=E5=90=8D=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E6=9A=82=E4=B8=8D=E5=85=81=E8=AE=B8=E8=BF=9B=E8=A1=8C=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/syllabuses_service.rb | 2 ++ public/javascripts/wechat/controllers/class_list.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/services/syllabuses_service.rb b/app/services/syllabuses_service.rb index 04dc801fb..d81d131a4 100644 --- a/app/services/syllabuses_service.rb +++ b/app/services/syllabuses_service.rb @@ -8,6 +8,8 @@ class SyllabusesService def judge_can_setting(sy,user) sy[:can_setting] = sy[:user_id] == user.id ? true : false + sy[:can_setting] = false if sy[:id].nil? + sy.courses.each do |c| c[:can_setting] = false diff --git a/public/javascripts/wechat/controllers/class_list.js b/public/javascripts/wechat/controllers/class_list.js index cafa06e62..b3f8a6ea3 100644 --- a/public/javascripts/wechat/controllers/class_list.js +++ b/public/javascripts/wechat/controllers/class_list.js @@ -36,7 +36,7 @@ app.controller('ClassListController', ['$scope', 'config', 'auth', '$http', '$lo function (response) { console.log(response.data); if (response.data.auth == 0) { - vm.alertService.showMessage('提示', '对不起您不是老师不能新建课程'); + vm.alertService.showMessage('提示', '非教师身份不能创建课程哦~'); } else{ $location.path("/new_class");