Proyectos de Subversion LeadersLinked - Services

Rev

Rev 632 | Rev 652 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 632 Rev 636
Línea 173... Línea 173...
173
        
173
        
Línea 174... Línea 174...
174
        //echo $select->getSqlString($this->adapter->platform);
174
        //echo $select->getSqlString($this->adapter->platform);
175
        
175
        
-
 
176
        return $this->executeFetchOneObject($select, $prototype);
-
 
177
    }
-
 
178
 
-
 
179
    public function fetchOneLastCapsuleInProgressByUserIdAndTopicIds($user_id, $topic_ids)
-
 
180
    {
-
 
181
        $prototype = new MicrolearningUserProgress();
-
 
182
        $select = $this->sql->select(self::_TABLE);
-
 
183
        $select->where->equalTo('user_id', $user_id);
-
 
184
        $select->where->in('topic_id', $topic_ids);
-
 
185
        $select->where->equalTo('type', MicrolearningUserProgress::TYPE_CAPSULE);
-
 
186
        $select->where->greaterThan('progress', 0);
-
 
187
        $select->where->lessThan('progress', 100);
-
 
188
        $select->order('updated_on');
-
 
189
        $select->limit(1);
-
 
190
 
Línea 176... Línea 191...
176
        return $this->executeFetchOneObject($select, $prototype);
191
        return $this->executeFetchOneObject($select, $prototype);
177
    }
192
    }
178
    
193
    
179
    /**
194
    /**