From: agrabs Date: Thu, 31 Jul 2008 12:55:24 +0000 (+0000) Subject: MDL-15497 Conditional activities system X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=29081d02b91d4a7e91eb96ffa8f8b28115780370;p=moodle.git MDL-15497 Conditional activities system --- diff --git a/mod/feedback/complete.php b/mod/feedback/complete.php index 6a0abc8260..66fd68a214 100644 --- a/mod/feedback/complete.php +++ b/mod/feedback/complete.php @@ -303,6 +303,11 @@ echo '

'; } } + + // Mark activity viewed for completion-tracking + $completion=new completion_info($course); + $completion->set_module_viewed($cm); + if($feedback->site_after_submit) { print_continue(feedback_encode_target_url($feedback->site_after_submit)); }else { diff --git a/mod/feedback/lib.php b/mod/feedback/lib.php index 9822ad4bc9..23b1361d23 100644 --- a/mod/feedback/lib.php +++ b/mod/feedback/lib.php @@ -36,6 +36,16 @@ function feedback_install() { return true; } +/** + * @param string $feature FEATURE_xx constant for requested feature + * @return mixed True if module supports feature, null if doesn't know + */ +function feedback_supports($feature) { + switch($feature) { + case FEATURE_COMPLETION_TRACKS_VIEWS: return true; + default: return null; + } +} /** * this will create a new instance and return the id number