         return material.content
     else
         return "/material/#{material._id}"
+
+stripLabel = (id) ->
+    idx = id.indexOf("!")
+    if idx != -1
+        return id.substring(0, idx)
+    return id
 
 markNeeded = (tree, id, path, globalDepth, localDepth) ->
     if tree._id == id


SolutionMark = withMyResults withLang (props) ->
    LANG = (id) -> LangRaw(id, props.lang)
    result = props.myResults?[props.myUser?._id + "::" + props.id]
    indent = props.indent
    if not result?.total?
        return null


    if result.solved == result.total
        colorBox(indent, styles.full, "check", LANG("all_problems_solved"))
    else if isLevelDone(id, props.myUser?._id, props.myResults)
        colorBox(indent, styles.done, "check", LANG("laevel_done"))
    else if result.solved > 0 or result.ok > 0 or result.attempts > 0
        colorBox(indent, styles.started, undefined, LANG("level_started"))
