修改微信班级测验报错的BUG

This commit is contained in:
yuanke 2016-07-13 10:09:47 +08:00
parent 3700f437cb
commit 5cd394c4ae
2 changed files with 33 additions and 28 deletions

View File

@ -391,7 +391,12 @@ module Mobile
end
get ':course_id/exercises' do
authenticate!
exercises = Course.find(params[:course_id]).exercises
course = Course.find(params[:course_id])
exercises = course.exercises
exercises.each do |v|
v[:coursename] = course.nil? ? "未知" : course.name
end
present :data,exercises,with:Mobile::Entities::Exercise
present :status,0
end

View File

@ -26,33 +26,33 @@
<div ng-view>
</div>
<script src="https://dn-demotest.qbox.me/angular.all.min.js"></script>
<!-- <script src="/javascripts/wechat/build/angular.all.min.js"></script> -->
<script src="/javascripts/wechat/build/app.min.js?version=20160709-0920"></script>
<!-- <script src="/javascripts/wechat/app.js"></script> -->
<!-- <script src="/javascripts/wechat/others/factory.js"></script> -->
<!-- <script src="/javascripts/wechat/others/filter.js"></script> -->
<!-- <script src="/javascripts/wechat/directives/alert.js"></script> -->
<!-- <script src="/javascripts/wechat/directives/form_validate.js"></script> -->
<!-- <script src="/javascripts/wechat/directives/input_auto.js"></script> -->
<!-- <script src="/javascripts/wechat/directives/loading_spinner.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/reg.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/invite_code.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/login.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/activity.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/new_class.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/edit_class.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/blog.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/course_notice.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/discussion.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/homework.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/issue.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/journals.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/class.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/class_list.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/myresource.js"></script> -->
<!-- <script src="/javascripts/wechat/controllers/send_class_list.js"></script> -->
<!-- <script src="/javascripts/wechat/others/routes.js"></script> -->
<!--<script src="https://dn-demotest.qbox.me/angular.all.min.js"></script>-->
<script src="/javascripts/wechat/build/angular.all.min.js"></script>
<!--<script src="/javascripts/wechat/build/app.min.js?version=20160709-0920"></script>-->
<script src="/javascripts/wechat/app.js"></script>
<script src="/javascripts/wechat/others/factory.js"></script>
<script src="/javascripts/wechat/others/filter.js"></script>
<script src="/javascripts/wechat/directives/alert.js"></script>
<script src="/javascripts/wechat/directives/form_validate.js"></script>
<script src="/javascripts/wechat/directives/input_auto.js"></script>
<script src="/javascripts/wechat/directives/loading_spinner.js"></script>
<script src="/javascripts/wechat/controllers/reg.js"></script>
<script src="/javascripts/wechat/controllers/invite_code.js"></script>
<script src="/javascripts/wechat/controllers/login.js"></script>
<script src="/javascripts/wechat/controllers/activity.js"></script>
<script src="/javascripts/wechat/controllers/new_class.js"></script>
<script src="/javascripts/wechat/controllers/edit_class.js"></script>
<script src="/javascripts/wechat/controllers/blog.js"></script>
<script src="/javascripts/wechat/controllers/course_notice.js"></script>
<script src="/javascripts/wechat/controllers/discussion.js"></script>
<script src="/javascripts/wechat/controllers/homework.js"></script>
<script src="/javascripts/wechat/controllers/issue.js"></script>
<script src="/javascripts/wechat/controllers/journals.js"></script>
<script src="/javascripts/wechat/controllers/class.js"></script>
<script src="/javascripts/wechat/controllers/class_list.js"></script>
<script src="/javascripts/wechat/controllers/myresource.js"></script>
<script src="/javascripts/wechat/controllers/send_class_list.js"></script>
<script src="/javascripts/wechat/others/routes.js"></script>
</body>
</html>