Possible enhancement hack...

Possible enhancement hack...

von Janne Mikkonen -
Anzahl Antworten: 1
Since new assingment module is more Object oriented and setting up an assingment is done in several stages. Meaning values from first form is passed as hidden fields to the next. Only thing is that currently it doesn't recognize arrays.

This can be fixed by editing /mod/assingment/type/common.html:

// Pass variables through
foreach ($form as $assname => $assvalue) {
    if ( is_array($assvalue) ) {
        foreach ( $assvalue as $subassvalue ) {
            echo '<input type="hidden" name="'. $assname .'[]" value="'. s($subassvalue) .'" />' . "\n";
        }
    } else {
        echo '<input type="hidden" name="'.$assname.'" value="'.s($assvalue).'" />'."\n";
    }
}


- Janne -