Theme.class: fixed get_exercicesOrdered

This commit is contained in:
Li Chen 2013-11-05 04:42:47 +01:00
parent 3c4b6296ba
commit 0db1d6a0c1

View File

@ -108,7 +108,7 @@ class Theme
for ($i = 0; $i < $size; $i++)
{
for ($j = 0; $j < $size; $i++)
for ($j = $i; $j < $size; $j++)
{
if ($i == 0)
{
@ -121,7 +121,7 @@ class Theme
}
else
{
if ($res[$j]['require'] == $res[$i]['id'])
if ($res[$j]['require'] == $res[$i - 1]['id'])
{
$tmp = $res[$i];
$res[$i] = $res[$j];