@@ 3072-3097 (lines=26) @@ | ||
3069 | api_get_user_id() |
|
3070 | ); |
|
3071 | ||
3072 | foreach ($thematic->thematic_advance_list as $thematic_advance) { |
|
3073 | unset($thematic_advance['id']); |
|
3074 | unset($thematic_advance['iid']); |
|
3075 | $thematic_advance['attendance_id'] = 0; |
|
3076 | $thematic_advance['thematic_id'] = $last_id; |
|
3077 | $thematic_advance['c_id'] = $this->destination_course_id; |
|
3078 | $my_id = Database::insert( |
|
3079 | $table_thematic_advance, |
|
3080 | $thematic_advance, |
|
3081 | false |
|
3082 | ); |
|
3083 | ||
3084 | if ($my_id) { |
|
3085 | ||
3086 | $sql = "UPDATE $table_thematic_advance SET id = iid WHERE iid = $my_id"; |
|
3087 | Database::query($sql); |
|
3088 | ||
3089 | api_item_property_update( |
|
3090 | $this->destination_course_info, |
|
3091 | 'thematic_advance', |
|
3092 | $my_id, |
|
3093 | "ThematicAdvanceAdded", |
|
3094 | api_get_user_id() |
|
3095 | ); |
|
3096 | } |
|
3097 | } |
|
3098 | ||
3099 | foreach($thematic->thematic_plan_list as $thematic_plan) { |
|
3100 | unset($thematic_plan['id']); |
|
@@ 3099-3119 (lines=21) @@ | ||
3096 | } |
|
3097 | } |
|
3098 | ||
3099 | foreach($thematic->thematic_plan_list as $thematic_plan) { |
|
3100 | unset($thematic_plan['id']); |
|
3101 | unset($thematic_plan['iid']); |
|
3102 | $thematic_plan['thematic_id'] = $last_id; |
|
3103 | $thematic_plan['c_id'] = $this->destination_course_id; |
|
3104 | $my_id = Database::insert($table_thematic_plan, $thematic_plan, false); |
|
3105 | ||
3106 | if ($my_id) { |
|
3107 | ||
3108 | $sql = "UPDATE $table_thematic_plan SET id = iid WHERE iid = $my_id"; |
|
3109 | Database::query($sql); |
|
3110 | ||
3111 | api_item_property_update( |
|
3112 | $this->destination_course_info, |
|
3113 | 'thematic_plan', |
|
3114 | $my_id, |
|
3115 | "ThematicPlanAdded", |
|
3116 | api_get_user_id() |
|
3117 | ); |
|
3118 | } |
|
3119 | } |
|
3120 | } |
|
3121 | } |
|
3122 | } |