Skip to content

Commit

Permalink
Merge branch 'master_MDL-27624' of git://github.com/danmarsden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Aug 23, 2011
2 parents fb57247 + 784967e commit 379771a
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 10 deletions.
15 changes: 15 additions & 0 deletions mod/scorm/lang/en/scorm.php
Expand Up @@ -81,6 +81,7 @@
$string['domxml'] = 'DOMXML external library'; $string['domxml'] = 'DOMXML external library';
$string['duedate'] = 'Due date'; $string['duedate'] = 'Due date';
$string['element'] = 'Element'; $string['element'] = 'Element';
$string['elementdefinition'] = 'Element Definition';
$string['enter'] = 'Enter'; $string['enter'] = 'Enter';
$string['entercourse'] = 'Enter course'; $string['entercourse'] = 'Enter course';
$string['errorlogs'] = 'Errors log'; $string['errorlogs'] = 'Errors log';
Expand Down Expand Up @@ -145,6 +146,20 @@
$string['incomplete'] = 'Incomplete'; $string['incomplete'] = 'Incomplete';
$string['info'] = 'Info'; $string['info'] = 'Info';
$string['interactions'] = 'Interactions'; $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['invalidactivity'] = 'Scorm activity is incorrect';
$string['invalidmanifestresource'] = 'WARNING: The following resources were referenced in your manifest but couldn\'t be found:'; $string['invalidmanifestresource'] = 'WARNING: The following resources were referenced in your manifest but couldn\'t be found:';
$string['last'] = 'Last accessed on'; $string['last'] = 'Last accessed on';
Expand Down
55 changes: 45 additions & 10 deletions mod/scorm/userreport.php
Expand Up @@ -15,13 +15,13 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.


/** /**
* This page displays the user data from a single attempt * This page displays the user data from a single attempt
* *
* @package mod * @package mod
* @subpackage scorm * @subpackage scorm
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */


require_once("../../config.php"); require_once("../../config.php");
require_once($CFG->dirroot.'/mod/scorm/locallib.php'); require_once($CFG->dirroot.'/mod/scorm/locallib.php');
Expand Down Expand Up @@ -289,7 +289,7 @@
'cmi.objectives.'.$i.'.score.max'); 'cmi.objectives.'.$i.'.score.max');
$row = array(); $row = array();
foreach ($elements as $element) { foreach ($elements as $element) {
if (isset($trackdata->$element)) { if (isset($trackdata->$element)) {
$row[] = s($trackdata->$element); $row[] = s($trackdata->$element);
$printedelements[]=$element; $printedelements[]=$element;
} else { } else {
Expand All @@ -306,7 +306,7 @@
echo html_writer::table($table); echo html_writer::table($table);
} }
$table = new html_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->align = array('left', 'left');
$table->wrap = array('nowrap', 'wrap'); $table->wrap = array('nowrap', 'wrap');
$table->width = '100%'; $table->width = '100%';
Expand All @@ -319,7 +319,42 @@
if (!(in_array ($element, $printedelements))) { if (!(in_array ($element, $printedelements))) {
$existelements = true; $existelements = true;
$row = array(); $row = array();
$row[] = get_string($element, 'scorm') != '[['.$element.']]' ? get_string($element, 'scorm') : $element; $string=false;
if (stristr($element, '.id') !== false) {
$string="interactionsid";
} else if (stristr($element, '.result') !== false) {
$string="interactionsresult";
} else if (stristr($element, '.student_response') !== false) {
$string="interactionsresponse";
} else if (stristr($element, '.type') !== false) {
$string="interactionstype";
} else if (stristr($element, '.weighting') !== false) {
$string="interactionsweight";
} else if (stristr($element, '.time') !== false) {
$string="interactionstime";
} else if (stristr($element, '.correct_responses._count') !== false) {
$string="interactionscorrectcount";
} else if (stristr($element, '.learner_response') !== false) {
$string="interactionslearnerresponse";
} else if (stristr($element, '.score.min') !== false) {
$string="interactionslscoremin";
} else if (stristr($element, '.score.max') !== false) {
$string="interactionsscoremax";
} else if (stristr($element, '.score.raw') !== false) {
$string="interactionsscoreraw";
} else if (stristr($element, '.latency') !== false) {
$string="interactionslatency";
} else if (stristr($element, '.pattern') !== false) {
$string="interactionspattern";
} else if (stristr($element, '.suspend_data') !== false) {
$string="interactionssuspenddata";
}
$row[]=$element;
if (empty($string)) {
$row[]=null;
} else {
$row[] = get_string($string, 'scorm');
}
if (strpos($element, '_time') === false) { if (strpos($element, '_time') === false) {
$row[] = s($value); $row[] = s($value);
} else { } else {
Expand Down

0 comments on commit 379771a

Please sign in to comment.