418342 ภาคปลาย 2553/คะแนนและการส่งการบ้าน
ไปยังการนำทาง
ไปยังการค้นหา
การส่งงาน
| รหัสประจำตัว | การบ้าน 1 | การบ้าน 2 | การบ้าน 3 |
| 50040229 | ส่งแล้ว | ส่งแล้ว | ส่งแล้ว |
| 50042993 | ส่งแล้ว | ส่งแล้ว | ส่งแล้ว |
| 50043058 | ส่งแล้ว | ส่งแล้ว | ส่งแล้ว |
| 50043082 | ส่งแล้ว | ส่งแล้ว | ส่งแล้ว |
| 50043140 | ส่งแล้ว | ส่งแล้ว | ส่งแล้ว |
| 50043173 | ส่งแล้ว | ส่งแล้ว | ส่งแล้ว |
| 50043215 | ส่งแล้ว | ส่งแล้ว | ส่งแล้ว |
| 50043231 | ส่งแล้ว | ส่งแล้ว | ส่งแล้ว |
| 50043306 | ส่งแล้ว | ส่งแล้ว | ส่งแล้ว |
| 51043214 | ส่งช้า | ส่งแล้ว | |
| 50180249 | ส่งช้า | ส่งช้า | ส่งช้า |
| 51180198 | ส่งแล้ว | ส่งแล้ว | ส่งแล้ว |
| 51180503 | ส่งแล้ว | ส่งแล้ว | ส่งแล้ว |
คะแนนการบ้าน 1
| รหัสประจำตัว | A (30) | B (10) | C (10) | D (20) | E (10) | F (10) | G (10) | รวม | หมายเหตุ |
| 50040229 | 30 | 10 | 10 | 10 | 10 | 0 | 0 | 70 |
|
| 50042993 | 30 | 10 | 2 | 10 | 0 | 0 | 0 | 52 |
|
| 50043058 | 30 | 10 | 10 | 10 | 0 | 0 | 0 | 60 |
|
| 50043082 | 30 | 10 | 10 | 20 | 10 | 10 | 10 | 100 | |
| 50043140 | 30 | 10 | 10 | 10 | 10 | 10 | 10 | 90 |
|
| 50043173 | 30 | 10 | 10 | 20 | 10 | 0 | 0 | 80 |
|
| 50043215 | 30 | 10 | 10 | 10 | 10 | 0 | 0 | 70 |
|
| 50043231 | 30 | 8 | 2 | 10 | 10 | 10 | 10 | 80 |
|
| 50043306 | 30 | 10 | 10 | 10 | 10 | 10 | 10 | 90 |
|
| 51043214 | 10 | 10 | 10 | 10 | 10 | 10 | 10 | 70 |
|
| 50180249 | 10 | 10 | 10 | 10 | 10 | 10 | 10 | 70 |
|
| 51180198 | 30 | 10 | 10 | 10 | 10 | 10 | 10 | 90 |
|
| 51180503 | 30 | 10 | 10 | 10 | 10 | 10 | 10 | 90 |
|
เกณฑ์การให้คะแนน
- A: migration รันผ่าน (30)
- B: จำนวนฟีลด์ (10)
- C: จำนวน record (10)
- D: หน้า search สามารถแสดงข้อมูลได้เมื่อไม่ใส่ข้อมูล search อะไรเลย (20)
- E: Search ฟีลด์ 1 (10)
- F: Search ฟีลด์ 2 (10)
- G: Search ฟีลด์ 3 (10)
คะแนนการบ้าน 2
| รหัสนิสิต | A(10) | B(15) | C(15) | D(15) | E(30) | F(15) | รวม | หมายเหตุ |
| 50040229 | 10 | 0 | 15 | 0 | 20 | 0 | 45 |
|
| 50042993 | 10 | 15 | 15 | 10 | 25 | 10 | 85 |
|
| 50043058 | 10 | 15 | 15 | 15 | 30 | 15 | 100 | |
| 50043082 | 10 | 15 | 15 | 15 | 30 | 15 | 100 | |
| 50043140 | 10 | 10 | 15 | 15 | 25 | 0 | 75 |
|
| 50043173 | 10 | 10 | 15 | 15 | 20 | 5 | 75 |
|
| 50043215 | 10 | 15 | 15 | 15 | 20 | 5 | 80 |
|
| 50043231 | 10 | 15 | 15 | 15 | 20 | 5 | 80 |
|
| 50043306 | 10 | 15 | 15 | 15 | 20 | 5 | 80 |
|
| 51043214 | ||||||||
| 50180249 | ||||||||
| 51180198 | 10 | 15 | 15 | 0 | 20 | 10 | 70 |
|
| 51180503 | 0 | 15 | 10 | 15 | 15 | 5 | 60 |
|
เกณฑ์การให้คะแนน
- A: เตรียมข้อมูลเบื้องต้น migration และ seed (10)
- B: Authentication แต่ละผู้ใช้ (15)
- C: CSS และ form layout ที่เหมาะสม (15)
- D: Field Validations (15)
- E: ความสมบูรณ์ในการทำงานของโปรแกรม (30)
- F: รายงานรายรับรายจ่าย (15)
คะแนนการบ้าน 3
คนที่ได้คะแนน
- 50043058 ได้ 70 คะแนน
- (-4) posts/show: wrong formatting
- (-2) posts/show: wrong comment form redirect
- (-4) posts/index: wrong formatting
- (-2) posts/index: wrong comment link redirect
- (-4) comments/index: wrong formatting
- (-10) tag/show: doesn't follow instruction
- 50043173 ได้ 78 คะแนน
- (-4) posts/show: wrong formatting
- (-4) posts/index: wrong formatting
- (-2) posts/index: wrong comment link redirect
- (-2) comments/index: wrong formatting
- (-4) tag/show: AJAX doesn’t work
- (-2) tag/show: wrong formatting
- (-4) tag/show: display not correct
- 51043214 ได้ 40 คะแนน
- (-60) doesn't do other problem besides 1 and 2
- 51180198 ได้ 70 คะแนน
- (-4) posts/show: wrong formatting
- (-2) posts/index: wrong formatting
- (-2) posts/index: wrong comment link redirect
- (-4) posts/admin: no unpublish
- (-10) posts/edit: doesn't work
- (-2) comments/index: wrong formatting
- (-4) tag/show: AJAX doesn't work
- (-2) tag/show: wrong formatting
- 51180503 ได้ 78 คะแนน
- (-2) posts/show: wrong formatting
- (-2) posts/index: wrong comment link redirect
- (-4) posts/edit: no tag input
- (-6) posts/edit: all redirects are wrong
- (-2) comments/index: wrong formatting
- (-6) tags/show: cannot edit tag, so cannot show if it's correct
- 51080249 ได้ 25 คะแนน
- (-20) late submission
- (-5) setting test doesn't pass
- (-10) post/show doesn't work
- (-10) post/index doesn't work
- (-10) post/admin doesn't work
- (-10) doesn't modify post/edit
- (-4) tag/show: wrong formatting
- (-2) tag/show: AJAX doesn’t work
- (-4) tag/show: display not correct
คนที่ไม่ได้คะแนนเนื่องจากลอกกัน
- 50042993
- 50040229
- 50043082
- 50043140
- 50043215
- 50043231
- 50043360
ฟังก์ชัน update ใน app/controllers/posts_controller.rb (Pattern 1)
| 50042993 | 50043082 | 50043215 | 50043231 | 50043360 |
|
<geshi lang="ruby"> def update @post = Post.find(params[:id]) type = params['post']['buttonType'] params['post'].delete('buttonType') tags = params['post']['tags'] arrayTag = [] tags.split(',').each do |tag|
t = Tag.new
t.name = Tag.normalize_name(tag)
arrayTag << t
end
params['post']['tags'] = arrayTag if type == '1'
redirect_action = 'admin'
elsif type == '2'
redirect_action = 'edit'
elsif type == '3'
params['post']['published_at'] = Time.now.getutc
redirect_action = 'index'
end
</geshi> |
<geshi lang="ruby"> def update
@post = Post.find(params[:id])
buttontype = params['post']['buttontype']
params['post'].delete('buttontype')
tag_array = []
params['post']['tags'].split(',').each do |t|
tag = Tag.new
tag.name = Tag.normalize_name(t)
tag_array << tag
end
if buttontype == '1'
redirect_action = 'admin'
elsif buttontype == '2'
redirect_action = 'edit'
elsif buttontype == '3'
params['post']['published_at'] = Time.now.getutc
redirect_action = 'index'
end
params['post']['tags'] = tag_array
</geshi> |
<geshi lang="ruby"> def update @post = Post.find(params[:id]) type = params['post']['buttonType'] params['post'].delete('buttonType') tags = params['post']['tags'] arrayTag = [] tags.split(',').each do |tag|
t = Tag.new
t.name = Tag.normalize_name(tag)
arrayTag << t
end
params['post']['tags'] = arrayTag if type == '1' redirect_action = 'admin'
elsif type == '2'
redirect_action = 'edit'
elsif type == '3'
params['post']['published_at'] = Time.now.getutc
redirect_action = 'index'
end
</geshi> |
<geshi lang="ruby"> def update
@post = Post.find(params[:id])
type = params['post']['buttontype']
params['post'].delete('buttontype')
tag_array = [] params['post']['tags'].split(',').each do |t|
tag = Tag.new
tag.name = Tag.normalize_name(t)
tag_array << tag
end
if type == '1'
redirect_action = 'admin'
elsif type == '2'
redirect_action = 'edit'
elsif type == '3'
params['post']['published_at'] = Time.now.getutc
redirect_action = 'index'
end
params['post']['tags'] = tag_array
</geshi> |
<geshi lang="ruby"> def update
@post = Post.find(params[:id])
buttontype = params['post']['buttontype']
params['post'].delete('buttontype')
tag_array = []
params['post']['tags'].split(',').each do |t|
tag = Tag.new
tag.name = Tag.normalize_name(t)
tag_array << tag
end
if buttontype == '1'
redirect_action = 'admin'
elsif buttontype == '2'
redirect_action = 'edit'
elsif buttontype == '3'
params['post']['published_at'] = Time.now.getutc
redirect_action = 'index'
end
params['post']['tags'] = tag_array
</geshi> |
ฟังก์ชัน update ใน app/controllers/posts_controller.rb (Pattern 2)
| 50040229 | 50043140 |
|
<geshi lang="ruby"> def update
@post = Post.find(params[:id])
buttontype = params['post']['buttontype']
params['post'].delete('buttontype')
tag_array = []
for t in params['post']['tags'].split(',')
tag = Tag.new
tag.name = Tag.normalize_name(t)
tag_array << tag
end
if buttontype == '2'
redirect_action = 'edit'
elsif buttontype == '3'
params['post']['published_at'] = Time.now.getutc
redirect_action = 'index'
end
params['post']['tags'] = tag_array
respond_to do |format|
if @post.update_attributes(params[:post])
flash[:notice] = 'Post was successfully updated.'
if buttontype == '1'
format.html { redirect_to :action=> "admin",:id => 0 }
else
format.html { redirect_to :action=> redirect_action }
end
format.xml { head :ok }
else
format.html { render :action => "edit" }
format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
end
end
end
</geshi> |
<geshi lang="ruby"> def update
@post = Post.find(params[:id])
submitmode = params['post']['submitmode']
params['post'].delete('submitmode')
tag_array = []
for t in params['post']['tags'].split(',')
tag = Tag.new
tag.name = Tag.normalize_name(t)
tag_array << tag
end
if submitmode == 'sc'
redirect_action = 'edit'
elsif submitmode == 'p'
params['post']['published_at'] = Time.now.getutc
redirect_action = 'index'
end
params['post']['tags'] = tag_array
respond_to do |format|
if @post.update_attributes(params[:post])
flash[:notice] = 'Post was successfully updated.'
if submitmode == 's'
format.html { redirect_to :action=> "admin",:id => 0 }
else
format.html { redirect_to :action=> redirect_action }
end
format.xml { head :ok }
else
format.html { render :action => "edit" }
format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
end
end
end
</geshi> |