Modifying base script includes in the system

joshua_garrison
Tera Expert

All,

 

I am needing help to modify the OOTB assessment questions for a BIA. I believe I have found where to do this but need some help....

 

So OOTB the questions are all prefaced with "What is disruption duration of ". I found inside of the CategoryImpactAssessmentBase script include the function "getRatingBaseQuestions" and there is a variable called "QUESTION_PREFIX" that has the value I want to change. Also OOTB there is a script include "CategoryImpactAssessment" which is where I believe you input the function you want to modify. I just dont think i am doing this correctly. Any help would be appreciated. 

 

Below is the "CategoryImpactAssessment" value i inputed and saved.

// eslint-disable-next-line no-redeclare
var CategoryImpactAssessment = Class.create();
CategoryImpactAssessment.prototype = Object.extendsObject(CategoryImpactAssessmentBase, {
    /* Override base class functions here. */

    // Override the getRatingBaseQuestions function
    getRatingBaseQuestions: function() {
        // Change the value of QUESTION_PREFIX
        var QUESTION_PREFIX = 'My Updated Value ';
    },

    type: 'CategoryImpactAssessment',
});

 

1 REPLY 1

aman_sharma_07
Tera Guru

hi @joshua_garrison ,

 

perhaps this is the correct way to override the attributes to the best of my knowledge, just make sure the same config. is not used anywhere else, otherwise it will reflect the update there as well.

If you are no sure, you may better create another custom SI and override the atttribute(s) there!

Thanks for your patient listening!