Skip to content

Commit

Permalink
SAM-1117 - Option to not display value of question
Browse files Browse the repository at this point in the history
 Also adding to calculatedQuestion.jsp, extendedMatchinItems.jsp,
matrixChoicesSurvey.jsp
  • Loading branch information
jonespm committed Mar 3, 2016
1 parent 4be83bc commit a3b6721
Show file tree
Hide file tree
Showing 70 changed files with 809 additions and 112 deletions.
50 changes: 49 additions & 1 deletion reference/docs/conversion/sakai_11_mysql_conversion.sql
Original file line number Diff line number Diff line change
Expand Up @@ -605,4 +605,52 @@ ALTER TABLE SAKAI_SESSION MODIFY SESSION_START NULL;
ALTER TABLE SAKAI_SESSION MODIFY SESSION_END NULL;

-- 1389 GradebookNG sortable assignments within categories, add CATEGORIZED_SORT_ORDER to GB_GRADABLE_OBJECT_T
ALTER TABLE GB_GRADABLE_OBJECT_T ADD COLUMN CATEGORIZED_SORT_ORDER int NULL;
ALTER TABLE GB_GRADABLE_OBJECT_T ADD COLUMN CATEGORIZED_SORT_ORDER int NULL;
--
-- SAM-1117 - Option to not show score
--

ALTER TABLE SAM_ASSESSACCESSCONTROL_T ADD COLUMN DISPLAYSCORE integer;
ALTER TABLE SAM_PUBLISHEDACCESSCONTROL_T ADD COLUMN DISPLAYSCORE integer;

ALTER TABLE SAM_ITEM_T ADD COLUMN SCORE_DISPLAY_FLAG bit(1);
ALTER TABLE SAM_PUBLISHEDITEM_T ADD COLUMN SCORE_DISPLAY_FLAG bit(1);

INSERT INTO SAM_ASSESSMETADATA_T (ASSESSMENTMETADATAID, ASSESSMENTID, LABEL,
ENTRY)
VALUES(NULL, 1, 'displayScores_isInstructorEditable', 'true') ;
INSERT INTO SAM_ASSESSMETADATA_T (ASSESSMENTMETADATAID, ASSESSMENTID, LABEL,
ENTRY)
VALUES(NULL, (SELECT ID FROM SAM_ASSESSMENTBASE_T WHERE TITLE='Formative Assessment'
AND TYPEID='142' AND ISTEMPLATE=1),
'displayScores_isInstructorEditable', 'true');

INSERT INTO SAM_ASSESSMETADATA_T (ASSESSMENTMETADATAID, ASSESSMENTID, LABEL,
ENTRY)
VALUES(NULL, (SELECT ID FROM SAM_ASSESSMENTBASE_T WHERE TITLE='Quiz'
AND TYPEID='142' AND ISTEMPLATE=1),
'displayScores_isInstructorEditable', 'true');

INSERT INTO SAM_ASSESSMETADATA_T (ASSESSMENTMETADATAID, ASSESSMENTID, LABEL,
ENTRY)
VALUES(NULL, (SELECT ID FROM SAM_ASSESSMENTBASE_T WHERE TITLE='Problem Set'
AND TYPEID='142' AND ISTEMPLATE=1),
'displayScores_isInstructorEditable', 'true');

INSERT INTO SAM_ASSESSMETADATA_T (ASSESSMENTMETADATAID, ASSESSMENTID, LABEL,
ENTRY)
VALUES(NULL, (SELECT ID FROM SAM_ASSESSMENTBASE_T WHERE TITLE='Survey'
AND TYPEID='142' AND ISTEMPLATE=1),
'displayScores_isInstructorEditable', 'true');

INSERT INTO SAM_ASSESSMETADATA_T (ASSESSMENTMETADATAID, ASSESSMENTID, LABEL,
ENTRY)
VALUES(NULL, (SELECT ID FROM SAM_ASSESSMENTBASE_T WHERE TITLE='Test'
AND TYPEID='142' AND ISTEMPLATE=1),
'displayScores_isInstructorEditable', 'true');

