Kaynağa Gözat

#1689 When profile status isn't 'active' then hide any profile content: classes

Alex Trofimov 4 yıl önce
ebeveyn
işleme
c7ae8dc08a

+ 1 - 1
modules/boonex/classes/classes/BxClssDb.php

@@ -214,7 +214,7 @@ class BxClssDb extends BxBaseModTextDb
         if (!$aContentInfo)
             return array();
 
-        $a = $this->getColumn("SELECT `student_profile_id` FROM `bx_classes_statuses` WHERE `class_id` = :class AND `completed` != 0 LIMIT :start, :limit", array(
+        $a = $this->getColumn("SELECT `student_profile_id` FROM `bx_classes_statuses` INNER JOIN `sys_profiles` AS `p` ON(`p`.`id` = `student_profile_id` AND `p`.`status` = 'active') WHERE `class_id` = :class AND `completed` != 0 LIMIT :start, :limit", array(
             'class' => $aContentInfo['id'],
             'start' => (int)$iStart,
             'limit' => (int)$iLimit,

+ 1 - 0
modules/boonex/classes/classes/BxClssSearchResult.php

@@ -151,6 +151,7 @@ class BxClssSearchResult extends BxBaseModTextSearchResult
         $this->processReplaceableMarkers($oProfileAuthor);
 
         $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+        $this->addCustomConditions($CNF, $oProfileAuthor, $sMode, $aParams);
     }
 
     function getAlterOrder()