Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: app/models/asset.rb
- ===================================================================
- --- app/models/asset.rb (revision 19604)
- +++ app/models/asset.rb (working copy)
- @@ -27,6 +27,7 @@
- left join person_asset_notes teacher_note on teacher_note.person_id = '#{da_user.id}' and teacher_note.asset_id = visible_assets.id and teacher_note.note_type = 'teacher'
- left join person_asset_notes pupil_note on pupil_note.person_id = '#{da_user.id}' and pupil_note.asset_id = visible_assets.id and pupil_note.note_type = 'pupil'
- left join (select asset_id, products.upn, start_year, end_year from assets_products, products, rr_books where product_id = products.id and products.upn = rr_books.upn) rr_books on visible_assets.id = rr_books.asset_id
- + left join (select id as assignment_id, asset_id, person_id, closed from asset_assignments) aa on aa.asset_id = visible_assets.id and aa.person_id = '#{da_user.id}' and not aa.closed
- ",
- :conditions => "search.asset_id = visible_assets.id",
- :order => "search_score desc, title"
- @@ -473,6 +474,10 @@
- !! self.taxa.first(:conditions => ["tag ~ ?", "^mgm\.resource_type\.[^.]{2}\.video$"])
- end
- + def rr_writing_task?
- + kind == "read and respond" && sub_kind = "writing_task"
- + end
- +
- def best_sized_deriv(total_size)
- # this expects a parameter which is the total size of the image, so :px140
- # would be 140*140, using this we can work out the nearest deriv to said size
- Index: app/controllers/assessment_tool/assignment_results_controller.rb
- ===================================================================
- --- app/controllers/assessment_tool/assignment_results_controller.rb (revision 19604)
- +++ app/controllers/assessment_tool/assignment_results_controller.rb (working copy)
- @@ -67,7 +67,10 @@
- end
- @assignment_result.complete = true
- @assignment_result.save!
- - @asset_assignment.close! # Auto-close asset assignment once completed
- + # Auto-close asset assignment once completed except for writing tasks which need marking
- + if ! @asset.rr_writing_task?
- + @asset_assignment.close!
- + end
- render_success "Successfully saved completed result"
- end
- Index: app/controllers/assessment_tool/asset_search_controller.rb
- ===================================================================
- --- app/controllers/assessment_tool/asset_search_controller.rb (revision 19604)
- +++ app/controllers/assessment_tool/asset_search_controller.rb (working copy)
- @@ -99,7 +99,9 @@
- , case when teacher_note.note_type is null then 'false' else 'true' end as has_teacher_note
- , case when pupil_note.note_type is null then 'false' else 'true' end as has_pupil_note
- , case when end_year < 3 then 1 else 2 end as rr_key_stage
- + , assignment_id
- ")
- +
- end
- end
- Index: app/views/assessment_tool/assignment_results/stickers.rxml
- ===================================================================
- --- app/views/assessment_tool/assignment_results/stickers.rxml (revision 19604)
- +++ app/views/assessment_tool/assignment_results/stickers.rxml (working copy)
- @@ -9,6 +9,7 @@
- xml.max_marks assignment_result.max_marks.to_i
- xml.actual_marks assignment_result.actual_marks.to_i
- xml.assignment_result_id assignment_result.id
- + xml.unmarked assignment_result.asset_assignment.open?
- end
- end
- end
- \ No newline at end of file
Add Comment
Please, Sign In to add comment