MDL-27624 Small structural changes

MDL-27624 SCORM adding definition to scrom elements
	modified:   mod/scorm/lang/en/scorm.php
	modified:   mod/scorm/userreport.php
This commit is contained in:
Ankit Kumar Agarwal
2011-08-19 11:17:19 +12:00
committed by Dan Marsden
parent 4f3632441a
commit 266a129c14
2 changed files with 60 additions and 10 deletions
+15
View File
@@ -81,6 +81,7 @@ $string['displaysettings'] = 'Display Settings';
$string['domxml'] = 'DOMXML external library';
$string['duedate'] = 'Due date';
$string['element'] = 'Element';
$string['elementdefinition'] = 'Element Definition';
$string['enter'] = 'Enter';
$string['entercourse'] = 'Enter course';
$string['errorlogs'] = 'Errors log';
@@ -145,6 +146,20 @@ $string['identifier'] = 'Question identifier';
$string['incomplete'] = 'Incomplete';
$string['info'] = 'Info';
$string['interactions'] = 'Interactions';
$string['interactionsid'] = 'Id of the element';
$string['interactionscorrectcount'] = 'Number of correct results for the question';
$string['interactionspattern'] = 'Pattern of correct response';
$string['interactionslatency'] = 'Time elapsed between the time the interaction <br />was made available to the learner for response <br />and the time of the first response';
$string['interactionsresponse'] = 'Student\'s Response';
$string['interactionsresult'] = 'Result based on student\'s response and <br />correct result';
$string['interactionsscoremin'] = 'Minimum value in the range for the raw score';
$string['interactionsscoremax'] = 'Maximum value in the range for the raw score';
$string['interactionsscoreraw'] = 'Number that reflects the performance of the learner<br /> relative to the range bounded by the values of min and max';
$string['interactionssuspenddata'] = 'Provides space to store and retrieve data <br />between learner sessions';
$string['interactionstime'] = 'Time at which the attempt was intiated';
$string['interactionstype'] = 'Type of question';
$string['interactionsweight'] = 'Weight assigned to the element';
$string['interactionslearnerresponse'] = 'Learner\'s Response';
$string['invalidactivity'] = 'Scorm activity is incorrect';
$string['invalidmanifestresource'] = 'WARNING: The following resources were referenced in your manifest but couldn\'t be found:';
$string['last'] = 'Last accessed on';
+45 -10
View File
@@ -15,13 +15,13 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This page displays the user data from a single attempt
*
* @package mod
* @subpackage scorm
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* This page displays the user data from a single attempt
*
* @package mod
* @subpackage scorm
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once("../../config.php");
require_once($CFG->dirroot.'/mod/scorm/locallib.php');
@@ -289,7 +289,7 @@ if (!empty($b)) {
'cmi.objectives.'.$i.'.score.max');
$row = array();
foreach ($elements as $element) {
if (isset($trackdata->$element)) {
if (isset($trackdata->$element)) {
$row[] = s($trackdata->$element);
$printedelements[]=$element;
} else {
@@ -306,7 +306,7 @@ if (!empty($b)) {
echo html_writer::table($table);
}
$table = new html_table();
$table->head = array(get_string('element', 'scorm'), get_string('value', 'scorm'));
$table->head = array(get_string('element', 'scorm'), get_string('elementdefinition', 'scorm'), get_string('value', 'scorm'));
$table->align = array('left', 'left');
$table->wrap = array('nowrap', 'wrap');
$table->width = '100%';
@@ -319,7 +319,42 @@ if (!empty($b)) {
if (!(in_array ($element, $printedelements))) {
$existelements = true;
$row = array();
$row[] = get_string($element, 'scorm') != '[['.$element.']]' ? get_string($element, 'scorm') : $element;
$string=false;
if (stristr($element, '.id')!=null) {
$string="interactionsid";
} else if (stristr($element, '.result')!=null) {
$string="interactionsresult";
} else if (stristr($element, '.student_response')!=null) {
$string="interactionsresponse";
} else if (stristr($element, '.type')!=null) {
$string="interactionstype";
} else if (stristr($element, '.weighting')!=null) {
$string="interactionsweight";
} else if (stristr($element, '.time')!=null) {
$string="interactionstime";
} else if (stristr($element, '.correct_responses._count')!=null) {
$string="interactionscorrectcount";
} else if (stristr($element, '.learner_response')!=null) {
$string="interactionslearnerresponse";
} else if (stristr($element, '.score.min')!=null) {
$string="interactionslscoremin";
} else if (stristr($element, '.score.max')!=null) {
$string="interactionsscoremax";
} else if (stristr($element, '.score.raw')!=null) {
$string="interactionsscoreraw";
} else if (stristr($element, '.latency')!=null) {
$string="interactionslatency";
} else if (stristr($element, '.pattern')!=null) {
$string="interactionspattern";
} else if (stristr($element, '.suspend_data')!=null) {
$string="interactionssuspenddata";
}
$row[]=$element;
if (empty($string)) {
$row[]=$element;
} else {
$row[] = get_string($string, 'scorm');
}
if (strpos($element, '_time') === false) {
$row[] = s($value);
} else {