public/wordpress/wp-content/plugins/wishlist-member-addon-for-wp-courseware/wp-courseware-wishlist-member.php
/**
	 * Assign selected courses to members of a paticular level.
	 * @param Level ID in which members will get courses enrollment adjusted.
	 */
Assign selected courses to members of a paticular level.
@param Level ID in which members will get courses enrollment adjusted.
Assign selected courses to members of a paticular level . @param Level ID in which members will get courses enrollment adjusted .
protected function retroactive_assignment($level_ID)
    {
    	global $WishListMemberInstance;
    	$page = new PageBuilder(false);
		$members = $WishListMemberInstance->MemberIDs($level_ID,null, null);
		if (count($members) > 0){
			foreach ($members as $member){
				$userLevels = $WishListMemberInstance->GetMemberActiveLevels($member);
				parent::handle_courseSync($member, $userLevels);
			}
		$page->showMessage(__('All members were successfully retroactively enrolled into the selected courses.', 'wp_courseware'));
        return;
		}else {
            $page->showMessage(__('No existing customers found for the specified product.', 'wp_courseware'));
        }
    }
protected function retroactive_assignment ( $ level_ID ) { global $ WishListMemberInstance ; $ page = new PageBuilder ( false ) ; $ members = $ WishListMemberInstance -> MemberIDs ( $ level_ID , null , null ) ; if ( count ( $ members ) > 0 ) { foreach ( $ members as $ member ) { $ userLevels = $ WishListMemberInstance -> GetMemberActiveLevels ( $ member ) ; parent :: handle_courseSync ( $ member , $ userLevels ) ; } $ page -> showMessage ( __ ( 'All members were successfully retroactively enrolled into the selected courses.' , 'wp_courseware' ) ) ; return ; } else { $ page -> showMessage ( __ ( 'No existing customers found for the specified product.' , 'wp_courseware' ) ) ; } }
Assign selected courses to members of a paticular level.
Assign selected courses to members of a paticular level .
//Get members associated with $level_ID //Enroll members into of level // Get user levels // Over to the parent class to handle the sync of data.