Skip to content

Commit

Permalink
Merge branch 'develop' into release/12.2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus-Goectau committed Jun 13, 2024
2 parents f9a4f67 + faea50c commit 400c8a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1781,6 +1781,12 @@ private void GetQuestionTitleAndText(dynamic f,
identifier = f.mq.Question_Title;
questionText = f.mq.Question_Text;

// CPG is a special case
if (!String.IsNullOrEmpty(f.mq.Security_Practice))
{
questionText = f.mq.Security_Practice;
}

// overlay
MaturityQuestionOverlay o = _overlay.GetMaturityQuestion(f.mq.Mat_Question_Id, lang);
if (o != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ <h1 class="page-title">{{t('reports.core.cpg.deficiency.deficiencies')}}</h1>
<tr>
<td class="deficiencies-list-item" style="font-weight: bold; width: 50px;">{{s.mat.question_Title}}
</td>
<td class="deficiencies-list-comment">{{parseQuestionText(s.mat.question_Text)}}</td>
<td class="deficiencies-list-comment">{{s.mat.security_Practice}}</td>
<td style="padding-top: 1rem; padding-left: 1rem; vertical-align: top; color: #555555">
<div style="width: 9rem; font-weight: bold;">
<!-- {{s.answer.answer_Text}} -->
{{questionsSvc.answerDisplayLabel(11, s.answer.answer_Text)}}
</div>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,4 @@ export class CpgDeficiencyComponent implements OnInit {
this.loading = true;
})
}

parseQuestionText(textWithHtml: string) {
let startOfRealText = textWithHtml.indexOf(this.cpgPracticeTag) + this.cpgPracticeTag.length;
let endOfRealText = textWithHtml.indexOf('<', startOfRealText);

return textWithHtml.substring(startOfRealText, endOfRealText);
}

}

0 comments on commit 400c8a8

Please sign in to comment.