Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 2b11869

Browse files
authored
Merge pull request #479 from deedee/dev-0419
Add scorecard selection
2 parents 2699887 + 2d41b87 commit 2b11869

File tree

7 files changed

+46
-12
lines changed

7 files changed

+46
-12
lines changed

services/project_services/src/java/main/com/topcoder/project/service/impl/ProjectServicesImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,7 @@ public FullProjectData createProject(Project projectHeader, com.topcoder.project
15941594
phase.setId(0);
15951595
}
15961596

1597+
setScorecards(projectHeader, projectPhases);
15971598
// call phaseManager.updatePhases(projectPhases,operator)
15981599
Util.log(logger, Level.DEBUG, "Starts calling ProjectManager#updatePhases method.");
15991600
phaseManager.updatePhases(projectPhases, operator);

src/web/WEB-INF/includes/launch/contestSelection.jsp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,15 @@
219219
</div>
220220
</div>
221221

222+
<div class="row scorecardRow hide">
223+
<label>Review Scorecard :</label>
224+
<div class="scorecardSelect">
225+
<select id="scorecards" name="scorecards">
226+
<option value="0">Default Scorecard</option>
227+
</select>
228+
</div>
229+
</div>
230+
222231
<div class="row privateProjectRow hide">
223232
<label>Task</label>
224233
<input type="checkbox" name="privateProject" title="Is this challenge private?">

src/web/WEB-INF/includes/launch/orderReviewSoftware.jsp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
<td>TopCoder Community Review Board</td>
4545
</tr>
4646
<tr>
47+
<th>Review Scorecard :</th>
48+
<td class="rScorecard">Default Scorecard</td>
49+
</tr>
50+
<tr>
4751
<th>Competition Title :</th>
4852
<td><span id="sworContestName"></span><a href="javascript:showPage('contestSelectionPage');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a></td>
4953
</tr>

src/web/css/direct/launchcontest.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@
360360
border: 1px solid #a8abad;
361361
}
362362

363-
#launchContestOut .addNewContest .projectSelect, #launchContestOut .addNewContest .billingSelect, #launchContestOut .addNewContest .copilotSelect, .reviewScorecardSelect, .milestoneSelect, .reviewerSelect, .registrantsSelect, .mmTypeSelect{
363+
#launchContestOut .addNewContest .projectSelect, #launchContestOut .addNewContest .billingSelect, #launchContestOut .addNewContest .copilotSelect, .reviewScorecardSelect, .milestoneSelect, .reviewerSelect, .registrantsSelect, .mmTypeSelect, .scorecardSelect {
364364
width: auto;
365365
float: left;
366366
display: inline;
@@ -1964,7 +1964,7 @@ a.draft:hover span.right, a.preview:hover span.right {
19641964
}
19651965

