Changeset 106
- Timestamp:
- 06.01.2012 18:02:47 (17 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
classes/DigiMinaTest.php (modified) (1 diff)
-
views/default/digimina/desk/tests.php (modified) (1 diff)
-
views/default/forms/digimina/test/competency_choice.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/classes/DigiMinaTest.php
r104 r106 277 277 return false; 278 278 } 279 280 /** 281 * Returns completeness percentage 282 * 283 * return int 284 */ 285 function getCompletenessPercent() { 286 $model = $this->getContainerEntity(); 287 $level_count = $model->getPerformanceLevelCount(); 288 $af_count = (count($this->getAchieved()) + count($this->getFailed())); 289 if (!($level_count || $af_count)) { 290 return 0; 291 } 292 return ($af_count/$level_count)*100; 293 } 279 294 } -
trunk/views/default/digimina/desk/tests.php
r70 r106 15 15 <li class="elgg-item<?php echo ($test->isOngoing()) ? ' digimina-test-ongoing' : ''; ?>"> 16 16 <h3> 17 <a href="<?php echo $test->getURL(); ?>"><?php echo date("F Y", $test->time_created); ?></a> 17 <a href="<?php echo $test->getURL(); ?>"><?php echo date("F Y", $test->time_created); ?></a> 18 <?php if ($test->isOngoing()): ?> 19 ( <?php echo $test->getCompletenessPercent();?> % ) 20 <?php endif; ?> 18 21 </h3> 19 22 </li> -
trunk/views/default/forms/digimina/test/competency_choice.php
r104 r106 50 50 'value' => elgg_echo('digimina:button:next') 51 51 )); 52 echo elgg_view('input/reset', array( 53 /*translation:Cancel*/ 54 'value' => elgg_echo('digimina:button:cancel'), 55 'onclick' => 'elgg.forward();' 56 )); 52 57 } 53 58 ?>

