find-classroom/README.md

137 lines
3.8 KiB
Markdown
Raw Normal View History

2016-09-10 16:43:42 +08:00
# CourseSelect [![Build Status](https://travis-ci.org/PENGZhaoqing/CourseSelect.svg?branch=master)](https://travis-ci.org/PENGZhaoqing/CourseSelect)
2016-09-10 14:23:19 +08:00
2016-10-31 22:54:47 +08:00
##([本组的heroku展示地址](https://courseselectofstormand.herokuapp.com/))
目前完成修改:
2016-11-13 16:04:44 +08:00
* 首页显示所有的课程与其相关属性。aaa
2016-10-31 22:54:47 +08:00
2016-09-28 00:35:19 +08:00
### [中文教程1](http://blog.csdn.net/ppp8300885/article/details/52594839) [中文教程2](http://blog.csdn.net/ppp8300885/article/details/52601560) [中文教程3](http://blog.csdn.net/ppp8300885/article/details/52669749)
2016-09-21 20:13:07 +08:00
2016-09-10 22:15:01 +08:00
这个样本系统是基于国科大研究生课程 (高级软件工程) 开发的项目,目的是帮助入门者学习RoR (Ruby on Rails)
2016-09-10 14:23:19 +08:00
2016-09-10 22:17:07 +08:00
适合新学者的入手的第一个项目 ([演示Demo戳这里](https://courseselect.herokuapp.com/ )),入门者可以在这个样本系统上增加更多的功能:
2016-09-10 14:23:19 +08:00
* 处理选课冲突、控制选课人数
2016-09-10 14:41:18 +08:00
* 统计选课学分,学位课等
* 增加选课的开放、关闭功能
2016-09-10 14:23:19 +08:00
* 自定义管理员后台
* 基于OAuth的授权登陆
* Excel格式的数据导入
2016-09-18 12:51:01 +08:00
* 绑定用户邮箱(实现注册激活,忘记密码等)
* 站内查找检索 (课程按分类查找,过滤等)
2016-09-10 14:23:19 +08:00
2016-09-10 14:39:08 +08:00
### 目前功能:
* 多角色登陆(学生,老师,管理员)
* 学生动态选课,退课
* 老师动态增加,删除课程
* 老师对课程下的学生添加、修改成绩
* 权限控制:老师和学生只能看到自己相关课程信息
2016-09-10 15:08:40 +08:00
### 截图
2016-09-10 15:16:44 +08:00
<img src="/lib/screenshot1.png" width="700">
2016-09-10 15:08:40 +08:00
2016-09-10 15:16:44 +08:00
<img src="/lib/screenshot2.png" width="700">
<img src="/lib/screenshot3.png" width="700">
<img src="/lib/screenshot4.png" width="700">
2016-09-10 14:39:08 +08:00
2016-09-10 14:23:19 +08:00
## 说明
2016-09-11 00:07:52 +08:00
目前使用的库和数据库:
2016-09-10 14:32:03 +08:00
2016-09-10 14:23:19 +08:00
* 使用[Bootstrap](http://getbootstrap.com/)作为前端库
* 使用[Rails_admin Gem](https://github.com/sferik/rails_admin)作为后台管理
2016-09-11 00:07:52 +08:00
* 使用[Postgresql](http://postgresapp.com/)作为数据库
2016-09-10 14:23:19 +08:00
2016-09-11 00:20:08 +08:00
使用前需要安装BundlerGemRubyRails等依赖环境。
请根据本地系统下载安装[postgresql](https://devcenter.heroku.com/articles/heroku-postgresql#local-setup)数据库,并运行`psql -h localhost`检查安装情况。
2016-09-10 14:32:03 +08:00
2016-09-10 14:23:19 +08:00
## 安装
在终端MacOS或Linux中执行以下代码
```
$ git clone https://github.com/PENGZhaoqing/CourseSelect
$ cd CourseSelect
$ bundle install
$ rake db:migrate
$ rake db:seed
$ rails s
```
2016-09-10 14:32:03 +08:00
在浏览器中输入`localhost:3000`访问主页
2016-09-10 14:23:19 +08:00
##使用
2016-09-10 14:32:03 +08:00
1.学生登陆:
账号:`student1@test.com`
2016-09-10 14:40:13 +08:00
2016-09-10 14:32:03 +08:00
密码:`password`
2.老师登陆:
账号:`teacher1@test.com`
2016-09-10 14:40:13 +08:00
2016-09-10 14:32:03 +08:00
密码:`password`
3.管理员登陆:
账号:`admin@test.com`
2016-09-10 14:40:13 +08:00
2016-09-10 14:32:03 +08:00
密码:`password`
账号中数字都可以替换成2,3...等等
2016-09-10 14:23:19 +08:00
2016-09-11 00:07:52 +08:00
2016-09-11 00:20:08 +08:00
## Heroku云部署
2016-09-11 00:07:52 +08:00
项目可直接在Heroku上免费部署
1.fork此项目到自己Github账号下
2016-09-11 00:18:18 +08:00
2016-09-11 00:07:52 +08:00
2.创建Heroku账号以及Heroku app
2016-09-11 00:18:18 +08:00
2016-09-11 00:07:52 +08:00
3.将Heroku app与自己Github下的fork的项目进行连接
2016-09-11 00:18:18 +08:00
2016-09-11 00:07:52 +08:00
4.下载配置[Heroku CLI](https://devcenter.heroku.com/articles/heroku-command-line)命令行工具
2016-09-11 00:18:18 +08:00
2016-09-11 00:20:08 +08:00
5.运行`heroku login`在终端登陆检查与heroku app的远程连接情况`git config --list | grep heroku`若未检查到相应的app请看[这里](http://stackoverflow.com/questions/5129598/how-to-link-a-folder-with-an-existing-heroku-app)
2016-09-11 00:18:18 +08:00
2016-09-11 00:20:08 +08:00
6.运行部署,详情[请戳这里](https://devcenter.heroku.com/articles/getting-started-with-rails4#rails-asset-pipeline)
2016-09-11 00:07:52 +08:00
## 测试
本项目包含了部分的测试integration/fixture/model test测试文件位于/test目录下。运行测试
```
PENG-MacBook-Pro:IMS_sample PENG-mac$ rake test
Run options: --seed 15794
# Running:
.........
Finished in 1.202169s, 7.4865 runs/s, 16.6366 assertions/s.
9 runs, 20 assertions, 0 failures, 0 errors, 0 skips
```
2016-09-10 15:22:10 +08:00
## How to Contribute
2016-09-10 14:23:19 +08:00
2016-09-10 15:22:10 +08:00
先fork此项目在分支修改后pull request到主分支
提问请到issues里创建欢迎contributor
如果觉得好,给项目点颗星吧~
2016-09-10 14:23:19 +08:00