INSERT INTO SAM_ASSESSMETADATA_T (ASSESSMENTMETADATAID, ASSESSMENTID, LABEL,
ENTRY)
VALUES(NULL, (SELECT ID FROM SAM_ASSESSMENTBASE_T WHERE TITLE='Timed Test'
AND TYPEID='142' AND ISTEMPLATE=1),
'displayScores_isInstructorEditable', 'true');
51 changes: 50 additions & 1 deletion reference/docs/conversion/sakai_11_oracle_conversion.sql
Original file line number Diff line number Diff line change
Expand Up @@ -650,4 +650,53 @@ ALTER TABLE SAKAI_SESSION MODIFY SESSION_START NULL;
ALTER TABLE SAKAI_SESSION MODIFY SESSION_END NULL;

-- 1389 GradebookNG sortable assignments within categories, add CATEGORIZED_SORT_ORDER to GB_GRADABLE_OBJECT_T
ALTER TABLE GB_GRADABLE_OBJECT_T ADD COLUMN CATEGORIZED_SORT_ORDER number;
ALTER TABLE GB_GRADABLE_OBJECT_T ADD COLUMN CATEGORIZED_SORT_ORDER number;
--
-- SAM-1117 - Option to not display scores
--

alter table SAM_ASSESSACCESSCONTROL_T add DISPLAYSCORE integer;
alter table SAM_PUBLISHEDACCESSCONTROL_T add DISPLAYSCORE integer;
alter table SAM_ITEM_T add SCORE_DISPLAY_FLAG number(1,0) default '0' not null;
alter table SAM_PUBLISHEDITEM_T add SCORE_DISPLAY_FLAG number(1,0) default '0' not null;

INSERT INTO SAM_ASSESSMETADATA_T ("ASSESSMENTMETADATAID", "ASSESSMENTID","LABEL",
"ENTRY")
VALUES(sam_assessMetaData_id_s.nextVal, 1, 'displayScores_isInstructorEditable', 'true');

INSERT INTO SAM_ASSESSMETADATA_T (ASSESSMENTMETADATAID, ASSESSMENTID, LABEL,
ENTRY)
VALUES(sam_assessMetaData_id_s.nextVal, (SELECT ID FROM SAM_ASSESSMENTBASE_T WHERE TITLE='Formative Assessment'
AND TYPEID='142' AND ISTEMPLATE=1),
'displayScores_isInstructorEditable', 'true');

INSERT INTO SAM_ASSESSMETADATA_T (ASSESSMENTMETADATAID, ASSESSMENTID, LABEL,
ENTRY)
VALUES(sam_assessMetaData_id_s.nextVal, (SELECT ID FROM SAM_ASSESSMENTBASE_T WHERE TITLE='Quiz'
AND TYPEID='142' AND ISTEMPLATE=1),
'displayScores_isInstructorEditable', 'true');

INSERT INTO SAM_ASSESSMETADATA_T (ASSESSMENTMETADATAID, ASSESSMENTID, LABEL,
ENTRY)
VALUES(sam_assessMetaData_id_s.nextVal, (SELECT ID FROM SAM_ASSESSMENTBASE_T WHERE TITLE='Problem Set'
AND TYPEID='142' AND ISTEMPLATE=1),
'displayScores_isInstructorEditable', 'true');

INSERT INTO SAM_ASSESSMETADATA_T (ASSESSMENTMETADATAID, ASSESSMENTID, LABEL,
ENTRY)
VALUES(sam_assessMetaData_id_s.nextVal, (SELECT ID FROM SAM_ASSESSMENTBASE_T WHERE TITLE='Survey'
AND TYPEID='142' AND ISTEMPLATE=1),
'displayScores_isInstructorEditable', 'true');

INSERT INTO SAM_ASSESSMETADATA_T (ASSESSMENTMETADATAID, ASSESSMENTID, LABEL,
ENTRY)
VALUES(sam_assessMetaData_id_s.nextVal, (SELECT ID FROM SAM_ASSESSMENTBASE_T WHERE TITLE='Test'
AND TYPEID='142' AND ISTEMPLATE=1),
'displayScores_isInstructorEditable', 'true');

