Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TandemPlugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Uni Osnabrück
Plugins
TandemPlugin
Commits
7e0a09c8
Commit
7e0a09c8
authored
1 year ago
by
Elmar Ludwig
Browse files
Options
Downloads
Patches
Plain Diff
fix counting of matches in widget, fixes
#2
parent
5d1bb235
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
TandemPlugin.class.php
+7
-1
7 additions, 1 deletion
TandemPlugin.class.php
with
7 additions
and
1 deletion
TandemPlugin.class.php
+
7
−
1
View file @
7e0a09c8
...
@@ -275,7 +275,13 @@ class TandemPlugin extends StudIPPlugin implements SystemPlugin, PortalPlugin, H
...
@@ -275,7 +275,13 @@ class TandemPlugin extends StudIPPlugin implements SystemPlugin, PortalPlugin, H
$pair_requests
[
$profile
->
id
]
=
TandemPair
::
countByProfileAndStatus
(
$profile
,
0
);
$pair_requests
[
$profile
->
id
]
=
TandemPair
::
countByProfileAndStatus
(
$profile
,
0
);
if
(
!
$pairs
[
$profile
->
id
])
{
if
(
!
$pairs
[
$profile
->
id
])
{
//We're only looking for matches if no pairs have been found.
//We're only looking for matches if no pairs have been found.
$match_count
[
$profile
->
id
]
=
TandemMatching
::
countMatches
(
$profile
);
$matches
=
TandemMatching
::
findMatches
(
$profile
);
if
(
Config
::
get
()
->
TANDEMPLUGIN_USE_LEVEL
)
{
$matches
=
array_filter
(
$matches
,
function
(
$match
)
use
(
$user_id
)
{
return
$match
->
matchesSpokenLanguages
(
$user_id
);
});
}
$match_count
[
$profile
->
id
]
=
count
(
$matches
);
if
(
$match_count
[
$profile
->
id
]
>
0
)
{
if
(
$match_count
[
$profile
->
id
]
>
0
)
{
$matches_exist
=
true
;
$matches_exist
=
true
;
}
}
...
...
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