Skip to content

Commit

Permalink
LP: Fix publicated_on date when creating lp - refs BT#20443
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Feb 24, 2023
1 parent a5c5c36 commit 9205b9c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions main/lp/learnpath.class.php
Expand Up @@ -772,7 +772,7 @@ public static function add_lp(
if (empty($publicated_on)) {
$publicated_on = null;
} else {
$publicated_on = Database::escape_string(api_get_utc_datetime($publicated_on));
$publicated_on = api_get_utc_datetime($publicated_on, false, true);
}

if (empty($expired_on)) {
Expand All @@ -781,12 +781,6 @@ public static function add_lp(
$expired_on = api_get_utc_datetime($expired_on, false, true);
}

if (empty($publicated_on)) {
$publicated_on = null;
} else {
$publicated_on = api_get_utc_datetime($publicated_on, false, true);
}

$check_name = "SELECT * FROM $tbl_lp
WHERE c_id = $course_id AND name = '".Database::escape_string($name)."'";
$res_name = Database::query($check_name);
Expand Down

0 comments on commit 9205b9c

Please sign in to comment.