Skip to content
This repository was archived by the owner on Mar 11, 2023. It is now read-only.

Implement scoring feature.#404

Open
yf-fyf wants to merge 5 commits intoSoftwareFoundationGroupAtKyotoU:masterfrom
yf-fyf:score
Open

Implement scoring feature.#404
yf-fyf wants to merge 5 commits intoSoftwareFoundationGroupAtKyotoU:masterfrom
yf-fyf:score

Conversation

@yf-fyf
Copy link
Copy Markdown
Contributor

@yf-fyf yf-fyf commented Oct 19, 2015

採点機能の実装

  • 「採点」タブの追加.各課題を解けたか否かでチェックマークを付ける.
  • 「採点」タブでは,自動テストとの同期が可能.
  • 一覧で「必修: 3/7,星1: 2/4,星2: 3/5, その他: 0/10」など,採点状況を表示.

内部実装

  • 現状,lib/score.rbが採点情報をRubyのハッシュデータを文字列化したものとして保存.
    (今は解けたか解けていないかの二択のみなので,ハッシュデータに使っているのはtrue, falseだけだが,拡張はRuby側でハッシュを拡張するだけで良い)
  • 保存に関してはコメント機能とほぼ同様で,スコア用にテキストデータをdb/kadai/../usernameにscoreフォルダを用意してそこに保存.

@krtx
Copy link
Copy Markdown
Contributor

krtx commented Oct 20, 2015

config.ru に score.cgi のルーティングが追加されてません

Comment thread js/record/detail_list.js Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

細かいことですが、一行に詰め込むよりも下の行のように分けてくれた方が読み易い気がしました。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

他のコードを見てると e1 ? e1 : e2 のように ? や : の前後スペースを空けてるので統一した方が見やすいかと思います。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_.get を使ってもいいかもしれません.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants