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

Commit 52e7339

Browse files
committed
Merge pull request #110 from appirio-tech/DR_Removal
DEM-906 Turn off DR for all challenges by default, hide the DR information
2 parents c8b10f7 + 58306bb commit 52e7339

File tree

15 files changed

+57
-34
lines changed

15 files changed

+57
-34
lines changed

src/java/main/com/topcoder/direct/services/view/action/contest/launch/SaveDraftContestAction.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,13 @@ public class SaveDraftContestAction extends ContestAction {
287287
*/
288288
private static final ProjectStatus PROJECT_STATUS_ACTIVE = new ProjectStatus(1, "ACTIVE");
289289

290+
/**
291+
* <p>
292+
* Constant for draft project status.
293+
* </p>
294+
*/
295+
private static final ProjectStatus PROJECT_STATUS_DRAFT = new ProjectStatus(2, "DRAFT");
296+
290297
/**
291298
* <p>
292299
* Constant for root catalog id property header.
@@ -987,6 +994,15 @@ public boolean evaluate(Object object) {
987994
softwareCompetition.getProjectHeader().getProperties().remove(THURGOOD_LAUGUAGE_KEY);
988995
}
989996
}
997+
998+
// turn DR off if it's draft contest
999+
if (softwareCompetition.getProjectHeader().getProjectStatus().getId() == PROJECT_STATUS_DRAFT.getId()) {
1000+
softwareCompetition.getProjectHeader().getProperties().put(
1001+
ProjectPropertyType.DIGITAL_RRUN_FLAG_PROJECT_PROPERTY_KEY, "Off");
1002+
softwareCompetition.getProjectHeader().getProperties().put(
1003+
ProjectPropertyType.DR_POINTS_PROJECT_PROPERTY_KEY, "0"
1004+
);
1005+
}
9901006
}
9911007

9921008
/**
@@ -1084,7 +1100,8 @@ protected void initializeCompetition(SoftwareCompetition softwareCompetition) th
10841100
if (projectHeaderTemp.getProjectCategory().getProjectType().getDescription() == null) {
10851101
projectHeaderTemp.getProjectCategory().getProjectType().setDescription("");
10861102
}
1087-
projectHeaderTemp.setProjectStatus(PROJECT_STATUS_ACTIVE);
1103+
1104+
projectHeaderTemp.setProjectStatus(PROJECT_STATUS_DRAFT);
10881105

10891106
// process project resources
10901107

src/web/WEB-INF/copilot-contests-details.jsp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@
435435
<div class="totalCostContainer">
436436
<p style="padding-left:10px" class="note">
437437
Note: Challenge prizes, costs, and fees in this section are estimates. <br>
438-
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses and digital run incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
438+
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
439439
</div>
440440
</div>
441441
<!-- End .detailsContent -->
@@ -477,7 +477,7 @@
477477
<br>
478478
<p class="note">
479479
Note: Challenge prizes, costs, and fees in this section are estimates. <br>
480-
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses and digital run incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
480+
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
481481
</div>
482482
</div>
483483
</div>

src/web/WEB-INF/includes/contest/editTab.jsp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@
501501
<td class="first_tab"></td>
502502
<td class="sec_tab_prize"><strong>5th Prize&nbsp;&nbsp;&nbsp;&nbsp;:
503503
&nbsp;&nbsp;&nbsp;&nbsp;</strong><span id="rPrize5"></span></td>
504-
<td class="third_tab_prize"><strong>Studio Cup:</strong> $<span id="rswDigitalRun"></span></td>
504+
<td class="third_tab_prize drHide"><strong>Studio Cup:</strong> $<span id="rswDigitalRun"></span></td>
505505
</tr>
506506
<tr>
507507
<td class="first_tab"></td>
@@ -529,7 +529,7 @@
529529
<span class="name" class="last_info"><strong>Estimated Challenge Total: </strong></span> $<span id="rswTotal"></span>
530530
<p class="note">
531531
Note: Challenge prizes, costs, and fees in this section are estimates. <br>
532-
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses and digital run incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
532+
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
533533
</p>
534534
</div>
535535
<div class="clear"></div>
@@ -599,8 +599,8 @@
599599
<tr>
600600
<td>Spec Review Fee: $<span id="studioSpecReviewFee"></span></td>
601601
<td>Screening Cost: $<span id="studioScreeningCost"></span></td>
602-
<td><input type="checkbox" id="studioCupPointsCheckBox" style="top:0px;"/></td>
603-
<td>Studio Cup: $<span id="studioCupPoints"></span></td>
602+
<td class="drHide"><input type="checkbox" id="studioCupPointsCheckBox" style="top:0px;"/></td>
603+
<td class="drHide">Studio Cup: $<span id="studioCupPoints"></span></td>
604604
<td>Copilot Fee: $<span id="studioCopilotFee"></span></td>
605605
<td>Challenge Fee: $<span id="studioAdminFee"></span></td>
606606
</tr>
@@ -611,7 +611,7 @@
611611
<strong>Estimated Challenge Total:&nbsp;&nbsp;$ <span id="studioTotal"></span></strong>
612612
<p class="note">
613613
Note: Challenge prizes, costs, and fees in this section are estimates. <br>
614-
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses and digital run incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
614+
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
615615
</div>
616616

617617
<div class="clear"></div>

src/web/WEB-INF/includes/contest/editTabSoftware.jsp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@
450450
</tr>
451451
<tr class="rightbor">
452452
<td class="first_tab topcoderPrize" align="left"><strong>2nd Place:</strong> $<span id="rswSecondPlace"></span></td>
453-
<td class="sec_tab_prize topcoderPrize"><strong>Digital Run:</strong> $<span id="rswDigitalRun"></span></td>
453+
<td class="sec_tab_prize topcoderPrize drHide"><strong>Digital Run:</strong> $<span id="rswDigitalRun"></span></td>
454454
<td class="sec_tab_prize"><strong>Copilot Fee:</strong> $<span id="rswCopilotFee"></span></td>
455455

456456
</tr>
@@ -474,7 +474,7 @@
474474
<strong>Estimated Challenge Total:</strong> $<span id="rswTotal"></span>
475475
<p class="note">
476476
Note: Challenge prizes, costs, and fees in this section are estimates. <br>
477-
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses and digital run incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
477+
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
478478
</div>
479479

480480
<div class="clear"></div>
@@ -553,9 +553,9 @@
553553
<span class="">
554554
<span class="mid_info topcoderPrize">Reliability Bonus:&nbsp;&nbsp;$ <span
555555
id="swReliabilityBonus"></span></span>
556-
<span class="mid_info topcoderPrize">&nbsp;Digital Run:&nbsp;</span><input type="checkbox" id="DRCheckbox" class="topcoderPrize"/>
557-
<span class="mid_info topcoderPrize">Digital Points:&nbsp;&nbsp;$</span>
558-
<input type="text" class="prizesInput topcoderPrize" value="" id="swDigitalRun" readonly="true" size="7"/>
556+
<span class="mid_info topcoderPrize drHide">&nbsp;Digital Run:&nbsp;</span><input type="checkbox" id="DRCheckbox" class="topcoderPrize drHide"/>
557+
<span class="mid_info topcoderPrize drHide">Digital Points:&nbsp;&nbsp;$</span>
558+
<input type="text" class="prizesInput topcoderPrize drHide" value="" id="swDigitalRun" readonly="true" size="7"/>
559559
</span>
560560

561561
<br />
@@ -593,7 +593,7 @@
593593
<div class="totalCostContainer">
594594
<strong>Estimated Challenge Total:&nbsp;&nbsp;$ <span id="swTotal"></span></strong>
595595
<p class="note">
596-
Note: Challenge prizes, costs, and fees in this section are estimates.</n> Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses and digital run incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
596+
Note: Challenge prizes, costs, and fees in this section are estimates.</n> Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
597597
</div>
598598

599599
<div class="clear"></div>

src/web/WEB-INF/includes/copilot/steps/step6.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
<div class="totalCostContainer">
206206
<p class="note">
207207
Note: Challenge prizes, costs, and fees in this section are estimates. <br>
208-
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses and digital run incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
208+
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses incentive paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
209209
</div>
210210
</div>
211211
<!--End .rowItem-->

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<tr>
9999
<p class="note">
100100
Note: Challenge prizes, costs, and fees in this section are estimates. <br>
101-
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses and digital run incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
101+
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
102102
</tr>
103103
</table>
104104

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<tr>
7777
<p class="note">
7878
Note: Challenge prizes, costs, and fees in this section are estimates. <br>
79-
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses and digital run incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
79+
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
8080
</tr>
8181
</table>
8282

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<tbody><tr>
6969
<td>First Place Cost : $<span id="sworFirstPlaceCost"></span> <a href="javascript:showPage('overviewSoftwarePage');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a></td>
7070
<td class="topcoderPrize">Second Place Cost : $<span id="sworSecondPlaceCost"></span> <a href="javascript:showPage('overviewSoftwarePage');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a></td>
71-
<td class="topcoderPrize">DR points : $<span id="sworDRPoints"></span> <a href="javascript:showPage('overviewSoftwarePage');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a></td>
71+
<td class="topcoderPrize drHide">DR points : $<span id="sworDRPoints"></span> <a href="javascript:showPage('overviewSoftwarePage');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a></td>
7272
<td class="topcoderPrize">Reliability Bonus Cost : $<span id="sworReliabilityBonusCost"></span> <a href="javascript:showPage('overviewSoftwarePage');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a></td>
7373
<td class="last">$<span id="sworContestPrizeCost"></span></td>
7474
</tr></tbody>
@@ -101,7 +101,7 @@
101101
<tr>
102102
<p class="note">
103103
Note: Challenge prizes, costs, and fees in this section are estimates. <br>
104-
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses and digital run incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
104+
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
105105
</tr>
106106
</table>
107107

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@
137137
<!-- end .mPrizes -->
138138

139139
<!-- Studio Cup Points -->
140-
<div class="studioCupPoints" id="studioCupPointsDiv">
140+
<div class="studioCupPoints drHide" id="studioCupPointsDiv">
141141

142142
<h3><span class="icon">Studio Cup Points:</span><a href="javascript:;" class="helpIcon"><span class="hide">Help</span></a></h3>
143143

144144
<div class="studioCupPointsInner">
145-
<input type="checkbox" id="studioCupPointsCheckBox" checked="checked"/> <!-- checked by default -->
145+
<input type="checkbox" id="studioCupPointsCheckBox"/> <!-- checked by default -->
146146
<strong>&nbsp;Studio Cup Points&nbsp;:&nbsp;&nbsp;<span id="rStudioCupPoints"></span></strong>
147147
</div>
148148

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,12 @@
251251
<span class="first_info">Review Cost:&nbsp;&nbsp;$ <span id="swReviewCost"></span></span>
252252
<span class="">
253253
<span class="mid_info topcoderPrize">Reliability Bonus:&nbsp;&nbsp;$ <span id="swReliabilityBonus"></span></span>
254-
<span class="mid_info topcoderPrize">&nbsp;Digital Run:&nbsp;</span>
255-
<input type="checkbox" id="DRCheckbox" checked="checked" autocomplete="off" class="topcoderPrize"/>
256-
<span class="mid_info topcoderPrize">
254+
<span class="mid_info topcoderPrize drHide">&nbsp;Digital Run:&nbsp;</span>
255+
<input type="checkbox" id="DRCheckbox" autocomplete="off" class="topcoderPrize drHide"/>
256+
<span class="mid_info topcoderPrize drHide">
257257
Digital Points:&nbsp;&nbsp;$
258258
</span>
259-
<input type="text" class="prizesInput topcoderPrize" value="" id="swDigitalRun" readonly="true" size="7" style="padding: 0 5px; font-size: 11px;"/>
259+
<input type="text" class="prizesInput topcoderPrize drHide" value="" id="swDigitalRun" readonly="true" size="7" style="padding: 0 5px; font-size: 11px;"/>
260260
<br/>
261261
</span>
262262
<span class="first_info topcoderPrize">Spec Review Fee:&nbsp;&nbsp;$ <span id="swSpecCost"></span></span>
@@ -265,7 +265,7 @@
265265
<div class="totalCostContainer"><strong>Estimated Challenge Total:&nbsp;&nbsp;$ <span id="swTotal"></span></strong>
266266
<p class="note">
267267
Note: Challenge prizes, costs, and fees in this section are estimates. <br>
268-
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses and digital run incentives paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
268+
Actual costs are based on prizes paid, review fees based on number of submissions, reliability bonuses paid, co-pilot fees, and so on. Challenge fees are also part of the final costs. </p>
269269
</div>
270270
</span>
271271
</div>

src/web/css/direct/screen.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,6 +1314,10 @@ IMG {
13141314
display: none;
13151315
}
13161316

1317+
.drHide {
1318+
display: none;
1319+
}
1320+
13171321
.fLeft {
13181322
float: left !important;
13191323
}

src/web/scripts/launch/contestDetailSoftware.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,8 @@ function initContest(contestJson) {
11151115
if (contestJson.projectStatus.name != "Draft") {
11161116
canEditMultiRound = false;
11171117
}
1118+
1119+
$(".drHide").hide();
11181120
}
11191121

11201122

src/web/scripts/launch/main.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,11 +1374,9 @@ function showPage(pageId) {
13741374
$("#overviewPage .maxSubmissions").show();
13751375
}
13761376

1377-
if(isDesignF2F() || isIdeaGeneration()) {
1378-
$("#studioCupPointsDiv").hide().find("input[type=checkbox]").removeAttr('checked');
1379-
} else {
1380-
$("#studioCupPointsDiv").show().find("input[type=checkbox]").attr('checked', 'checked');
1381-
}
1377+
1378+
$("#studioCupPointsDiv").hide().find("input[type=checkbox]").removeAttr('checked');
1379+
13821380

13831381
delay(studioPrizeChangeHandler(), 1000);
13841382
}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ function updateOrderReviewSoftware() {
166166
$('#sworDRPoints').parents("td").show()
167167
}
168168
var contestPrizesPart = 0;
169-
170169
if(isCode()) {
171170
var contestPrizesHTML = "";
172171
var prizes = mainWidget.softwareCompetition.projectHeader.prizes;
@@ -233,6 +232,9 @@ function updateOrderReviewSoftware() {
233232
// show the prize settings for TopCoder contests
234233
$(".topcoderPrize").show();
235234
}
235+
236+
$(".drHide").hide();
237+
236238
}
237239

238240
/**
@@ -273,7 +275,7 @@ function updateOrderReviewStudio() {
273275
html +=
274276
'<td>'+ place +' : $'+ amount.formatMoney(2) +'<a href="javascript: showPage(\'overviewPage\');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit" /></a></td>';
275277
});
276-
html += '<td>' +'Studio Cup points : ' + calculateStudioCupPoints() + '</td>';
278+
html += '<td class="drHide">' +'Studio Cup points : ' + calculateStudioCupPoints() + '</td>';
277279
html += '<td class="last">$'+ contestPrizesTotal.formatMoney(2) +'</td>';
278280
$('#orPrizesTR').html(html);
279281

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ function continueContestSelection() {
500500
showPage('overviewPage');
501501
}
502502

503-
503+
$(".drHide").hide();
504504
}
505505

506506
function saveAsDraftContestSelection() {

0 commit comments

Comments
 (0)