Hey, been banging my head against the wall for a couple of hours now.
There is an If () in the code that is driving me crazy because it is not behaving like I expect it to..
foreach ( $types as $type ) {
if ( !isset( $type->modclass ) or !isset( $type->typestr ) ) {
debugging( 'Incorrect activity type in ' . $modname );
continue;
}
$var = (string)$type->type;
if ( $var != 'assignment&type=online' ) {
print '<br/>' . $var . '<br/>';
if ( $type->modclass == MOD_CLASS_RESOURCE ) {
$resources[$type->type] = $type->typestr;
} else {
$activities[$type->type] = $type->typestr;
}
}
}
results in...
label
resource&type=text
resource&type=html
resource&type=file
resource&type=directory
resource&type=ims
assignment_group_start
assignment&type=upload
assignment&type=online
assignment&type=uploadsingle
assignment&type=offline
assignment_group_end
Notice the assignment&type=online in the output... I'm just about ready to give up as to why it is still outputting $var when it is clearly equal to the compared string?
Any ideas?