Skip to content

Commit

Permalink
MDL-53196 tool_lp: Add relevant record snapshot to existing events
Browse files Browse the repository at this point in the history
  • Loading branch information
gauts authored and Frederic Massart committed Apr 18, 2016
1 parent c7f2b74 commit e375c65
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions admin/tool/lp/classes/event/competency_created.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public static function create_from_competency(competency $competency) {
'contextid' => $competency->get_context()->id,
'objectid' => $competency->get_id()
));
$event->add_record_snapshot(competency::TABLE, $competency->to_record());
return $event;
}

Expand Down
3 changes: 2 additions & 1 deletion admin/tool/lp/classes/event/competency_deleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ public static function create_from_competency(competency $competency) {
}
$event = static::create(array(
'contextid' => $competency->get_context()->id,
'objectid' => $competency->get_id()
'objectid' => $competency->get_id(),
));
$event->add_record_snapshot(competency::TABLE, $competency->to_record());
return $event;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public static final function create_from_framework(competency_framework $framewo
'contextid' => $framework->get_contextid(),
'objectid' => $framework->get_id()
));
$event->add_record_snapshot(competency_framework::TABLE, $framework->to_record());
return $event;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public static final function create_from_framework(competency_framework $framewo
'contextid' => $framework->get_contextid(),
'objectid' => $framework->get_id()
));
$event->add_record_snapshot(competency_framework::TABLE, $framework->to_record());
return $event;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public static final function create_from_framework(competency_framework $framewo
'contextid' => $framework->get_contextid(),
'objectid' => $framework->get_id()
));
$event->add_record_snapshot(competency_framework::TABLE, $framework->to_record());
return $event;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public static function create_from_framework(competency_framework $framework) {
'contextid' => $framework->get_contextid(),
'objectid' => $framework->get_id()
));
$event->add_record_snapshot(competency_framework::TABLE, $framework->to_record());
return $event;
}

Expand Down
1 change: 1 addition & 0 deletions admin/tool/lp/classes/event/competency_updated.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public static function create_from_competency(competency $competency) {
'contextid' => $competency->get_context()->id,
'objectid' => $competency->get_id()
));
$event->add_record_snapshot(competency::TABLE, $competency->to_record());
return $event;
}

Expand Down
1 change: 1 addition & 0 deletions admin/tool/lp/classes/event/competency_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public static function create_from_competency(competency $competency) {
'contextid' => $competency->get_context()->id,
'objectid' => $competency->get_id()
));
$event->add_record_snapshot(competency::TABLE, $competency->to_record());
return $event;
}

Expand Down
1 change: 1 addition & 0 deletions admin/tool/lp/classes/event/plan_created.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public static final function create_from_plan(plan $plan) {
'contextid' => $plan->get_context()->id,
'objectid' => $plan->get_id()
));
$event->add_record_snapshot(plan::TABLE, $plan->to_record());
return $event;
}

Expand Down
1 change: 1 addition & 0 deletions admin/tool/lp/classes/event/plan_deleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public static final function create_from_plan(plan $plan) {
'contextid' => $plan->get_context()->id,
'objectid' => $plan->get_id()
));
$event->add_record_snapshot(plan::TABLE, $plan->to_record());
return $event;
}

Expand Down
1 change: 1 addition & 0 deletions admin/tool/lp/classes/event/plan_updated.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public static final function create_from_plan(plan $plan) {
'contextid' => $plan->get_context()->id,
'objectid' => $plan->get_id()
));
$event->add_record_snapshot(plan::TABLE, $plan->to_record());
return $event;
}

Expand Down
1 change: 1 addition & 0 deletions admin/tool/lp/classes/event/plan_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public static function create_from_plan(plan $plan) {
'contextid' => $plan->get_context()->id,
'objectid' => $plan->get_id()
));
$event->add_record_snapshot(plan::TABLE, $plan->to_record());
return $event;
}

Expand Down
1 change: 1 addition & 0 deletions admin/tool/lp/classes/event/template_created.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public static final function create_from_template(template $template) {
'contextid' => $template->get_contextid(),
'objectid' => $template->get_id()
));
$event->add_record_snapshot(template::TABLE, $template->to_record());
return $event;
}

Expand Down
1 change: 1 addition & 0 deletions admin/tool/lp/classes/event/template_deleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public static final function create_from_template(template $template) {
'contextid' => $template->get_contextid(),
'objectid' => $template->get_id()
));
$event->add_record_snapshot(template::TABLE, $template->to_record());
return $event;
}

Expand Down
1 change: 1 addition & 0 deletions admin/tool/lp/classes/event/template_updated.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public static final function create_from_template(template $template) {
'contextid' => $template->get_contextid(),
'objectid' => $template->get_id()
));
$event->add_record_snapshot(template::TABLE, $template->to_record());
return $event;
}

Expand Down
1 change: 1 addition & 0 deletions admin/tool/lp/classes/event/template_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public static function create_from_template(template $template) {
'contextid' => $template->get_contextid(),
'objectid' => $template->get_id()
));
$event->add_record_snapshot(template::TABLE, $template->to_record());
return $event;
}

Expand Down

0 comments on commit e375c65

Please sign in to comment.