@@ -105,26 +105,23 @@ class SubmissionsComponent extends React.Component {
105
105
/**
106
106
* Returns the value of the "Initial Score" shown on the submissions tab
107
107
* We have to check a couple things because sometimes we're running code challenges that
108
- * likely should be marathon matches (PS-295)
108
+ * likely should be marathon matches (PS-295), so the logic is a bit more complex.
109
109
*
110
- * Marathon matches place the initial score in submission.score
110
+ * We want to show provisional scores _during_ Innovation Challenges, even if run
111
+ * as a code challenge, with MM scoring, but for a normal code challenge we don't
112
+ * want to show provisional review scores until the challenge completes, so that
113
+ * competitors don't have access to scores during appeals.
111
114
*
112
- * Code challenges place the initial score in submission.review[x].score
113
- *
114
- * We need to check both places
115
115
* @param {Object } submission The submission to return the score for
116
116
*/
117
117
getInitialScore ( submission ) {
118
118
let score = 'N/A' ;
119
119
const { challenge } = this . props ;
120
-
121
120
if ( ! _ . isEmpty ( submission . review )
122
121
&& ! _ . isEmpty ( submission . review [ 0 ] )
123
122
&& submission . review [ 0 ] . score
124
- && challenge . status === 'Completed' ) {
123
+ && ( challenge . status === 'Completed' || _ . includes ( challenge . tags , 'Innovation Challenge' ) ) ) {
125
124
score = Number ( submission . review [ 0 ] . score ) . toFixed ( 2 ) ;
126
- } else if ( ! _ . isEmpty ( submission . score ) ) {
127
- score = Number ( submission . score ) . toFixed ( 2 ) ;
128
125
}
129
126
return score ;
130
127
}
0 commit comments