26 protected \ilDBInterface
$db;
32 $this->db =
$DIC->database();
39 "SELECT act_est_reading_time FROM content_object " .
45 return (
bool) $rec[
"act_est_reading_time"];
50 public function activate(
int $lm_id,
bool $activated): void
56 "act_est_reading_time" => [
"integer", $activated]
59 "id" => [
"integer", $lm_id]
70 "est_reading_time" => [
"integer", $reading_time]
73 "id" => [
"integer", $lm_id]
80 if (!isset(self::$times[$lm_id])) {
83 return self::$times[$lm_id];
90 "SELECT id, act_est_reading_time, est_reading_time FROM content_object " .
91 " WHERE " .
$db->
in(
"id", $lm_ids,
false,
"integer"),
95 foreach ($lm_ids as $lm_id) {
96 self::$times[(
int) $lm_id] =
null;
99 if ($rec[
"act_est_reading_time"]) {
100 self::$times[(
int) $rec[
"id"]] = (
int) $rec[
"est_reading_time"];
getReadingTime(int $lm_id)
saveReadingTime(int $lm_id, int $reading_time)
activate(int $lm_id, bool $activated)
update(string $table_name, array $values, array $where)
@description $where MUST contain existing columns only.
fetchAssoc(ilDBStatement $statement)
queryF(string $query, array $types, array $values)
in(string $field, array $values, bool $negate=false, string $type="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...