@@ 3689-3696 (lines=8) @@ | ||
3686 | access_session_id = '$session_id' |
|
3687 | ORDER BY access_date DESC limit 1"; |
|
3688 | $rs = Database::query($sql); |
|
3689 | if (Database::num_rows($rs) > 0) { |
|
3690 | $row = Database::fetch_array($rs); |
|
3691 | $date_time = api_convert_and_format_date( |
|
3692 | $row['access_date'], |
|
3693 | null, |
|
3694 | date_default_timezone_get() |
|
3695 | ); |
|
3696 | } |
|
3697 | return $date_time; |
|
3698 | } |
|
3699 |
@@ 1605-1610 (lines=6) @@ | ||
1602 | ||
1603 | $result = Database::query($sql); |
|
1604 | $is_visible = false; |
|
1605 | if (Database::num_rows($result) > 0) { |
|
1606 | $row = Database::fetch_array($result, 'ASSOC'); |
|
1607 | if ($row['visibility'] == 1) { |
|
1608 | $is_visible = api_is_allowed_in_course() || api_is_platform_admin(); |
|
1609 | } |
|
1610 | } |
|
1611 | ||
1612 | /* improved protection of documents viewable directly through the url: |
|
1613 | incorporates the same protections of the course at the url of |