/// <summary> /// Deep copy item score /// </summary> /// <returns></returns> public ItemScore DeepCopy() { ItemScore copy = (ItemScore)this.MemberwiseClone(); if (hsScores != null) { copy.hsScores = hsScores.ConvertAll(x => x.DeepCopy()); } return(copy); }
/// <summary> /// Clears hand scores for the item /// </summary> public void ClearHandScore() { itemHandscoreSet = false; itemHandScore = null; }
public ItemResponse(TestItem ti, int position, long bankKey, long itemname, string clientKey, int operational, double scorePoints, double score, string scoreStatus, string response, string responseType, string answerKey, DateTime adminDate, DateTime responseDate, string scoreRationale, string strandKey, string contentLevel, bool isSelected, string format, int numberVisits, int pagenumber, int pagetime, int pagevisits, string mimeType, bool dropped, ItemScore itemHandScore, List <ErasureResponse> erasureResponses, string segmentId, bool hasScoreInfo, ItemScoreInfo scoreInfo) { this.testItem = ti; this.position = position; this.bankKey = bankKey; this.itemKey = itemname; this.clientKey = clientKey; this.operational = operational; this.scorePoints = scorePoints; this.presentedScore = score; this.scoreStatus = scoreStatus; this.ResponseObject = new Response(response, responseType, responseDate); this.answerKey = answerKey; this.adminDate = adminDate; this.scoreRationale = scoreRationale; this.strandKey = strandKey; this.contentLevel = contentLevel; this.isSelected = isSelected; this.format = format; this.numberVisits = numberVisits; this.pageNumber = pagenumber; this.pageTime = pagetime; this.pageVisits = pagevisits; this.mimeType = mimeType; this.dropped = dropped; this.itemHandScore = itemHandScore; this.ErasureResponses = erasureResponses; this.SegmentID = segmentId; this.HasScoreInfo = hasScoreInfo; this.ScoreInfo = scoreInfo; if (itemHandScore != null) { this.itemHandscoreSet = true; } //if (this.format == "MC" || this.ItemHandScore == null || (this.itemHandScore != null && this.itemHandScore.HSScores.Count == 0)) //{ // if (this.PresentedScore != -1) // this.irtScores[""] = this.PresentedScore; //} //else //{ // foreach (HandScore handScore in this.itemHandScore.HSScores) // { // if (handScore.Type == HandScore.ReadType.Final) // { // if (handScore.CompName == HandScore.CompNameAttribute.ConditionCodes) // if (ti == null) // // When used from the TIS no blueprint available, so we can't distribute the CC // // accross dimensions. See HandleCC. // this.irtScores[handScore.Dimension.ToLower()] = 0.0; // else // foreach(TestItemScoreInfo si in ti.ScoreInfo) // this.irtScores[si.Dimension.ToLower()] = 0.0; // else // this.irtScores[handScore.Dimension.ToLower()] = Convert.ToDouble(handScore.Value); // } // } //} }