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");