josee
committed
on 09 Nov 05
changin wrong field name for the primary key of the conten type imsld_learning_objectives
openacs-4/.../simulation/lib/portfolio.tcl (+1 -5)
5 5     @creation-date 2003-12-20
6 6     @cvs-id $Id$
7 7 } {
8 8     case_id {}
9 9 }
10 10
11 11 set upload_url [export_vars -base document-upload { case_id }]
12 12
13 13 if { [exists_and_not_null case_id] } {
14 14     set user_roles [workflow::case::get_user_roles -case_id $case_id]
15 15 } else {
16 16     set user_roles [list]
17 17 }
18 18
19 19 template::list::create \
20 20     -name documents \
21 21     -multirow documents \
22 22     -no_data "There are no documents." \
23 23     -actions [list "Upload a document" $upload_url] \
24 24     -elements {
25           role_name {
26               label "Role"
27               hide_p {[ad_decode [llength $user_roles] 1 1 0]}
28           }
29 25         document_title {
30 26             label "Document"
31 27             link_url_col document_url
32 28         }       
33 29     }
34 30
35 31 db_multirow -extend { document_url } documents select_documents "
36 32     select scrom.object_id as document_id,
37 33            ci.name  as document_name,
38 34            cr.title as document_title,
39 35            wr.pretty_name as role_name
40 36     from sim_case_role_object_map scrom,
41 37          workflow_roles wr,
42 38          cr_items ci,
43 39          cr_revisions cr
44 40     where scrom.case_id = :case_id
45 41       and scrom.role_id = wr.role_id
46 42       and scrom.object_id = ci.item_id
47 43       and ci.live_revision = cr.revision_id
48 44     order by scrom.order_n