Proyectos de Subversion Android Microlearning

Rev

Rev 29 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 29 Rev 44
Línea 18... Línea 18...
18
import android.view.MenuInflater;
18
import android.view.MenuInflater;
19
import android.view.View;
19
import android.view.View;
20
import android.view.ViewGroup;
20
import android.view.ViewGroup;
21
import android.widget.TextView;
21
import android.widget.TextView;
Línea -... Línea 22...
-
 
22
 
22
 
23
import com.cesams.twogetskills.Constants;
23
import com.cesams.twogetskills.R;
24
import com.cesams.twogetskills.R;
24
import com.cesams.twogetskills.dao.CapsuleDao;
25
import com.cesams.twogetskills.dao.CapsuleDao;
Línea 25... Línea 26...
25
import com.cesams.twogetskills.dao.ProgressDao;
26
import com.cesams.twogetskills.dao.ProgressDao;
Línea 218... Línea 219...
218
        }
219
        }
219
    }
220
    }
Línea 220... Línea 221...
220
 
221
 
221
    private void loadData()
222
    private void loadData()
-
 
223
    {
-
 
224
        int fragmentIdxActive = iTwoGetSkills.getPreference().getFragmentIdxActive();
-
 
225
        if (fragmentIdxActive != Constants.IDX_FRAGMENT_PROGRESS) {
-
 
226
            return;
-
 
227
        }
-
 
228
 
-
 
229
        Log.d("BUG 2PLANO", "TopicFragment - loadData");
Línea -... Línea 230...
-
 
230
 
222
    {
231
 
223
 
232
        String userUuid = iTwoGetSkills.getPreference().getUserUuid();
224
        String companyUuid = iTwoGetSkills.getCompanyUuidActive();
233
        String companyUuid = iTwoGetSkills.getCompanyUuidActive();
225
        if(TextUtils.isEmpty(companyUuid)) {
234
        if(TextUtils.isEmpty(companyUuid)) {
226
            List<Company> companies = iTwoGetSkills.getDatabase().getCompanyDao().selectAll();
235
            List<Company> companies = iTwoGetSkills.getDatabase().getCompanyDao().selectAll();
Línea 260... Línea 269...
260
        {
269
        {
261
            resultCount = capsuleDao.getCountByTopicUuid(topic.getUuid());
270
            resultCount = capsuleDao.getCountByTopicUuid(topic.getUuid());
262
            capsuleTotal =  capsuleTotal + resultCount.getCount();
271
            capsuleTotal =  capsuleTotal + resultCount.getCount();
Línea 263... Línea 272...
263
 
272
 
264
 
273
 
Línea 265... Línea 274...
265
            resultCount = progressDao.getCountCapsulesCompletedByTopicUuid(topic.getUuid());
274
            resultCount = progressDao.getCountCapsulesCompletedByTopicUuidAndUserUuid(topic.getUuid(), userUuid);
266
            capsuleTotalCompleted = capsuleTotalCompleted + resultCount.getCount();
275
            capsuleTotalCompleted = capsuleTotalCompleted + resultCount.getCount();
Línea 267... Línea 276...
267
 
276
 
268
 
277
 
Línea 269... Línea 278...
269
 
278
 
270
            resultTotalInt = progressDao.getCountCapsulesCompletedWithReturningByTopicUuid(topic.getUuid());
279
            resultTotalInt = progressDao.getCountCapsulesCompletedWithReturningByTopicUuidAndUserUuid(topic.getUuid(), userUuid);
Línea 271... Línea 280...
271
            capsuleTotalWithReturning = capsuleTotalWithReturning + resultTotalInt.getTotal();
280
            capsuleTotalWithReturning = capsuleTotalWithReturning + resultTotalInt.getTotal();
272
 
281
 
273
 
282
 
274
 
283
 
275
            resultCount = progressDao.getCountCapsulesCompletedWithoutReturningByTopicUuid(topic.getUuid());
284
            resultCount = progressDao.getCountCapsulesCompletedWithoutReturningByTopicUuidAndUserUuid(topic.getUuid(), userUuid);
276
            capsuleTotalWithoutReturning = capsuleTotalWithoutReturning + resultCount.getCount();mProgressViewModel.getProgress().setCapsuleWithoutReturning(mProgressViewModel.getProgress().getCapsuleWithoutReturning() +resultCount.getCount());
285
            capsuleTotalWithoutReturning = capsuleTotalWithoutReturning + resultCount.getCount();mProgressViewModel.getProgress().setCapsuleWithoutReturning(mProgressViewModel.getProgress().getCapsuleWithoutReturning() +resultCount.getCount());