INSERT INTO SAM_ASSESSMETADATA_T (ASSESSMENTMETADATAID, ASSESSMENTID, LABEL,
ENTRY)
VALUES(sam_assessMetaData_id_s.nextVal, (SELECT ID FROM SAM_ASSESSMENTBASE_T WHERE TITLE='Timed Test'
AND TYPEID='142' AND ISTEMPLATE=1),
'displayScores_isInstructorEditable', 'true');

Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public interface AssessmentAccessControlIfc
// itemNumbering
public static Integer CONTINUOUS_NUMBERING = Integer.valueOf(1);
public static Integer RESTART_NUMBERING_BY_PART = Integer.valueOf(2);
// itemScoreDisplay
public static Integer DISPLAY_ITEM_SCORE_DURING_ASSESSMENT = Integer.valueOf(1);
public static Integer HIDE_ITEM_SCORE_DURING_ASSESSMENT = Integer.valueOf(2);
//markForReview
public static final Integer MARK_FOR_REVIEW = Integer.valueOf(1);
public static final Integer NOT_MARK_FOR_REVIEW = Integer.valueOf(0);
Expand Down Expand Up @@ -138,6 +141,10 @@ public interface AssessmentAccessControlIfc
void setItemNumbering(Integer itemNumbering);

Integer getItemNumbering();

void setDisplayScoreDuringAssessments(Integer displayScore);

Integer getDisplayScoreDuringAssessments();

void setSubmissionMessage(String submissionMessage);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ public interface ItemDataIfc extends Comparable<ItemDataIfc>, java.io.Serializab
public String getEmiAnswerOptionsRichText();
public boolean getIsAnswerOptionsSimple();
public boolean getIsAnswerOptionsRich();

String getImageMapSrc();
Boolean getScoreDisplayFlag();
void setScoreDisplayFlag(Boolean scoreDisplayFlag);
}
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,12 @@
</qtimetadatafield>
<!--Possible Values -->
<!--True, False -->
<qtimetadatafield>
<fieldlabel>displayScores_isInstructorEditable</fieldlabel>
<fieldentry>True</fieldentry>
</qtimetadatafield>
<!--Possible Values -->
<!--True, False -->
<qtimetadatafield>
<fieldlabel>submissionModel_isInstructorEditable</fieldlabel>
<fieldentry>True</fieldentry>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,12 @@
</qtimetadatafield>
<!--Possible Values -->
<!--True, False -->
<qtimetadatafield>
<fieldlabel>displayScores_isInstructorEditable</fieldlabel>
<fieldentry>True</fieldentry>
</qtimetadatafield>
<!--Possible Values -->
<!--True, False -->
<qtimetadatafield>
<fieldlabel>submissionModel_isInstructorEditable</fieldlabel>
<fieldentry>True</fieldentry>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ continous_numbering=Continuous numbering between parts
part_numbering=Restart numbering for each part

submissions_allowed=The number of submissions allowed is
displayScores=Question Scores
displayScores_show=Show question point value during assessment
displayScores_hide=Hide question point value during assessment

