 
   render: ->
     {courseId, className} = @props
-    {downloadUrl, lastExported, downloadHasError, tryToDownload} = @state
+    {downloadUrl, lastExported, downloadHasError, tryToDownload, finalDownloadUrl} = @state
 
     className += ' export-button'
     actionButtonClass = 'primary'

        Export
      </AsyncButton>

    if lastExported? and not downloadHasError
      lastExportedTime = <i>
        <TimeDifference date={lastExported}/>
      </i>
      lastExportedLabel = <small className='export-button-time pull-right'>
        Last exported {lastExportedTime}
      </small>

    <span className={className}>
      <div className='export-button-buttons'>
        {actionButton}
      </div>
      <iframe id="downloadExport"></iframe>
    </span>

module.exports = ScoresExport


  getInitialState: ->
    downloadUrl: null
    finalDownloadUrl: null
    lastExported: null
    tryToDownload: false
    downloadedSinceLoad: false
