public function duplicate_rule($finalcourseid) {
        $rule = fullclone($this->rule);
        unset($rule->id);
        $rule->courseid = $finalcourseid;
        $time = time();
        $rule->timecreated = $time;
        $rule->timemodified = $time;
        rule_manager::add_rule($rule);
    }
public function duplicate_rule($finalcourseid) {
        $rule = fullclone($this->rule);
        unset($rule->id);
        $rule->courseid = $finalcourseid;
        $time = time();
        $rule->timecreated = $time;
        $rule->timemodified = $time;
        rule_manager::add_rule($rule);
    }
public function duplicate_rule ( $ finalcourseid ) { $ rule = fullclone ( $ this -> rule ) ; unset ( $ rule -> id ) ; $ rule -> courseid = $ finalcourseid ; $ time = time ( ) ; $ rule -> timecreated = $ time ; $ rule -> timemodified = $ time ; rule_manager :: add_rule ( $ rule ) ; }
Api to duplicate a rule in a given courseid.

@param int $finalcourseid Final course id.
Api to duplicate a rule in a given courseid .