| |
97 |
97 |
} |
| |
98 |
98 |
} -on_submit { |
| |
99 |
99 |
|
| |
100 |
100 |
set class_instance_id [dotlrn_class::new_instance \ |
| |
101 |
101 |
-class_instance_key $class_instance_key \ |
| |
102 |
102 |
-class_key $class_key \ |
| |
103 |
103 |
-term_id $term \ |
| |
104 |
104 |
-pretty_name $pretty_name \ |
| |
105 |
105 |
-description $description \ |
| |
106 |
106 |
-join_policy $join_policy \ |
| |
107 |
107 |
] |
| |
108 |
108 |
|
| |
109 |
109 |
# Update the time |
| |
110 |
110 |
# This should go into the dotlrn_club::new procedure and the dotlrn_community::new |
| |
111 |
111 |
# But this would involve too much code changes at the moment, so we stick with this for |
| |
112 |
112 |
# the time being :-) MS (openacs@sussdorff.de) |
| |
113 |
113 |
|
| |
114 |
114 |
db_dml update_community_info {} |
| |
115 |
115 |
|
| |
116 |
116 |
if {[empty_string_p $referer]} { |
| |
117 |
|
set referer "admin/class?[export_url_vars class_key]" |
| |
|
117 |
set referer "[dotlrn::get_admin_url]/class?[export_url_vars class_key]" |
| |
118 |
118 |
} |
| |
119 |
119 |
|
| |
120 |
120 |
if {${add_instructor}} { |
| |
121 |
121 |
set community_id $class_instance_id |
| |
122 |
122 |
ad_returnredirect "add-instructor?[export_url_vars community_id referer]" |
| |
123 |
123 |
ad_script_abort |
| |
124 |
124 |
} |
| |
125 |
125 |
|
| |
126 |
126 |
ad_returnredirect $referer |
| |
127 |
127 |
ad_script_abort |
| |
128 |
128 |
} |
| |
129 |
129 |
|
| |
130 |
130 |
# Used by en_US version of new_class_instance message |
| |
131 |
131 |
set class_instances_pretty_name [parameter::get -localize -parameter class_instances_pretty_name] |
| |
132 |
132 |
|
| |
133 |
133 |
set context_bar [list \ |
| |
134 |
134 |
[list classes [parameter::get -localize -parameter classes_pretty_plural]] \ |
| |
135 |
135 |
[list "class?class_key=$class_key" $pretty_name] \ |
| |
136 |
136 |
[_ dotlrn.new_class_instance]] |
| |
137 |
137 |
|