Skip to content
GitLab
Explore
Sign in
ilias-core
ILIAS
Compare revisions
eb33c2a8ae80bbd25f371468e5f2ffc902b2661a to e5d6c847b37e02cdbcd1251c700b513736d4764c
Commits on Source (3)
9 testrail ilias 73644
· 3d31b8ab
Stefan Meyer
authored
Apr 25, 2024
3d31b8ab
Merge branch 'trunk' of github.com:ILIAS-eLearning/ILIAS into trunk
· e93b9b63
Stefan Meyer
authored
May 07, 2024
e93b9b63
Course objectives: coding style
· e5d6c847
Stefan Meyer
authored
May 07, 2024
e5d6c847
Hide whitespace changes
Inline
Side-by-side
components/ILIAS/Course/classes/Objectives/class.ilCourseObjectiveResult.php
View file @
e5d6c847
<?php
<?php
/**
/**
* This file is part of ILIAS, a powerful learning management system
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
* published by ILIAS open source e-Learning e.V.
...
@@ -16,6 +15,8 @@
...
@@ -16,6 +15,8 @@
*
*
*********************************************************************/
*********************************************************************/
declare
(
strict_types
=
0
);
/**
/**
* class ilcourseobjective
* class ilcourseobjective
* @author Stefan Meyer <meyer@leifos.com>
* @author Stefan Meyer <meyer@leifos.com>
...
@@ -392,14 +393,20 @@ class ilCourseObjectiveResult
...
@@ -392,14 +393,20 @@ class ilCourseObjectiveResult
public
static
function
__isFullfilled
(
array
$question_points
,
array
$objective_data
):
bool
public
static
function
__isFullfilled
(
array
$question_points
,
array
$objective_data
):
bool
{
{
global
$DIC
;
if
(
!
is_array
(
$objective_data
[
'questions'
]))
{
if
(
!
is_array
(
$objective_data
[
'questions'
]))
{
return
false
;
return
false
;
}
}
$max_points
=
0
;
$max_points
=
0
;
$reached_points
=
0
;
$reached_points
=
0
;
foreach
(
$objective_data
[
'questions'
]
as
$question_id
)
{
foreach
(
$objective_data
[
'questions'
]
as
$question_id
)
{
$max_points
+=
$question_points
[
$question_id
][
'max_points'
];
if
(
array_key_exists
(
$question_id
,
$question_points
))
{
$reached_points
+=
$question_points
[
$question_id
][
'reached_points'
]
??
0
;
$max_points
+=
$question_points
[
$question_id
][
'max_points'
];
$reached_points
+=
$question_points
[
$question_id
][
'reached_points'
]
??
0
;
}
else
{
$DIC
->
logger
()
->
crs
()
->
warning
(
'stale question in course objective assignment table id '
.
$question_id
);
}
}
}
if
(
!
$max_points
)
{
if
(
!
$max_points
)
{
return
false
;
return
false
;
...
...
components/ILIAS/Tracking/classes/class.ilTrQuery.php
View file @
e5d6c847
...
@@ -2080,7 +2080,7 @@ class ilTrQuery
...
@@ -2080,7 +2080,7 @@ class ilTrQuery
$res
=
array
();
$res
=
array
();
while
(
$row
=
$ilDB
->
fetchAssoc
(
$set
))
{
while
(
$row
=
$ilDB
->
fetchAssoc
(
$set
))
{
$res
[]
=
array
(
"month"
=>
$row
[
"yyyy"
]
.
"-"
.
$row
[
"mm"
],
$res
[]
=
array
(
"month"
=>
$row
[
"yyyy"
]
.
"-"
.
$row
[
"mm"
],
"count"
=>
(
int
)
(
$row
[
"
counter
"
]
??
0
)
"count"
=>
(
int
)
(
$row
[
"
COUNTER
"
]
??
0
)
);
);
}
}
return
$res
;
return
$res
;
...
...