Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
Classes with all lessons removed were not displayed
  • Loading branch information
padvincenzo authored Jul 28, 2021
1 parent 69a00d8 commit c1c24a0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ajax/class.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,9 @@ function deleteClass() {
function listClasses() {
global $dbh, $lang;
$result = $dbh->query("select c.idclass, c.name, c.professor, c.directory, count(l.idclass) as nLessons, sum(l.watched) as nWatched
from class c left join lesson l
from class c left join (select * from lesson where removed is not true) l
on l.idclass = c.idclass
where c.removed is not true
and l.removed is not true
group by c.idclass
order by max(l.lastPlayed) desc;");
if($result) {
Expand Down

0 comments on commit c1c24a0

Please sign in to comment.