| |
58 |
58 |
|
| |
59 |
59 |
if { ![info exists asmid] } { |
| |
60 |
60 |
set asmid "-1" |
| |
61 |
61 |
} |
| |
62 |
62 |
|
| |
63 |
63 |
if { ![info exists revision] } { |
| |
64 |
64 |
set revision "no" |
| |
65 |
65 |
} |
| |
66 |
66 |
|
| |
67 |
67 |
set category_p [db_string get_category { } -default -1] |
| |
68 |
68 |
|
| |
69 |
69 |
set info $course_info |
| |
70 |
70 |
set name $course_name |
| |
71 |
71 |
set edit "yes" |
| |
72 |
72 |
set asm $asm_name |
| |
73 |
73 |
set info [ad_html_text_convert -from text/enhanced -to text/plain $info] |
| |
74 |
74 |
|
| |
75 |
75 |
set cc_package_id [apm_package_id_from_key "dotlrn-catalog"] |
| |
76 |
76 |
|
| |
77 |
77 |
# Get the category name |
| |
78 |
|
set category_names "[category::get_names [category::get_mapped_categories $course_id]]" |
| |
|
78 |
set category_names [join [category::get_names [category::get_mapped_categories $course_id]] ", "] |
| |
79 |
79 |
|
| |
80 |
80 |
# Check if user has admin permission over course_id |
| |
81 |
81 |
set admin_p 0 |
| |
82 |
82 |
if { [permission::permission_p -object_id $cc_package_id -privilege "create"] } { |
| |
83 |
83 |
set item_id [dotlrn_catalog::get_item_id -revision_id $course_id] |
| |
84 |
84 |
if { [permission::permission_p -object_id $course_id -privilege "admin"] } { |
| |
85 |
85 |
set admin_p 1 |
| |
86 |
86 |
} else { |
| |
87 |
87 |
set admin_p 0 |
| |
88 |
88 |
} |
| |
89 |
89 |
} |
| |
90 |
90 |
|
| |
91 |
91 |
|
| |
92 |
92 |
set obj_n 0 |
| |
93 |
93 |
set dotlrn_class "(" |
| |
94 |
94 |
set dotlrn_com "(" |
| |
95 |
95 |
|
| |
96 |
96 |
# For dotlrn associations |
| |
97 |
97 |
db_multirow -extend { obj_n admin_p } relations relation { } { |
| |
98 |
98 |
set obj_n 1 |