ผลต่างระหว่างรุ่นของ "418342 ภาคปลาย 2553/คะแนนและการส่งการบ้าน"

จาก Theory Wiki
ไปยังการนำทาง ไปยังการค้นหา
แถว 291: แถว 291:
 
<td>10</td>
 
<td>10</td>
 
<td>10</td>
 
<td>10</td>
<td>0</td>
+
<td>10</td>
<td>0</td>
+
<td>10</td>
<td>0</td>
+
<td>10</td>
 
<td>60</td>
 
<td>60</td>
 
<td>
 
<td>
แถว 329: แถว 329:
  
 
<br/>
 
<br/>
 +
 
== คะแนนการบ้าน 2 ==  
 
== คะแนนการบ้าน 2 ==  
  

รุ่นแก้ไขเมื่อ 03:52, 22 มีนาคม 2554

การส่งงาน

รหัสประจำตัว การบ้าน 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
  • -10 เนื่องจากแสดงข้อมูลทั้งหมด ไม่ลิมิตไว้ที่ 100 record
  • -20 เนื่องจาก search ได้เพียง field Name เพียง field เดียว ที่เหลือ search ไม่ได้
50042993 30 10 2 10 0 0 0 52
  • -8 เนื่องจากมีเพียง 113 record
  • -30 เนื่องจาก search ไม่ได้เลย
  • -10 เนื่องจากแสดงข้อมูลทั้งหมด ไม่ลิมิตไว้ที่ 100 record
50043058 30 10 10 10 0 0 0 60
  • -10 เนื่องจากแสดงข้อมูลทั้งหมด ไม่ลิมิตไว้ที่ 100 record
  • -30 เนื่องจาก search ไม่ได้
50043082 30 10 10 20 10 10 10 100
50043140 30 10 10 10 10 10 10 90
  • -10 เนื่องจากแสดงข้อมูลทั้งหมด ไม่ลิมิตไว้ที่ 100 record
50043173 30 10 10 20 10 0 0 80
  • -20 เนื่องจากไม่อนุญาตให้ผู้ใช้ search เงื่อนไขหลายๆ เงื่อนไขพร้อมๆ กัน
50043215 30 10 10 10 10 0 0 70
  • -10 เนื่องจากแสดงข้อมูลทั้งหมด ไม่ลิมิตไว้ที่ 100 record
  • -20 เนื่องจากเวลา search เงื่อนไขหลายๆ อัน แล้วทำเหมือนกับ search ได้เพียงเงื่อนไขเดียวคือเงื่อนไขสุดท้ายเท่านั้น
50043231 30 8 2 10 10 10 10 80
  • -2 เนื่องจากมีเพียงแค่ 4 ฟีลด์
  • -8 เนื่องจากมีเพียงแค่ 137 record
  • -10 เนื่องจากแสดงข้อมูลทั้งหมด ไม่ลิมิตไว้ที่ 100 record
50043306 30 10 10 10 10 10 10 90
  • -10 เนื่องจากแสดงข้อมูลทั้งหมด ไม่ลิมิตไว้ที่ 100 record
51043214
50180249
51180198 30 10 10 10 10 10 10 60
  • -10 เนื่องจากแสดงข้อมูลทั้งหมด ไม่ลิมิตไว้ที่ 100 record
  • -30 เนื่องจากเจอ syntax error เวลาเข้าหน้า search
51180503 30 10 10 10 10 10 10 90
  • -10 เนื่องจากแสดงข้อมูลทั้งหมด ไม่ลิมิตไว้ที่ 100 record

เกณฑ์การให้คะแนน

  • 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

  • -10 การทดสอบระบบเป็นไปได้ด้วยยาก
  • รหัสนิสิต A(10) B(15) C(15) D(15) E(30) F(15) รวม หมายเหตุ
    50040229 10 0 15 0 20 0 45
    • -15 ไม่มี Authentication
    • -15 ไม่มี Field Validations
    • -15 ไม่มีรายงานรายรับรายจ่าย
    50042993
    50043058 10 15 15 15 30 15 100
    50043082 10 15 15 15 30 15 100
    50043140 10 10 15 15 25 0 75
    • -5 สามารถเพิ่มรายการได้แม้ว่ายังไม่ผ่านการล็อกอิน
    • -15 เรียกดูรายงานแล้วเกิด error ว่า undefined method 'datetimedo' for nil:NilClass
    50043173 10 10 15 15 20 5 75
    • -5 แม้ว่าล็อกเอ้าท์แล้วก็ยังสามารถกลับไปทำรายการได้
    • -10 ขาดการจำแนกประเภทรายการรายรับและรายจ่าย
    • -10 รายงานขาดความสมบูรณ์
    50043215 10 15 15 15 20 5 80
    • -10 ขาดการจำแนกประเภทรายการรายรับและรายจ่าย
    • -10 รายงานขาดความสมบูรณ์
    50043231 10 15 15 15 20 5 80
    • -10 ขาดการจำแนกประเภทรายการรายรับและรายจ่าย
    • -10 รายงานขาดความสมบูรณ์
    50043306 10 15 15 15 20 5 80
    • -10 ขาดการจำแนกประเภทรายการรายรับและรายจ่าย
    • -10 รายงานยังจำแนกได้ไม่ละเอียด
    51043214
    50180249
    51180198 0 0 10 10 15 0 35
    • -10 ช่วงเตรียมข้อมูลแล้วมี error
    51180503 0 15 10 15 15 5 60
    • -10 โปรแกรมเกิด routing error
    • -10 รายงานไม่เหมาะสมในการใช้งาน

    เกณฑ์การให้คะแนน

    • 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

    คนที่ไม่ได้คะแนนเนื่องจากลอกกัน

    • 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>