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
Marcus Eibrink-Lunzenauer
Stud.IP
Commits
e39801cc
Commit
e39801cc
authored
5 months ago
by
Jan-Hendrik Willms
Browse files
Options
Downloads
Patches
Plain Diff
fix access to removed column start_time and dremove obsolete duration seminar counter, fixes #4656
Closes #4656 Merge request
studip/studip!3467
parent
326f93fa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/views/admin/semester/index.php
+1
-2
1 addition, 2 deletions
app/views/admin/semester/index.php
lib/models/Semester.php
+5
-12
5 additions, 12 deletions
lib/models/Semester.php
with
6 additions
and
14 deletions
app/views/admin/semester/index.php
+
1
−
2
View file @
e39801cc
...
...
@@ -84,8 +84,7 @@
</td>
<td>
<?=
$semester
->
absolute_seminars_count
?>
<?=
sprintf
(
_
(
'(+%u implizit)'
),
$semester
->
continuous_seminars_count
+
$semester
->
duration_seminars_count
)
?>
<?=
sprintf
(
_
(
'(+%u implizit)'
),
$semester
->
continuous_seminars_count
)
?>
</td>
<td
class=
"actions"
nowrap
>
...
...
This diff is collapsed.
Click to expand it.
lib/models/Semester.php
+
5
−
12
View file @
e39801cc
...
...
@@ -33,7 +33,6 @@
* @property-read mixed $past additional field
* @property-read mixed $short_name additional field
* @property mixed $absolute_seminars_count additional field
* @property mixed $duration_seminars_count additional field
* @property mixed $continuous_seminars_count additional field
*/
class
Semester
extends
SimpleORMap
...
...
@@ -59,10 +58,6 @@ class Semester extends SimpleORMap
'get'
=>
'seminarCounter'
,
'set'
=>
false
,
];
$config
[
'additional_fields'
][
'duration_seminars_count'
]
=
[
'get'
=>
'seminarCounter'
,
'set'
=>
false
,
];
$config
[
'additional_fields'
][
'continuous_seminars_count'
]
=
[
'get'
=>
'seminarCounter'
,
'set'
=>
false
,
...
...
@@ -320,17 +315,15 @@ class Semester extends SimpleORMap
if
(
$this
->
seminar_counts
===
null
)
{
$query
=
"
SELECT SUM(IF(semester_courses.semester_id IS NULL, 1, 0)) AS continuous,
0 AS duration,
SUM(IF(semester_courses.semester_id IS NOT NULL, 1, 0)) AS absolute
FROM seminare
LEFT JOIN semester_courses ON (seminare.Seminar_id = semester_courses.course_id)
WHERE start_time <= :beginn
AND (semester_courses.semester_id IS NULL OR semester_courses.semester_id = :semester_id)
"
;
LEFT JOIN semester_courses ON (seminare.Seminar_id = semester_courses.course_id)
WHERE semester_courses.semester_id IS NULL
OR semester_courses.semester_id = :semester_id"
;
$statement
=
DBManager
::
get
()
->
prepare
(
$query
);
$statement
->
bindValue
(
':beginn'
,
$this
[
'beginn'
]);
$statement
->
bindValue
(
':semester_id'
,
$this
[
'semester_id'
]);
$statement
->
bindValue
(
':semester_id'
,
$this
->
id
);
$statement
->
execute
();
$this
->
seminar_counts
=
$statement
->
fetch
(
PDO
::
FETCH_ASSOC
);
}
...
...
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