<td style="text-align : right; padding-right: <?php 
        echo $indent - 23;
        ?>
px" class="response">
                        <b><?php 
        echo $prefix;
        ?>
.</b> <?php 
        echo $child->response;
        ?>
                    </td>
                </tr>
<?php 
        hierarchize_print_level($brainstorm->id, $cm, null, $currentgroup, false, $child->odid, $i + 1, $indent, $current_operator->configdata);
        $i++;
        $subscount = brainstorm_count_subs($child->odid);
        // get subs status of previous entry
    }
    ?>
    <tr>
        <td colspan="2">
            <br/><input type="button" name="clear_btn" value="<?php 
    print_string('clearalldata', 'brainstorm');
    ?>
" onclick="document.forms['treeform'].what.value='clearall';document.forms['treeform'].submit();" />
        </td>
    </tr>
<?php 
} else {
    echo '<tr><td>';
    print_simple_box_start('center');
/**
*
* @param int $brainstormid
* @param object $cm
* @param int $userid
* @param int $groupid
* @param boolean $excludemyself
* @param int $fatherid
* @param string $prefix
* @param int $indent
* @param boolean $editing
*/
function hierarchize_print_level($brainstormid, $cm, $userid, $groupid, $excludemyself, $fatherid, $prefix, $indent, $configdata, $editing = true)
{
    global $CFG;
    $subs = hierarchize_get_childs($brainstormid, $userid, $groupid, $excludemyself, $fatherid);
    if (!empty($subs)) {
        $i = 0;
        $indent += 25;
        $level = $indent / 25;
        $subscount = 0;
        foreach ($subs as $sub) {
            $levelprefix = $prefix . '.' . ($i + 1);
            ?>
                <tr>
<?php 
            if ($editing) {
                $up = $i ? "<a href=\"view.php?id={$cm->id}&amp;operator=hierarchize&amp;what=up&amp;item={$sub->odid}\"><img src=\"{$CFG->pixpath}/t/up.gif\"></a>" : '';
                $down = $i < count($subs) - 1 ? "<a href=\"view.php?id={$cm->id}&amp;operator=hierarchize&amp;what=down&amp;item={$sub->odid}\"><img src=\"{$CFG->pixpath}/t/down.gif\"></a>" : '';
                $left = $indent > 25 ? "<a href=\"view.php?id={$cm->id}&amp;operator=hierarchize&amp;what=left&amp;item={$sub->odid}\"><img src=\"{$CFG->pixpath}/t/left.gif\"></a>" : '';
                if (isset($configdata->maxarity) && $configdata->maxarity && $subscount >= $configdata->maxarity || isset($configdata->maxlevels) && $configdata->maxlevels && $level >= $configdata->maxlevels) {
                    $right = '';
                } else {
                    $right = $i ? "<a href=\"view.php?id={$cm->id}&amp;operator=hierarchize&amp;what=right&amp;item={$sub->odid}\"><img src=\"{$CFG->pixpath}/t/right.gif\"></a>" : '';
                }
                ?>
                    <td>
                        <table cellspacing="3">
                            <tr>
                                <td width="10">
                                    <?php 
                echo $left;
                ?>
                                 </td>
                                <td width="10">
                                    <?php 
                echo $up;
                ?>
                                 </td>
                                <td width="10">
                                    <?php 
                echo $down;
                ?>
                                 </td>
                                <td width="10">
                                    <?php 
                echo $right;
                ?>
                                 </td>
                             </tr>
                         </table>
                    </td>
<?php 
            }
            ?>
                    <td style="text-align : right; padding-right : <?php 
            echo $indent - 23;
            ?>
px" class="response">
                        <b><?php 
            echo $levelprefix;
            ?>
.</b> <?php 
            echo $sub->response;
            ?>
                    </td>
                </tr>
<?php 
            hierarchize_print_level($brainstormid, $cm, $userid, $groupid, $excludemyself, $sub->odid, $levelprefix, $indent, $configdata, $editing);
            $i++;
            $subscount = brainstorm_count_subs($sub->odid);
            // get subs status of previous entry
        }
    }
}