Changeset 85
- Timestamp:
- 05.01.2012 11:22:42 (18 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
actions/digimina/test/estimate.php (modified) (1 diff)
-
classes/DigiMinaTest.php (modified) (1 diff)
-
views/default/forms/digimina/test/item.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/actions/digimina/test/estimate.php
r59 r85 16 16 17 17 if (($level instanceof DigiMinaPerformanceLevel) && ($level->getContainerGUID() == $dmtest->getCurrentSubCompetency())) { 18 $item = $level->getRandomItem(); 19 if (!($item instanceof DigiMinaItem)) { 20 /*translation:No questions could be assigned. Please contact administrator.*/ 21 register_error(elgg_echo('digimina:error:no:items:found')); 22 forward(REFERER); 23 } 18 24 $dmtest->current_level = $level->getGUID(); 25 $dmtest->current_item = $item->getGUID(); 19 26 forward('digimina/test'); 20 27 } else { -
trunk/classes/DigiMinaTest.php
r59 r85 76 76 77 77 /** 78 * Returns Item if any 79 * 80 * @return string 81 */ 82 public function getCurrentItem() { 83 return $this->current_item; 84 } 85 86 /** 78 87 * Returns next subcompetency for the test. 79 88 * Changes competency if needed. -
trunk/views/default/forms/digimina/test/item.php
r82 r85 14 14 $subcompetency = $level->getContainerEntity(); 15 15 $competency = $subcompetency->getContainerEntity(); 16 17 // XXX This needs to be saved or something; possibly this should be set elsewhere 18 $item = $level->getRandomItem(); 16 $item = get_entity($dmtest->getCurrentItem()); 19 17 ?> 20 18 <h3> … … 30 28 echo elgg_view_entity($item, array('full_view' => TRUE)); 31 29 } else { 32 /*translation: There are no questions assigned to current level.*/33 echo elgg_echo('digimina:no:question: assigned');30 /*translation:No question was assigned. Please contact administrator.*/ 31 echo elgg_echo('digimina:no:question:was:assigned'); 34 32 } 35 33 ?>