submissions=Number of Submissions Allowed
unlimited_submission=Unlimited
only=Only
limited_submission=submissions allowed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ answer_options_count=Number of options in this question (e.g. A to G = 7)
required_options_count=Number of required answers
answers_required=answer(s) required
answer_point_value=Answer Point Value
answer_point_value_display=Display Point Value while student is taking the exam
answer_min_point_value=Minimum Point Value (optional)
answer_min_point_info=*Points assigned to the user for attempting the question
answer_provide_a_mo=Answer: Provide a model answer to show students and to assist graders along with any feedback.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ bg_color=Background Color
bg_image=Background Image
complete_displayed_on_one_page=The complete Assessment is displayed on one Web page
continuous_num_parts=Continuous numbering between parts
displayScores=Question Scores
displayScores_sub=Display Question Point Value During Assessment Subsection
displayScores_show=Show question point value during assessment
displayScores_hide=Hide question point value during assessment
creator=Assessment Creator
default_val=Default Value:
delivery_dates=Delivery Dates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public class AssessmentSettingsBean
private String assessmentFormat; // question (1)/part(2)/assessment(3) on separate page
private String itemNavigation; // linear (1)or random (2)
private String itemNumbering; // continuous between parts(1), restart between parts(2)
private String displayScoreDuringAssessments;
private String unlimitedSubmissions;
private String submissionsAllowed;
private String submissionsSaved; // bad name, this is autoSaved
Expand Down Expand Up @@ -334,6 +335,8 @@ public void setAssessment(AssessmentFacade assessment) {
this.itemNavigation = accessControl.getItemNavigation().toString(); // linear or random
if (accessControl.getItemNumbering()!=null)
this.itemNumbering = accessControl.getItemNumbering().toString();
if (accessControl.getDisplayScoreDuringAssessments()!=null)
this.displayScoreDuringAssessments=accessControl.getDisplayScoreDuringAssessments().toString();
if (accessControl.getSubmissionsSaved()!=null) // bad name, this is autoSaved
this.submissionsSaved = accessControl.getSubmissionsSaved().toString();

Expand Down Expand Up @@ -752,6 +755,14 @@ public String getItemNumbering() {
public void setItemNumbering(String itemNumbering) {
this.itemNumbering = itemNumbering;
}

public String getDisplayScoreDuringAssessments(){
return displayScoreDuringAssessments;
}

public void setDisplayScoreDuringAssessments(String displayScoreDuringAssessments){
this.displayScoreDuringAssessments = displayScoreDuringAssessments;
}

public String getUnlimitedSubmissions() {
return unlimitedSubmissions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public class ItemBean
private String itemId;
private String itemType;
private double itemScore= 0.0d;
private String itemScoreDisplayFlag= "true";
private double itemMinScore = 0.0d;
private double itemDiscount = 0.0d;
private String partialCreditFlag = "Defualt";
Expand Down Expand Up @@ -2064,4 +2065,12 @@ public double getItemMinScore() {
public void setItemMinScore(double itemMinScore) {
this.itemMinScore = itemMinScore;
}

public String getItemScoreDisplayFlag() {
return itemScoreDisplayFlag;
}

public void setItemScoreDisplayFlag(String itemScoreDisplayFlag) {
this.itemScoreDisplayFlag = itemScoreDisplayFlag;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ public class PublishedAssessmentSettingsBean
private String assessmentFormat; // question (1)/part(2)/assessment(3) on separate page
private String itemNavigation; // linear (1)or random (2)
private String itemNumbering; // continuous between parts(1), restart between parts(2)
private String displayScoreDuringAssessments;
private String unlimitedSubmissions;
private String submissionsAllowed;
private String submissionsSaved; // bad name, this is autoSaved
Expand Down Expand Up @@ -300,6 +301,8 @@ public void setAssessment(PublishedAssessmentFacade assessment) {
this.itemNavigation = accessControl.getItemNavigation().toString(); // linear or random
if (accessControl.getItemNumbering()!=null)
this.itemNumbering = accessControl.getItemNumbering().toString();
if(accessControl.getDisplayScoreDuringAssessments()!=null)
this.displayScoreDuringAssessments=accessControl.getDisplayScoreDuringAssessments().toString();
if (accessControl.getSubmissionsSaved()!=null)
this.submissionsSaved = accessControl.getSubmissionsSaved().toString();

Expand Down Expand Up @@ -1656,6 +1659,14 @@ public SelectItem[] getExtendedTimeTargets() {
public void setExtendedTimeTargets(SelectItem[] targets) {
this.extendedTimeTargets = targets;
}

public String getDisplayScoreDuringAssessments(){
return displayScoreDuringAssessments;
}

public void setDisplayScoreDuringAssessments(String displayScoreDuringAssessments){
this.displayScoreDuringAssessments = displayScoreDuringAssessments;
}
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public class TemplateBean implements Serializable
private String itemAccessType = "2";
private String displayChunking = "1";
private String questionNumbering = "1";
private String displayScoreDuringAssessments = "1";
private Boolean markForReview = Boolean.TRUE;
private String submissionModel = "1";
private String submissionNumber;
Expand Down Expand Up @@ -374,7 +375,29 @@ public String getQuestionNumbering()
return "1";
return checker(questionNumbering, "1");
}

/**
* displayScoreDuringAssessments
*
* @param displayScoreDuringAssessments
*/
public void setDisplayScoreDuringAssessments(String displayScoreDuringAssessments)
{
displayScoreDuringAssessments = displayScoreDuringAssessments;
}

/**
* displayScoreDuringAssessments
*
* @return
*/
public String getDisplayScoreDuringAssessments()
{
if ("0".equals(displayScoreDuringAssessments))
return "1";
return checker(displayScoreDuringAssessments, "1");
}

/**
* numbering
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public class SettingsDeliveryBean implements Serializable
private String bgcolor;
private String background;
private String itemNumbering;
private String displayScoreDuringAssessments;

/**
* Maximum number of attemtps allowed.
Expand Down Expand Up @@ -348,6 +349,15 @@ public void setItemNumbering(String numbering)
itemNumbering = numbering;
}

public String getDisplayScoreDuringAssessments()
{
return displayScoreDuringAssessments;
}

public void setDisplayScoreDuringAssessments(String displayScoreDuringAssessments){
this.displayScoreDuringAssessments = displayScoreDuringAssessments;
}

public void setAssessmentAccessControl(PublishedAssessmentIfc pubAssessment){

AssessmentAccessControlIfc control = pubAssessment.getAssessmentAccessControl();
Expand All @@ -374,6 +384,12 @@ public void setAssessmentAccessControl(PublishedAssessmentIfc pubAssessment){
setUsername(control.getUsername());
setPassword(control.getPassword());
setItemNumbering(control.getItemNumbering().toString());
if (control != null && control.getDisplayScoreDuringAssessments() != null) {
setDisplayScoreDuringAssessments(control.getDisplayScoreDuringAssessments().toString());
}
else {
setDisplayScoreDuringAssessments("0");
}

setIpAddresses(pubAssessment.getSecuredIPAddressSet());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,8 @@ public void saveItem(ItemAuthorBean itemauthor) throws FinFormatException{
}
item.setScore(Double.valueOf(bean.getItemScore()));
item.setDiscount(Double.valueOf(bean.getItemDiscount()));
//default should be "true", so anything other than "false" is a true value
item.setScoreDisplayFlag(!"false".equals(bean.getItemScoreDisplayFlag()));
item.setMinScore(Double.valueOf(bean.getItemMinScore()));
item.setHint("");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ public boolean populateItemBean(ItemAuthorBean itemauthorbean, String itemId) {
score = 0.0d;
}
bean.setItemScore(score);

bean.setItemScoreDisplayFlag(itemfacade.getScoreDisplayFlag() ? "true" : "false");

Double minPoints = itemfacade.getMinScore();
Double minScore;
if (minPoints!=null && !"".equals(minPoints))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ public AssessmentFacade save(AssessmentSettingsBean assessmentSettings, boolean
}
if (assessmentSettings.getItemNumbering()!=null)
control.setItemNumbering(new Integer(assessmentSettings.getItemNumbering()));
if(assessmentSettings.getDisplayScoreDuringAssessments() != null)
control.setDisplayScoreDuringAssessments(new Integer(assessmentSettings.getDisplayScoreDuringAssessments()));
if (assessmentSettings.getAssessmentFormat()!=null )
control.setAssessmentFormat(new Integer(assessmentSettings.getAssessmentFormat()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,10 @@ private void setPublishedSettings(PublishedAssessmentSettingsBean assessmentSett
if (assessmentSettings.getItemNumbering() != null) {
control.setItemNumbering(new Integer(assessmentSettings.getItemNumbering()));
}

if (assessmentSettings.getDisplayScoreDuringAssessments() != null) {
control.setDisplayScoreDuringAssessments(new Integer(assessmentSettings.getDisplayScoreDuringAssessments()));
}

// set Timed Assessment
control.setTimeLimit(assessmentSettings.getTimeLimit());
if (assessmentSettings.getTimedAssessment()) {
Expand Down
Loading

0 comments on commit a3b6721

Please sign in to comment.