Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 266a129c14c8ccadbc59fdf4ca38a285a2477eb9 1 parent 4f36324
@ankitagarwal ankitagarwal authored danmarsden committed
Showing with 60 additions and 10 deletions.
  1. +15 −0 mod/scorm/lang/en/scorm.php
  2. +45 −10 mod/scorm/userreport.php
View
15 mod/scorm/lang/en/scorm.php
@@ -81,6 +81,7 @@
$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['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';
View
55 mod/scorm/userreport.php
@@ -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 @@
'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 @@
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 (!(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 {
Please sign in to comment.
Something went wrong with that request. Please try again.