             "wa"
         else
             undefined
-            
+
     if className
         className = globalStyles[className]
-        
+
     realProblem = r.table.substr(1)
     runId = r.lastSubmitId
-    runSuff = ''
     if runId
         if runId.indexOf("p") > 0
             runId = runId.substr(0, runId.indexOf("p"))  # strip problem suffix
-        runSuff = '&run_id=' + runId
-    dbClickUrl = 'http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=' + realProblem + runSuff
+    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 
+        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 
+    else
         needed = result.total
         if result.problemName.slice(-1) == "В"
             needed = Math.ceil(needed / 2)

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

            "-" + r.attempts
        else
            " "
    className =
        if r.solved > 0
            "ac"
        else if r.ignored > 0
