| @@ 841-846 (lines=6) @@ | ||
| 838 | $cacheAvailable = api_get_configuration_value('apc'); |
|
| 839 | if ($cacheAvailable === true) { |
|
| 840 | $apcVar = api_get_configuration_value('apc_prefix').'my_campus_whoisonline_count_simple'; |
|
| 841 | if (apcu_exists($apcVar)) { |
|
| 842 | $number = apcu_fetch($apcVar); |
|
| 843 | } else { |
|
| 844 | $number = who_is_online_count(api_get_setting('time_limit_whosonline')); |
|
| 845 | apcu_store($apcVar, $number, 15); |
|
| 846 | } |
|
| 847 | } else { |
|
| 848 | $number = who_is_online_count(api_get_setting('time_limit_whosonline')); |
|
| 849 | } |
|
| @@ 867-880 (lines=14) @@ | ||
| 864 | if (!empty($_course['id'])) { |
|
| 865 | if ($cacheAvailable === true) { |
|
| 866 | $apcVar = api_get_configuration_value('apc_prefix').'my_campus_whoisonline_count_simple_'.$_course['id']; |
|
| 867 | if (apcu_exists($apcVar)) { |
|
| 868 | $numberOnlineInCourse = apcu_fetch($apcVar); |
|
| 869 | } else { |
|
| 870 | $numberOnlineInCourse = who_is_online_in_this_course_count( |
|
| 871 | $userId, |
|
| 872 | api_get_setting('time_limit_whosonline'), |
|
| 873 | $_course['id'] |
|
| 874 | ); |
|
| 875 | apcu_store( |
|
| 876 | $apcVar, |
|
| 877 | $numberOnlineInCourse, |
|
| 878 | 15 |
|
| 879 | ); |
|
| 880 | } |
|
| 881 | } else { |
|
| 882 | $numberOnlineInCourse = who_is_online_in_this_course_count( |
|
| 883 | $userId, |
|