       tryToDownload: false
       downloadUrl: downloadUrl
       lastExported: lastExported
+      finalDownloadUrl: null
 
     @setState(downloadState)
-    @downloadCurrentExport(downloadUrl)
-
-  downloadCurrentExport: (url) ->
-    document.getElementById('downloadExport').src = url;
 
   addBindListener: ->
     {courseId} = @props

    invalidDownloadState =
      tryToDownload: false
      downloadHasError: true

    invalidDownloadState.downloadUrl = null if @state.downloadUrl is downloadUrl


  componentWillMount: ->
    {courseId} = @props
    ScoresExportActions.load(courseId)

  componentDidUpdate: (prevProps, prevState) ->
    @setState(finalDownloadUrl: @state.downloadUrl) if @shouldTriggerDownload(prevState, @state)

  shouldTriggerDownload: (prevState, currentState) ->
    prevState.tryToDownload and not currentState.tryToDownload and not currentState.downloadHasError and currentState.downloadUrl?
