Question ID Variables in DB

andrew-robertson
andrew-robertson Community Member Posts: 145 ☆ Superstar ☆
Hi there - is there any way to remove the additional details at the end of the question variable as it is written to the DB? We have two languages of our content - English / French - and I'd like to make it super easy for my training assessment team to do their required data analysis.

For example, when they export the data from the DB, the Question ID reports: Question_0001_85739, where 85739 appears to be arbitray (see sample screenshot below from our quick analysis.


Andrew R.
Developing content since 2010 using a mixed bag of tools.

Best Answer

  • wheels
    wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 569 eLearning ROCKSTAR Admin Team
    edited June 5, 2021 Accepted Answer
    To remove the unique identifier (the object id) from the question name when reporting interactions [and rely only on question name] you can add the following to your project:

    (the "Append timestamp" publish option for interactions must be unchecked)

    Add an On Show -> Run JavaScript action to your Test.



    Put in this code:
    var TQPr = (findTitleMgrFrame() || myTop).TQPr;
    if (TQPr)
    {
        if (!myTop.origHandleInteractions)
        {
            myTop.origHandleInteractions = TQPr.handleInteractions;
            
            TQPr.handleInteractions = function() {
                var id = this.id;
                this.id = "";
                try {
                    var ret = myTop.origHandleInteractions.apply(this, arguments);
                } finally {
                    this.id = id;
                }
                return ret;
            }
        }
    }

Answers

  • andrew-robertson
    andrew-robertson Community Member Posts: 145 ☆ Superstar ☆
    Bumping this question. Any support?
    Andrew R.
    Developing content since 2010 using a mixed bag of tools.
  • wheels
    wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 569 eLearning ROCKSTAR Admin Team
    Hi sorry I'm not sure what the Scenario is. How is the data being submitted? Is this standard SCORM interaction data? What do the SCORM publish setting look like?
  • andrew-robertson
    andrew-robertson Community Member Posts: 145 ☆ Superstar ☆
    edited June 3, 2021
    Good morning @wheels .

    This is the standard SCORM output to the LMS DB. When we create a new assessment tool, the data gets written to the LMS without a problem; however, the unique ID (cmi.interactions.n.id) of the data entry gets the appended digits at the end of the entry. I think it has something to do in the trivantis_titlemgr_interact.js; however without time to tinker, I cannot provide much more details.

    I thought this may have been something known in the application, but if it isn't I will have to go dig later on when I have a chance. Not to worry if not.

    I've added screenshots below of all my settings. If these don't help in anyway, I will create a dummy file that produces the same error.






    Andrew R.
    Developing content since 2010 using a mixed bag of tools.
  • wheels
    wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 569 eLearning ROCKSTAR Admin Team
    DId you try unchecking the append timestamp option?


  • andrew-robertson
    andrew-robertson Community Member Posts: 145 ☆ Superstar ☆
    I have it unchecked at the moment, I will check it and uncheck it again to see what happens and will report back once I do.
    Andrew R.
    Developing content since 2010 using a mixed bag of tools.
  • wheels
    wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 569 eLearning ROCKSTAR Admin Team
    In your example Question_1_198096 the 198096 value is the internal id of the question object. It is used to ensure uniqueness. This is so Question_1_198096 and Question_1_62451 are not seen as the same question, since they are different questions. Is your use case that you want them to be recorded as if they are the same question?
  • andrew-robertson
    andrew-robertson Community Member Posts: 145 ☆ Superstar ☆
    We have 2 separate languages - English and French - which are taken based on the user's language profile in the LMS. So in my situation....
    • Question_1_198096 comes from the FR version of the module.
    • Question_1_62451 comes from the EN version of the module.
    Do you know which JS file and line i can go edit to remove the unique identifier? I know this makes it possible that there could be two Question_1's that get submitted, but that's also a situation we'll have to monitor and account for.
    Andrew R.
    Developing content since 2010 using a mixed bag of tools.
Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!