openequella / openEQUELLA

Core openEQUELLA sources
https://openequella.github.io/
Apache License 2.0
41 stars 43 forks source link

Issues with audit logging of views of SCORM packages #841

Closed mrblippy closed 5 years ago

mrblippy commented 5 years ago

Describe the bug In openEQUELLA all file attachments get an entry added (CONTENT_VIEWED in the event_type column) to the audit_log_entry table whenever an attachment is accessed from the filestore.

A client is having an issue with audit logging for SCORM packages. In particular how the referrer entry in the meta column is functioning.

When a SCORM package is viewed in openEQUELLA it generates a viewscorm.jsp URL (this is openEQUELLA's package viewer). This doesn't get logged as a content view in the audit log table, but the files inside the SCORM package do.

The issue is when a SCORM is accessed from an LMS. An Edalex client (TANZ) adds SCORM packages to their LMS, and wants to track the referrer of all CONTENT_VIEWED events. The first content view event logged for a SCORM package attachment is the entry point (e.g. PRINCE2.zip/index_lms.html) with HTTP referrer being viewscorm.jsp.

The original referrer (e.g. TANZ's Moodle is lost).

What we need to do is either:

or

To Reproduce

Steps to reproduce the behaviour:

Ensure you have your audit.level (in learningedge-config\plugins\com.tle.web.viewitem\madatory.properties) set to 'NORMAL')

  1. Start a contribution inside openEQUELLA
  2. Add the attached file as a SCORM attachment
  3. Save the item
  4. Using an LMS (eg. Moodle) start a selection session, and add the attachment you added in step 1
  5. Click the attachment in your LMS
  6. View the openEQUELLA audit_log_entry table using the database administration program of your choosing)
  7. The bottom entry should look similar to the following Capture
  8. Notice there is nothing in the meta column indicating that you accessed the attachment via an LMS

Expected behavior

When a user accesses a SCORM package the referrer entry in the meta column of the audit_log_entry table should be the URL of the LMS.

Platform:

ContentPackagingSingleSCO_SCORM12.zip

mrblippy commented 5 years ago

This has been fixed and verified in 2018.2 and 2019.1