Quantcast
Channel: General help
Viewing all articles
Browse latest Browse all 39737

Help find replacement for get_and_set_current_group()

$
0
0
by Константин Елшанский.  

Good day for everyone. I need to replace the old function get_and_set_current_group() with new equivalent. Using moodle search and google I only have found information that it's deprecated. Can you tell me how I should replace it?

This is a fragment of code;

GLOBAL $cm,$course,$CFG,$USER;
if (!$context = get_context_instance(CONTEXT_MODULE, $cm->id)) {
print_error('badcontext');
}

$changegroup = optional_param('group', -1, PARAM_INT); // choose the current group
$groupmode = groupmode($course,$cm);
$currentgroup = get_and_set_current_group($course, $groupmode, $changegroup);

 

Thanks!


Viewing all articles
Browse latest Browse all 39737

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>