 Future = Npm.require('fibers/future');
 
 class AllSubmitDownloader
-    # Лицей 40
-    baseUrl: (page) ->
-        'http://informatics.mccme.ru/moodle/ajax/ajax.php?problem_id=0&group_id=3696&user_id=0&lang_id=-1&status_id=-1&statement_id=0&objectName=submits&count=10&with_comment=&page=' + page + '&action=getHTMLTable'
-    # Заоч
-    #tableBaseUrl = 'http://informatics.mccme.ru/moodle/ajax/ajax.php?problem_id=0&group_id=3644&user_id=0&lang_id=-1&status_id=-1&statement_id=0&objectName=submits&count=10&with_comment=&page=%d&action=getHTMLTable'
+    
+    constructor: (@baseUrl, @userList, @limitPages) ->
     
     AC: 'Зачтено/Принято'
     IG: 'Проигнорировано'

            outcome = "IG"
        console.log uid, name, pid, runid, prob, date, "'"+outcome+"'"
        Submits.addSubmit(runid, date, uid, pid, outcome)
        Users.addUser(uid, name, "lic40")
        res
    
#    if date > endDate:  # we do not need this, but continue search

#        return parser.text('every 10 seconds');
        return parser.text('every 1 minutes');
    job: -> 
        (new LastSubmitDownloader(lic40url, 'lic40', 3)).run()
        (new LastSubmitDownloader(zaochUrl, 'zaoch', 3)).run()
        updateResults()

SyncedCron.add
    name: 'loadTable-3',
