Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Stud.IP
Commits
e343ab9e
Commit
e343ab9e
authored
2 years ago
by
Elmar Ludwig
Committed by
Jan-Hendrik Willms
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix type hints, closes #2162
Closes #2162 Merge request
studip/studip!1396
parent
69f9e311
No related branches found
No related tags found
1 merge request
!4
Draft: Icon creation
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/classes/JsonApi/Routes/Courseware/UserProgressesOfUnitsShow.php
+2
-2
2 additions, 2 deletions
...s/JsonApi/Routes/Courseware/UserProgressesOfUnitsShow.php
lib/models/Courseware/Instance.php
+4
-4
4 additions, 4 deletions
lib/models/Courseware/Instance.php
with
6 additions
and
6 deletions
lib/classes/JsonApi/Routes/Courseware/UserProgressesOfUnitsShow.php
+
2
−
2
View file @
e343ab9e
...
...
@@ -95,7 +95,7 @@ class UserProgressesOfUnitsShow extends NonJsonApiController
}
private
function
getSelfProgresses
(
iterable
&
$allBlockIds
,
array
&
$allBlockIds
,
string
$elementId
,
array
&
$userProgresses
,
array
&
$courseMemberIds
...
...
@@ -188,4 +188,4 @@ class UserProgressesOfUnitsShow extends NonJsonApiController
return
$data
;
}
}
\ No newline at end of file
}
This diff is collapsed.
Click to expand it.
lib/models/Courseware/Instance.php
+
4
−
4
View file @
e343ab9e
...
...
@@ -412,7 +412,7 @@ class Instance
return
StructuralElement
::
findUsersBookmarksByRange
(
$user
,
$this
->
getRange
());
}
public
function
findAllStructuralElements
():
iterable
public
function
findAllStructuralElements
():
array
{
$sql
=
'SELECT se.*
FROM cw_structural_elements se
...
...
@@ -428,7 +428,7 @@ class Instance
return
$data
;
}
public
function
findAllBlocks
():
iterable
public
function
findAllBlocks
():
array
{
$sql
=
'SELECT b.*
FROM cw_structural_elements se
...
...
@@ -452,10 +452,10 @@ class Instance
*
* @param ?callable(array $row): mixed $formatter Provide your own callable if you need something else instead of
* full-blown instances of \Courseware\Block.
* @return
iterable
all the (optionally formatted) blocks grouped by the IDs of the structural element containing
* @return
array
all the (optionally formatted) blocks grouped by the IDs of the structural element containing
* that block.
*/
public
function
findAllBlocksGroupedByStructuralElementId
(
callable
$formatter
=
null
):
iterable
public
function
findAllBlocksGroupedByStructuralElementId
(
callable
$formatter
=
null
):
array
{
if
(
!
$formatter
)
{
$formatter
=
function
(
$row
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment