Git Product home page Git Product logo

myapp's People

Contributors

n774 avatar

Watchers

 avatar

myapp's Issues

入力状況確認画面

生徒の評価結果入力状況を把握できる画面を作成する
0、各画面のイメージを作成
https://github.com/takayasusakamoto/file/開発画面.ods

1、状況確認のコントローラを追加する
status_contoroller.rb
rails generate controller status show

2 、リソースの登録
config/routes.rbを変更する
resource :status, :only =>[:show]

3、ユーザテーブルの作成
rails g model user
db\migrateフォルダ配下の.rbファイルにカラムの定義を追加
u_id String
u_name String
g_id String
password_digest String

4、評価テーブルの作成
rails g model rate
db\migrateフォルダ配下の.rbファイルにカラムの定義を追加
g_id String
rate_id String
brate_id String
point Integer
comment String

5、マイグレーションスクリプトの実行
rake db:migrate

6、レコードの作成
rails console
user = User.new
user.u_id = 01
user.u_name = 坂本
user.g_id = 01
password_digest = takayasu
user.save

rate = Rate.new
rate.g_id = 01
rate.rate_id = 02
rate.brate_id = 03
rate.point = 65
rate.comment = 入力しました
rate.save

7、コントローラのアクションにデータ取得用のSQL追加
find_by_sql("select rates.g_id,users.u_name from rates join users on rates.g_id = user.g_id")
画面へ取得したデータを転送

8、ビューに取得したデータを繰り返し表示するコード追加
<% groups.each do |groups| %>
<%= groups.g_id %>
<%= groups.u_name %>
<% end %>

9、スタイルシート更新
app/assets/stylesheets/staus.css.scss
テーブルのth、tdの設定追加

10、画面に値が設定されていない場合の条件分岐文を追加
<% if groups.point != nil %>

入力されています <% else %> 入力されていません <% end %>

評価結果機能を作成する

初期表示は、全てのメンバーを表示する
 グループ名、氏名、評価(最少、最大、平均、合計)←表示項目は検討中
グループで絞り込みができる

生徒情報入力

同じグループに所属している生徒の評価を入力する。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.