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

Commit d9664fa

Browse files
committed
Merge pull request #442 from appirio-tech/release
Release qa to prod
2 parents af5f946 + 87140c4 commit d9664fa

File tree

8 files changed

+80
-16
lines changed

8 files changed

+80
-16
lines changed

actions/challengeRegistration.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,12 @@ var sendNotificationEmail = function (api, componentInfo, userId, activeForumCat
403403
forumURL = api.config.tcConfig.studioForumsUrlPrefix + activeForumCategoryId;
404404
submitURL = process.env.TC_STUDIO_SERVER_NAME + '/?module=ViewContestDetails&ct=' + challengeId;
405405
}
406-
407-
template = 'registration_notification_email';
406+
407+
if (componentInfo.review_type && componentInfo.review_type == 'PEER')
408+
template = 'peer_review_registration';
409+
else
410+
template = 'registration_notification_email';
411+
408412
if (challengeType === CHALLENGE_TYPE.DESIGN) {
409413
template = 'design_registration_notification_email';
410414
// Get forum type

actions/challenges.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -796,13 +796,9 @@ var addFilter = function (sql, filter, isMyChallenges, helper, caller) {
796796

797797
if (_.isDefined(filter.review)) {
798798
review = "'" + filter.review.toUpperCase().replace(/,/g, "','") + "'";
799+
sql.count = editSql(sql.count, REVIEW_FILTER, review);
800+
sql.data = editSql(sql.data, REVIEW_FILTER, review);
799801
}
800-
else {
801-
review = "'COMMUNITY','INTERNAL'";
802-
}
803-
804-
sql.count = editSql(sql.count, REVIEW_FILTER, review);
805-
sql.data = editSql(sql.data, REVIEW_FILTER, review);
806802

807803
if (isMyChallenges) {
808804
sql.count = editSql(sql.count, MY_CHALLENGES_FILTER, null);

actions/memberRegistration.js

+16-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ var bignum = require("bignum");
3333
var _ = require("underscore");
3434
var IllegalArgumentError = require('../errors/IllegalArgumentError');
3535
var BadRequestError = require('../errors/BadRequestError');
36+
var request = require('request');
3637

3738
/**
3839
* The max surname length
@@ -1150,8 +1151,21 @@ exports.memberRegister = {
11501151
if (err) {
11511152
api.helper.handleError(api, connection, err);
11521153
} else {
1153-
api.log("Member registration succeeded.", "debug");
1154-
connection.response = {userId : result};
1154+
var finalize = function() {
1155+
api.log("Member registration succeeded.", "debug");
1156+
connection.response = {userId : result};
1157+
};
1158+
1159+
if (connection.params.regSource !== null && connection.params.regSource === 'apple') {
1160+
request.post({
1161+
headers: { 'Authorization' : 'Bearer ' + connection.rawConnection.req.headers.authorization },
1162+
url: 'https://api.' + api.config.tcConfig.oauthDomain + '.com/v3/memberCert/registrations/' + result + '/programs/3445'
1163+
},
1164+
function(error, response, body) {
1165+
finalize();
1166+
});
1167+
}
1168+
else finalize();
11551169
}
11561170

11571171
next(connection, true);
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<p>Hi <%= userName %>,</p>
2+
3+
<p>Congratulations! You are now registered for <%= projectName %> Challenge.</p>
4+
5+
<p>You now have access to the challenge discussion forum ( <%= forumURL %> ), which may have important information or documentation<%= documentationDetails %> about the challenge. It is also the place to ask questions regarding the challenge. Please post your questions at any time and the challenge holder will respond within 24 hours. Any questions asked within a few hours of the submission deadline may not be answered in time, so get your questions in early!</p>
6+
7+
<p>The deadline for submitting a solution is <%= deadlineDate %>. Please upload your submission here: <%= submitURL %>. If you encounter any problems, please contact us at [email protected]. All late submissions will be ignored.</p>
8+
9+
<p>Need more information? Visit the Help Center at http://help.topcoder.com.</p>
10+
11+
<p>Do you have questions or technical problems? Please contact [email protected].</p>
12+
13+
<p>Good luck!</p>
14+
<p>The topcoder Team</p>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
h1 {
2+
color: red;
3+
}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Hi <%= userName %>,
2+
3+
Congratulations! You are now registered for <%= projectName %> Challenge.
4+
5+
You now have access to the challenge discussion forum ( <%= forumURL %> ), which may have important information or documentation<%= documentationDetails %> about the challenge. It is also the place to ask questions regarding the challenge. Please post your questions at any time and the challenge holder will respond within 24 hours. Any questions asked within a few hours of the submission deadline may not be answered in time, so get your questions in early!
6+
7+
The deadline for submitting a solution is <%= deadlineDate %>. Please upload your submission here: <%= submitURL %>. If you encounter any problems, please contact us at [email protected]. All late submissions will be ignored.
8+
9+
Need more information? Visit the Help Center at http://help.topcoder.com.
10+
11+
Do you have questions or technical problems? Please contact [email protected].
12+
13+
Good luck!
14+
The topcoder Team
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1-
Here is the registration notification email
1+
Hi <%= userName %>,
22

3-
Have fun!
3+
Congratulations! You are now registered for <%= projectName %> Challenge.
4+
5+
You now have access to the challenge discussion forum ( <%= forumURL %> ), which may have important information or documentation<%= documentationDetails %> about the challenge. It is also the place to ask questions regarding the challenge. Please post your questions at any time and the challenge holder will respond within 24 hours. Any questions asked within a few hours of the submission deadline may not be answered in time, so get your questions in early!
6+
7+
The deadline for submitting a solution is <%= deadlineDate %>. Please upload your submission here: <%= submitURL %>. If you encounter any problems, please contact us at [email protected]. All late submissions will be ignored.
8+
9+
Additional tasks for this challenge can be accessed in Online Review. This is where you can unregister, contact a manager, view your review scorecard, submit appeals and final fixes, and other important tasks. <%= reviewURL %>
10+
11+
Need more information about competing? Visit the Help Center at http://help.topcoder.com.
12+
13+
Do you have questions or technical problems? Please contact [email protected].
14+
15+
Good luck!
16+
The topcoder Team

queries/get_component_info

+10-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@ SELECT
88
-- the project category id, e.g. Logo Design, Developemnt, Assembly
99
(select project_category_id from project where project_id = @challengeId@ ) as project_category_id,
1010
-- the project name.
11-
(select value from project_info where project_id = @challengeId@ AND project_info_type_id = 6 ) as project_name
11+
(select value from project_info where project_id = @challengeId@ AND project_info_type_id = 6 ) as project_name,
12+
pi79.value as review_type
1213
FROM comp_versions c
13-
INNER JOIN project_info p ON c.component_id = p.value
14-
INNER JOIN project_phase d ON d.project_id = @challengeId@ and phase_type_id = 2
14+
, project_info p
15+
, project_phase d
16+
, project_info pi79
1517
WHERE
1618
p.project_info_type_id = 2
1719
AND c.phase_id IN (112, 113)
18-
AND p.project_id = @challengeId@
20+
AND c.component_id = p.value
21+
AND p.project_id = @challengeId@
22+
AND d.project_id = @challengeId@ and d.phase_type_id = 2
23+
AND pi79.project_info_type_id = 79
24+
AND pi79.project_id = @challengeId@

0 commit comments

Comments
 (0)