             return "started"
         else
             return "none"
-            
+
 TotalResult = (props) ->
     style = globalStyles.mainTable_td
     title = ""

                        </td>
                    else
                        for result in subtable.results
                            a <Result header={props.header} result={result} user={props.user} key={result._id + "::" + subtable._id}/> 
                            subTotal = addTotal(subTotal, result)
                a <td className={globalStyles.border} key={table._id + "b"} />
                if props.results.length > 1

            "wa"
        else
            undefined

    if className
        className = globalStyles[className]

    realProblem = r.table.substr(1)
    runId = r.lastSubmitId
    if runId
        if runId.indexOf("p") > 0
            runId = runId.substr(0, runId.indexOf("p"))  # strip problem suffix
    dbClickUrl = "/material/#{r.table}"

    ctrlDbClickUrl = 'http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=' + realProblem + '&submit&user_id=' + props.user._id

    dbClickHandler = (event) ->
        if event.ctrlKey
            window.open(ctrlDbClickUrl, '_blank')
        else
            window.open(dbClickUrl, '_blank')


    <td title={props.user.name + " : " + props.result.problemName} className={className + " " + styles.res + " " + globalStyles.mainTable_td} onDoubleClick={dbClickHandler}>
        {text}
    </td>

totalResultClass = (result) ->
    if not result.problemName
        return undefined
    if result.total == result.solved
        return "full"
    else
        needed = result.total
        if result.problemName.slice(-1) == "В"
            needed = Math.ceil(needed / 2)
