         else
             styles.muchUnpaid
 
+    setResult: (result) ->
+        @syncSetOutcome(result)
+        @props.handleDone?()
+
+    syncSetOutcome: (result) ->
+        await callApi "setOutcome/#{@currentSubmit._id}", {
+            result,
+            comment: @state.commentText
+        }
+        @props.syncHandleDone?()
+        @props.handleReload()
+
+    downloadSubmits: () ->
+        await callApi "downloadSubmitsForUserAndProblem/#{@props.user._id}/#{@props.result.fullTable._id}"
+        @props.handleReload()
+
+    accept: () ->
+        @setResult("AC")
+
+    ignore: () ->
+        @setResult("IG")
+
+    disqualify: () ->
+        @setResult("DQ")
+
+    comment: () ->
+        @setResult(null)
+
+    setQuality: (quality) ->
+        () =>
+            await callApi "setQuality/#{@currentSubmit._id}/#{quality}", {}
+            @props.handleReload()
+
+    toggleBestSubmits: (e) ->
+        if e
+            e.preventDefault()
+        @setState
+            showBestSubmits: not @state.showBestSubmits
+
     render:  () ->
         <div className={@paidStyle()}>
-            {`<SubmitListWithDiff {...this.props} SubmitComponent={SubmitWithActions}/>`}
+            {`<SubmitListWithDiff {...this.props} {...this.state} SubmitComponent={SubmitForReviewResults} PostSubmit={SubmitActions} setCurrentSubmit={this.setCurrentSubmit} accept={this.accept} ignore={this.ignore} disqualify={this.disqualify} comment={this.comment} setField={this.setField} setQuality={this.setQuality} toggleBestSubmits={this.toggleBestSubmits} downloadSubmits={this.downloadSubmits} setComment={this.setComment} copyTest={this.copyTest} />`}
         </div>
 
 SubmitsAndSimilarMerger = (props) ->

            @setState
                currentSubmit: submit
                currentDiff: [undefined, undefined]

    setCurrentDiff: (i, submit) ->
        (e) =>

        @state =
            currentSubmit: if @props.submits then @props.submits[@props.submits.length - 1] else null
            currentDiff: [undefined, undefined]
        props.setCurrentSubmit?(@state.currentSubmit)
        @setCurrentSubmit = @setCurrentSubmit.bind this
        @setCurrentDiff = @setCurrentDiff.bind this

