if (interactive()) {
  
  
  server <- function(input, output) {
    observeEvent(input$goButton, {
      library(shiny)
      library(shinyjs)
      library(CTT)
      library(TAM)
      library(ltm)
      library(difR)
      
      
      
      
      
      output$contents <- renderTable({
        # input$file1 will be NULL initially. After the user selects
        # and uploads a file, it will be a data frame with 'name',
        # 'size', 'type', and 'datapath' columns. The 'datapath'
        # column will contain the local filenames where the data can
        # be found.
        inFile1 <- input$file1
        
        if (is.null(inFile))
          return(NULL)
        
        d1<-read.csv(inFile$datapath, header = input$header)
      })
      output$contents <- renderTable({
        # input$file1 will be NULL initially. After the user selects
        # and uploads a file, it will be a data frame with 'name',
        # 'size', 'type', and 'datapath' columns. The 'datapath'
        # column will contain the local filenames where the data can
        # be found.
        inFile2 <- input$file2
        
        if (is.null(inFile))
          return(NULL)
        
        d2<-read.csv(inFile$datapath)
      })
      options(max.print=1000000)
      d3<-as.list(d2)
      
      myScore=score(d1,d3,output.scored=T)
      mo1<-rasch(myScore$scored)
      mo2<-ltm(myScore$scored~z1,IRT.param = TRUE)
      
      descript1<-descript(myScore$scored,n.print = 1000000)
      output$des1<-renderText({descript1$sample})
      }
    
    )
    
    
    }   
}
