diff --git a/modules/conflict_resolver/php/provisioners/resolvedprovisioner.class.inc b/modules/conflict_resolver/php/provisioners/resolvedprovisioner.class.inc index e5719d13341..51ca292cc04 100644 --- a/modules/conflict_resolver/php/provisioners/resolvedprovisioner.class.inc +++ b/modules/conflict_resolver/php/provisioners/resolvedprovisioner.class.inc @@ -39,12 +39,30 @@ class ResolvedProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisioner candidate.PSCID as pscid, session.Visit_label as visitlabel, Project.Name as project, - conflicts_resolved.FieldName as question, - conflicts_resolved.OldValue1 as value1, - conflicts_resolved.OldValue2 as value2, - CASE - WHEN conflicts_resolved.NewValue = 1 - THEN conflicts_resolved.OldValue1 + conflicts_resolved.FieldName as question, + CASE + WHEN conflicts_resolved.FieldName <> "Examiner" + THEN conflicts_resolved.OldValue1 + ELSE + CONCAT(conflicts_resolved.OldValue1, " - ", + (SELECT full_name FROM examiners WHERE examinerID = conflicts_resolved.OldValue1)) + END as value1, + CASE + WHEN conflicts_resolved.FieldName <> "Examiner" + THEN conflicts_resolved.OldValue2 + ELSE CONCAT(conflicts_resolved.OldValue2, " - ", + (SELECT full_name FROM examiners WHERE examinerID = conflicts_resolved.OldValue2)) + END as value2, + CASE + WHEN conflicts_resolved.NewValue = 1 + AND conflicts_resolved.FieldName <> "Examiner" + THEN conflicts_resolved.OldValue1 + WHEN conflicts_resolved.NewValue = 1 AND conflicts_resolved.FieldName = "Examiner" + THEN CONCAT(conflicts_resolved.OldValue1, " - ", + (SELECT full_name FROM examiners WHERE examinerID = conflicts_resolved.OldValue1)) + WHEN conflicts_resolved.NewValue <> 1 AND conflicts_resolved.FieldName = "Examiner" + THEN CONCAT(conflicts_resolved.OldValue2, " - ", + (SELECT full_name FROM examiners WHERE examinerID = conflicts_resolved.OldValue2)) ELSE conflicts_resolved.OldValue2 END AS correctanswer, conflicts_resolved.ResolutionTimestamp as resolutiontimestamp, diff --git a/modules/conflict_resolver/php/provisioners/unresolvedprovisioner.class.inc b/modules/conflict_resolver/php/provisioners/unresolvedprovisioner.class.inc index c5a3dd01d52..de3ab8395bb 100644 --- a/modules/conflict_resolver/php/provisioners/unresolvedprovisioner.class.inc +++ b/modules/conflict_resolver/php/provisioners/unresolvedprovisioner.class.inc @@ -40,8 +40,18 @@ class UnresolvedProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisioner session.Visit_label as visitlabel, Project.Name as project, conflicts_unresolved.FieldName as question, - conflicts_unresolved.Value1 as value1, - conflicts_unresolved.Value2 as value2, + CASE + WHEN conflicts_unresolved.FieldName = "Examiner" + THEN CONCAT(conflicts_unresolved.Value1, " - ", + (SELECT full_name FROM examiners WHERE examinerID = conflicts_unresolved.Value1)) + ELSE conflicts_unresolved.Value1 + END AS value1, + CASE + WHEN conflicts_unresolved.FieldName = "Examiner" + THEN CONCAT(conflicts_unresolved.Value2, " - ", + (SELECT full_name FROM examiners WHERE examinerID = conflicts_unresolved.Value2)) + ELSE conflicts_unresolved.Value2 + END AS value2, psc.name as site, session.CenterID as centerid, Project.ProjectID as projectid