find-classroom/README.md

137 lines
3.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# CourseSelect [![Build Status](https://travis-ci.org/PENGZhaoqing/CourseSelect.svg?branch=master)](https://travis-ci.org/PENGZhaoqing/CourseSelect)
##([本组的heroku展示地址](https://courseselectofstormand.herokuapp.com/))
目前完成修改:
* 首页显示所有的课程与其相关属性。aaa
### [中文教程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)
这个样本系统是基于国科大研究生课程 (高级软件工程) 开发的项目,目的是帮助入门者学习RoR (Ruby on Rails)
适合新学者的入手的第一个项目 ([演示Demo戳这里](https://courseselect.herokuapp.com/ )),入门者可以在这个样本系统上增加更多的功能:
* 处理选课冲突、控制选课人数
* 统计选课学分,学位课等
* 增加选课的开放、关闭功能
* 自定义管理员后台
* 基于OAuth的授权登陆
* Excel格式的数据导入
* 绑定用户邮箱(实现注册激活,忘记密码等)
* 站内查找检索 (课程按分类查找,过滤等)
### 目前功能:
* 多角色登陆(学生,老师,管理员)
* 学生动态选课,退课
* 老师动态增加,删除课程
* 老师对课程下的学生添加、修改成绩
* 权限控制:老师和学生只能看到自己相关课程信息
### 截图
<img src="/lib/screenshot1.png" width="700">
<img src="/lib/screenshot2.png" width="700">
<img src="/lib/screenshot3.png" width="700">
<img src="/lib/screenshot4.png" width="700">
## 说明
目前使用的库和数据库:
* 使用[Bootstrap](http://getbootstrap.com/)作为前端库
* 使用[Rails_admin Gem](https://github.com/sferik/rails_admin)作为后台管理
* 使用[Postgresql](http://postgresapp.com/)作为数据库
使用前需要安装BundlerGemRubyRails等依赖环境。
请根据本地系统下载安装[postgresql](https://devcenter.heroku.com/articles/heroku-postgresql#local-setup)数据库,并运行`psql -h localhost`检查安装情况。
## 安装
在终端MacOS或Linux中执行以下代码
```
$ git clone https://github.com/PENGZhaoqing/CourseSelect
$ cd CourseSelect
$ bundle install
$ rake db:migrate
$ rake db:seed
$ rails s
```
在浏览器中输入`localhost:3000`访问主页
##使用
1.学生登陆:
账号:`student1@test.com`
密码:`password`
2.老师登陆:
账号:`teacher1@test.com`
密码:`password`
3.管理员登陆:
账号:`admin@test.com`
密码:`password`
账号中数字都可以替换成2,3...等等
## Heroku云部署
项目可直接在Heroku上免费部署
1.fork此项目到自己Github账号下
2.创建Heroku账号以及Heroku app
3.将Heroku app与自己Github下的fork的项目进行连接
4.下载配置[Heroku CLI](https://devcenter.heroku.com/articles/heroku-command-line)命令行工具
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)
6.运行部署,详情[请戳这里](https://devcenter.heroku.com/articles/getting-started-with-rails4#rails-asset-pipeline)
## 测试
本项目包含了部分的测试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
```
## How to Contribute
先fork此项目在分支修改后pull request到主分支
提问请到issues里创建欢迎contributor
如果觉得好,给项目点颗星吧~