19661966
/** billing and round select **/
1967-
.reviewScorecardSelect .newListSelected, .billingSelect .newListSelected, .prizeBillingSelect .newListSelected, .roundelect .newListSelected, .copilotSelect .newListSelected, .milestoneSelect .newListSelected, .projectsSelect .newListSelected, .copilotsSelect .newListSelected, .problemSelect .newListSelected, .reviewerSelect .newListSelected, .registrantsSelect .newListSelected, .mmTypeSelect .newListSelected {
1967+
.reviewScorecardSelect .newListSelected, .billingSelect .newListSelected, .prizeBillingSelect .newListSelected, .roundelect .newListSelected, .copilotSelect .newListSelected, .milestoneSelect .newListSelected, .projectsSelect .newListSelected, .copilotsSelect .newListSelected, .problemSelect .newListSelected, .reviewerSelect .newListSelected, .registrantsSelect .newListSelected, .mmTypeSelect .newListSelected, .scorecardSelect .newListSelected {
19681968
width: 283px;
19691969
height: 28px;
19701970
padding: 0 5px;
@@ -1981,11 +1981,11 @@ a.draft:hover span.right, a.preview:hover span.right {
19811981
color: #6c6c6c;
19821982
}
19831983

1984-
.reviewScorecardSelect .selectedTxt, .billingSelect .selectedTxt, .prizeBillingSelect .selectedTxt, .roundelect .selectedTxt, .copilotSelect .selectedTxt, .milestoneSelect .selectedTxt, .copilotsSelect .selectedTxt, .projectsSelect .selectedTxt, .problemSelect .selectedTxt, .reviewerSelect .selectedTxt, .registrantsSelect .selectedTxt, .mmTypeSelect .selectedTxt {
1984+
.reviewScorecardSelect .selectedTxt, .billingSelect .selectedTxt, .prizeBillingSelect .selectedTxt, .roundelect .selectedTxt, .copilotSelect .selectedTxt, .milestoneSelect .selectedTxt, .copilotsSelect .selectedTxt, .projectsSelect .selectedTxt, .problemSelect .selectedTxt, .reviewerSelect .selectedTxt, .registrantsSelect .selectedTxt, .mmTypeSelect .selectedTxt, .scorecardSelect .selectedTxt {
19851985
width: 281px;
19861986
}
19871987

1988-
.reviewScorecardSelect .newList, .billingSelect .newList, .prizeBillingSelect .newList, .roundelect .newList, .copilotSelect .newList, .milestoneSelect .newList, .copilotsSelect .newList, .projectsSelect .newList, .problemSelect .newList, .reviewerSelect .newList, .registrantsSelect .newList, .mmTypeSelect .newList{
1988+
.reviewScorecardSelect .newList, .billingSelect .newList, .prizeBillingSelect .newList, .roundelect .newList, .copilotSelect .newList, .milestoneSelect .newList, .copilotsSelect .newList, .projectsSelect .newList, .problemSelect .newList, .reviewerSelect .newList, .registrantsSelect .newList, .mmTypeSelect .newList, .scorecardSelect .newList {
19891989
width: 290px;
19901990
border: #ccc solid 1px;
19911991
background: #fff;

src/web/scripts/launch/pages/selection.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ function validateFieldsContestSelectionAlgorithm() {
218218
mainWidget.softwareCompetition.subEndDate = endDate;
219219
mainWidget.softwareCompetition.regEndDate = regEndDate;
220220
mainWidget.softwareCompetition.projectHeader.properties[MM_TYPE] = $('#mmType').val().trim();
221-
221+
mainWidget.softwareCompetition.projectHeader.reviewScorecardId = 0;
222+
mainWidget.softwareCompetition.projectHeader.iterativeReviewScorecardId = 0;
222223
//prizes is on category id
223224
// fillPrizes();
224225

@@ -341,7 +342,13 @@ function validateFieldsContestSelectionSoftware() {
341342

342343
//prizes is on category id
343344
fillPrizes();
344-
345+
if (categoryId === SOFTWARE_CATEGORY_ID_F2F) {
346+
mainWidget.softwareCompetition.projectHeader.reviewScorecardId = 0;
347+
mainWidget.softwareCompetition.projectHeader.iterativeReviewScorecardId = Number($('#scorecards').val());
348+
} else {
349+
mainWidget.softwareCompetition.projectHeader.reviewScorecardId = Number($('#scorecards').val());
350+
mainWidget.softwareCompetition.projectHeader.iterativeReviewScorecardId = 0;
351+
}
345352
return true;
346353
}
347354

@@ -519,7 +526,8 @@ function validateFieldsContestSelectionStudio() {
519526
});
520527
enableMCEPlaceholderText = false;
521528
}
522-
529+
mainWidget.softwareCompetition.projectHeader.reviewScorecardId = 0;
530+
mainWidget.softwareCompetition.projectHeader.iterativeReviewScorecardId = 0;
523531
return true;
524532
}
525533

@@ -534,6 +542,7 @@ function continueContestSelection() {
534542
groupsSpan+='<span>'+ g.name+'</span>';
535543
});
536544
$(".overviewData .rGroups td span").remove();
545+
537546
$(groupsSpan).insertBefore(".overviewData .rGroups td a");
538547

539548
if(mainWidget.isSoftwareContest()) {

src/web/scripts/launchcontest.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,7 @@ $(document).ready(function() {
620620

621621

622622
handleProjectDropDownChange();
623-
624-
623+
$('#scorecards').sSelect();
625624
$('#overviewAlgorithmPage').hide();
626625
}); // end of jQuery onload
627626

@@ -664,7 +663,7 @@ function handleProjectDropDownChange() {
664663
$("#billingProjects").val(0);
665664

666665
if(hasCMCBilling && !CMCBillingExisting) {
667-
$("#billingProjects").append($('<option></option>').val($("input[name=CMCBillingID]").val()).html($("input[name=CMCBillingName]").val()).data("cca", false).data("enableEffortDays", value["enableEffortDays"]));
666+
$("#billingProjects").append($('<option></option>').val($("input[name=CMCBillingID]").val()).html($("input[name=CMCBillingName]").val()).data("cca", false).data("enableEffortDays", false));
668667
}
669668

670669
$("#billingProjects").resetSS();
@@ -829,7 +828,17 @@ function onContestTypeChange() {
829828
templates: getDRTemplatesName(typeId),
830829
templates_files: DRTemplatesList
831830
});
831+
$('#scorecards').html('<option value="0">Default Scorecard</option>');
832+
$('.scorecardRow').show();
833+
var scorecards = getReviewScorecards(typeId);
834+
$.each(scorecards, function(i, value) {
835+
$('#scorecards').append('<option value="' + value['id'] + '">' + value['scorecardName'] + ' - ' + value['scorecardVersion'] + '</option>'); });
836+
$('#scorecards').resetSS();
837+
$('#scorecards').bind('change', function(){
838+
$('.rScorecard').html($(this).find(':selected').text());
839+
});
832840
} else {
841+
$('.scorecardRow').hide();
833842
var contestDescription = CKEDITOR.instances['contestDescription'];
834843
if (contestDescription) {
835844
contestDescription.destroy(true);

token.properties.docker

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@
6464
############################################################################################
6565
# file storage location for DefaultUploadExternalServices in onlineReviewUpload_config.xml #
6666
############################################################################################
67-
@file_storage_location@=/root/submission_dev
68-
@studio_file_storage_location@=/root/submission_design
67+
#@file_storage_location@=/root/submission_dev
68+
#@studio_file_storage_location@=/root/submission_design
69+
@file_storage_location@=/tmp
70+
@studio_file_storage_location@=/tmp
6971

7072
##############
7173
# struts.xml #

0 commit comments

Comments
 (0)