text:
7 Surprising Facts About Prince Philip
For starters, he has a habit of putting his foot in his mouth.
Erin Quinn-Kong
On Nov. 20, 1997, Queen Elizabeth and Prince Philip celebrated their 50th wedding anniversary. In a speech at a lunch honoring the occasion, Queen Elizabeth said, "[Prince Philip] is someone who doesn't take easily to compliments, but he has, quite simply, been my strength and stay all these years."
Fans of Netflix's The Crown know that the Prince is also not afraid to speak up when he isn't pleased about something, whether it's having to bow to his wife at her coronation or his children not taking his surname. According to reports, one of the topics the second season of the royal hit drama will focus on is Prince Philip's fascinating past.
We spoke to Carolyn Harris, who teaches history at the University of Toronto School of Continuing Studies and has been examining royals for 10 years, to learn more about the Prince. Here's a primer on everything you need to know about him.
Prince Philip, Duke of Edinburgh at Buckingham Palace in December 1958.
1. He had a rough childhood.
Born on June 10, 1921, to Prince Andrew of Greece and Denmark and Princess Alice of Battenberg, Prince Philip's early life was full of turmoil. "Unlike Queen Elizabeth, whose family was very stable and united, Prince Philip as an infant had to flee Greece with his parents and four sisters," says Harris, whose latest book, Raising Royalty: 1000 Years of Royal Parenting, comes out April 8. When Philip was nine years old, his mother, who had schizophrenia, was committed to a mental institution in Switzerland and his father took off with a mistress. Their only son was sent to boarding school in England and "was shuffled from relative to relative during holidays," says Harris.
2. Queen Elizabeth is his third cousin.
Five years her senior, Prince Philip met Queen Elizabeth in 1939 when she was just 13. "He gave her a tour of the Royal Naval College in Dartmouth, and she was impressed with him from the start," says Harris. They became pen pals, and seven years later, Philip asked King George VI for his daughter's hand in marriage. They married when Elizabeth was 21, after waiting a year at the King's request.
3. Philip had to define his own role.
As depicted in The Crown, the former Navy man struggled with filling his time after his wife started her reign in 1952. "Philip did not have many role models—there weren't many queens then—so he had to carve out his own role," says Harris. Along with undertaking patronages for more than 800 different charities, Philip took the lead in managing the queen's personal properties and assumed a leadership role in the family, including deciding how their children, Prince Charles, Prince Andrew and Prince Edward and Princess Anne, were educated.
In May, Buckingham Palace announced that Prince Charles would be stepping down royal public duties in the fall. While he will still serve as patron, president or a member of 780 organizations, he will no longer have "an active role."
The Wedding Dress in 'The Crown' Cost $30K
4. He's forward-thinking.
In The Crown, Prince Philip is in favor of his wife's coronation being televised in 1953. "He's interested in technology and modernizing the monarchy," says Harris. "People around the world were able to engage with the coronation, and it did wonders for the TV industry. Many people bought their first TV just to watch it." And Prince Philip still favors technology advancement today: In February, he toured Vantage Power, which designs hybrid bus engines, and reminded them that he drove one of the first electric cars in the 1960s.
5. He has a habit of putting his foot in his mouth.
While Queen Elizabeth is expected to be above politics and is careful with what she says, Prince Philip has been outspoken through the years. "He's spoken frankly that the purpose of monarchy is to serve the people, not the other way around," says Harris. He's also known for making jokes that are sometimes offensive. In The Crown, for example, he told an African king he liked his "hat." (It was a crown.) "When he was younger, the things he said were more controversial," says Harris. "Now that he's in his 90s, people have a more indulgent attitude toward Prince Philip." When he met activist Malala Yousafzai in 2013 to discuss the importance of education, he quipped that in Britain, "People want children to go to school to get them out of the house." Yousafzai giggled.
6. He was involved in one very big scandal.
After Princess Diana died in a car crash in August 1997, Egyptian business magnate Mohamed Fayed, whose son Dodi Fayed was involved romantically with Diana and was also killed in the crash, claimed that Prince Philip ordered Diana's death. "There have been extensive investigations concerning the death of Diana, and those allegations of foul play have never been substantiated," says Harris.
7. His love story with the Queen is real.
Although Prince Philip has allegedly strayed from his marriage throughout the years, it seems the rumors are unfounded. "Prince Philip can be flirtatious, but all the women have denied affairs," Harris points out. The royal duo, who celebrates their 70th anniversary in November, are believed to still take afternoon tea together every day. As Prince Philip said nearly 20 years ago during a toast to his wife at their Golden Wedding Anniversary, "I think the main lesson we have learnt is that tolerance is the one essential ingredient in any happy marriage... You can take it from me, the Queen has the quality of tolerance in abundance."
Queen Elizabeth and Prince Philip Released a Touching New Portrait to Celebrate Their Birthdays
The Queen Was Warned Not to Marry Prince Philip
The Crown's Stars on Portraying Royalty
More From Royal Family News
40 Times Celebrities Copied Royal Style
William Proud of Grandparents for Getting Vaccine
Meghan Markle's Father Share's Thoughts on Letter
Meghan's Plea for Peace Revealed in Court
Meghan and Harry Donated Lunches to Mark MLK Day
Inside Wallis Simpson's Scandalous Divorce Hearing
Meet the Royal Family's Pets
What's Next for the Royal Family in 2021
Princess Diana's Top 10 Maternity Style Moments
Royal Family News
Remembering Queen Elizabeth and Prince Philip's Wedding Day
Paul Bettany Is No Longer Playing Prince Philip in The Crown Season Three
How the Royal Family Looked Throughout the 20th Century
Who is Prince Philip's Daughter, Princess Anne?
Prince Philip's Role in 'The Crown' Season 3 Will Get Bigger
Who Is Prince Philip's Uncle, Lord Mountbatten?


text:
Newfoundland Growlers may be practising winning ways, but they're not ...
Social media is not a replacement for calling the police, Berwick authorities stress
Sam Macdonald (sam.macdonald@kingscountynews.ca)
Published: Oct 18, 2019 at 4:17 p.m.
Updated: Oct 18, 2019 at 9:25 p.m.
Berwick is not the only community that sees an uptick in property-related crime in warmer months, town officials and police advise. -FILE PHOTO
BERWICK, N.S. —
With a recent break, enter and theft in Berwick, residents maybe be tempted to express their frustration online on social media.
Town of Berwick chief administrative Mike Payne says doing so won't lead to justice.
With break-ins happening in August and this month, Payne is aware residents are frustrated, and expressing their displeasure online.
The latest of these crimes occurred Oct. 8, when a man broke into a pet food store on South Street.
Information from the RCMP describes video surveillance of a male entering the store, looking around the front counter, eventually taking a donation jar and leaving the store.
Payne, the former first RCMP detachment commander for Berwick, noted that police can't investigate something they don't know about.
He recommends turning to police, rather than social media.
Const. Jeff Wilson, a public information officer with the Kings District RCMP, had sentiments for Berwick residents and anyone dealing with potential crime in their community.
"It comes down to taking ownership of property and belongings and ownership of the community in which you live," Wilson said. "Keep vehicles, households and businesses locked up and as secure as you can."
Wilson said if anyone sees anything concerning or suspicious, the police should be informed as soon as possible.
"Don't wait an extended period of time, so we can get resources and members to investigate as quickly as we can," Wilson said.
Payne said that despite recent events, Berwick is a safe community with an effective and efficient police force.
"There's a strong sense of community here, with neighbours looking out for each other when it comes to community safety," Payne said. "We all have a role to play in that."
While venting about something on social media may be cathartic, Payne said it won't accomplish much when it comes to thwarting crime in the community.
One of the most effective ways to avoid being a victim of property crime is to secure vehicles, and property – particularly outbuildings.
Most property-related crime occurs at night, Berwick CAO Mike Payne advised. The key is to not give potential criminals an opportunity with unsecured property.
Payne admits there's been a recent uptick in the number of property-related crimes in Berwick since the summer, but he notes that this pattern is observable throughout the Valley.
Wilson said the longer days and warmer weather "can create a climate for people to stay out longer and take advantage of the warmer temperatures."
Payne stressed that property crime is "cyclical," and coincides with the time of year.
"In the summertime and in the fall, more people are out and about. In the wintertime, there's less of that," Payne said. "And with break and enters, there's a certain element that are mostly responsible for those," Payne said. "As police get to the bottom of those and those individuals serve a period of custody, you have fewer break and enters while they're away."
Sam.macdonald@kingscountynews.ca
Newfoundland Growlers may be practising winning ways, but they're not practising

redpajama_set_name: RedPajamaCommonCrawl


text:
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

defined('MOODLE_INTERNAL') || die();

class enrol_ldap_plugin extends enrol_plugin {
    protected $enrol_localcoursefield = 'idnumber';
    protected $enroltype = 'enrol_ldap';
    protected $errorlogtag = '[ENROL LDAP] ';

    /**
     * Constructor for the plugin. In addition to calling the parent
     * constructor, we define and 'fix' some settings depending on the
     * real settings the admin defined.
     */
    public function __construct() {
        global $CFG;
        require_once($CFG->libdir.'/ldaplib.php');

        // Do our own stuff to fix the config (it's easier to do it
        // here than using the admin settings infrastructure). We
        // don't call $this->set_config() for any of the 'fixups'
        // (except the objectclass, as it's critical) because the user
        // didn't specify any values and relied on the default values
        // defined for the user type she chose.
        $this->load_config();

        // Make sure we get sane defaults for critical values.
        $this->config->ldapencoding = $this->get_config('ldapencoding', 'utf-8');
        $this->config->user_type = $this->get_config('user_type', 'default');

        $ldap_usertypes = ldap_supported_usertypes();
        $this->config->user_type_name = $ldap_usertypes[$this->config->user_type];
        unset($ldap_usertypes);

        $default = ldap_getdefaults();
        // Remove the objectclass default, as the values specified there are for
        // users, and we are dealing with groups here.
        unset($default['objectclass']);

        // Use defaults if values not given. Dont use this->get_config()
        // here to be able to check for 0 and false values too.
        foreach ($default as $key => $value) {
            // Watch out - 0, false are correct values too, so we can't use $this->get_config()
            if (!isset($this->config->{$key}) or $this->config->{$key} == '') {
                $this->config->{$key} = $value[$this->config->user_type];
            }
        }

        if (empty($this->config->objectclass)) {
            // Can't send empty filter. Fix it for now and future occasions
            $this->set_config('objectclass', '(objectClass=*)');
        } else if (stripos($this->config->objectclass, 'objectClass=') === 0) {
            // Value is 'objectClass=some-string-here', so just add ()
            // around the value (filter _must_ have them).
            // Fix it for now and future occasions
            $this->set_config('objectclass', '('.$this->config->objectclass.')');
        } else if (stripos($this->config->objectclass, '(') !== 0) {
            // Value is 'some-string-not-starting-with-left-parentheses',
            // which is assumed to be the objectClass matching value.
            // So build a valid filter with it.
            $this->set_config('objectclass', '(objectClass='.$this->config->objectclass.')');
        } else {
            // There is an additional possible value
            // '(some-string-here)', that can be used to specify any
            // valid filter string, to select subsets of users based
            // on any criteria. For example, we could select the users
            // whose objectClass is 'user' and have the
            // 'enabledMoodleUser' attribute, with something like:
            //
            //   (&(objectClass=user)(enabledMoodleUser=1))
            //
            // In this particular case we don't need to do anything,
            // so leave $this->config->objectclass as is.
        }
    }

    /**
     * Is it possible to delete enrol instance via standard UI?
     *
     * @param object $instance
     * @return bool
     */
    public function can_delete_instance($instance) {
        $context = context_course::instance($instance->courseid);
        if (!has_capability('enrol/ldap:manage', $context)) {
            return false;
        }

        if (!enrol_is_enabled('ldap')) {
            return true;
        }

        if (!$this->get_config('ldap_host') or !$this->get_config('objectclass') or !$this->get_config('course_idnumber')) {
            return true;
        }

        // TODO: connect to external system and make sure no users are to be enrolled in this course
        return false;
    }

    /**
     * Is it possible to hide/show enrol instance via standard UI?
     *
     * @param stdClass $instance
     * @return bool
     */
    public function can_hide_show_instance($instance) {
        $context = context_course::instance($instance->courseid);
        return has_capability('enrol/ldap:config', $context);
    }

    /**
     * Forces synchronisation of user enrolments with LDAP server.
     * It creates courses if the plugin is configured to do so.
     *
     * @param object $user user record
     * @return void
     */
    public function sync_user_enrolments($user) {
        global $DB;

        // Do not try to print anything to the output because this method is called during interactive login.
        if (PHPUNIT_TEST) {
            $trace = new null_progress_trace();
        } else {
            $trace = new error_log_progress_trace($this->errorlogtag);
        }

        if (!$this->ldap_connect($trace)) {
            $trace->finished();
            return;
        }

        if (!is_object($user) or !property_exists($user, 'id')) {
            throw new coding_exception('Invalid $user parameter in sync_user_enrolments()');
        }

        if (!property_exists($user, 'idnumber')) {
            debugging('Invalid $user parameter in sync_user_enrolments(), missing idnumber');
            $user = $DB->get_record('user', array('id'=>$user->id));
        }

        // We may need a lot of memory here
        core_php_time_limit::raise();
        raise_memory_limit(MEMORY_HUGE);

        // Get enrolments for each type of role.
        $roles = get_all_roles();
        $enrolments = array();
        foreach($roles as $role) {
            // Get external enrolments according to LDAP server
            $enrolments[$role->id]['ext'] = $this->find_ext_enrolments($user->idnumber, $role);

            // Get the list of current user enrolments that come from LDAP
            $sql= "SELECT e.courseid, ue.status, e.id as enrolid, c.shortname
                     FROM {user} u
                     JOIN {role_assignments} ra ON (ra.userid = u.id AND ra.component = 'enrol_ldap' AND ra.roleid = :roleid)
                     JOIN {user_enrolments} ue ON (ue.userid = u.id AND ue.enrolid = ra.itemid)
                     JOIN {enrol} e ON (e.id = ue.enrolid)
                     JOIN {course} c ON (c.id = e.courseid)
                    WHERE u.deleted = 0 AND u.id = :userid";
            $params = array ('roleid'=>$role->id, 'userid'=>$user->id);
            $enrolments[$role->id]['current'] = $DB->get_records_sql($sql, $params);
        }

        $ignorehidden = $this->get_config('ignorehiddencourses');
        $courseidnumber = $this->get_config('course_idnumber');
        foreach($roles as $role) {
            foreach ($enrolments[$role->id]['ext'] as $enrol) {
                $course_ext_id = $enrol[$courseidnumber][0];
                if (empty($course_ext_id)) {
                    $trace->output(get_string('extcourseidinvalid', 'enrol_ldap'));
                    continue; // Next; skip this one!
                }

                // Create the course if required
                $course = $DB->get_record('course', array($this->enrol_localcoursefield=>$course_ext_id));
                if (empty($course)) { // Course doesn't exist
                    if ($this->get_config('autocreate')) { // Autocreate
                        $trace->output(get_string('createcourseextid', 'enrol_ldap', array('courseextid'=>$course_ext_id)));
                        if (!$newcourseid = $this->create_course($enrol, $trace)) {
                            continue;
                        }
                        $course = $DB->get_record('course', array('id'=>$newcourseid));
                    } else {
                        $trace->output(get_string('createnotcourseextid', 'enrol_ldap', array('courseextid'=>$course_ext_id)));
                        continue; // Next; skip this one!
                    }
                }

                // Deal with enrolment in the moodle db
                // Add necessary enrol instance if not present yet;
                $sql = "SELECT c.id, c.visible, e.id as enrolid
                          FROM {course} c
                          JOIN {enrol} e ON (e.courseid = c.id AND e.enrol = 'ldap')
                         WHERE c.id = :courseid";
                $params = array('courseid'=>$course->id);
                if (!($course_instance = $DB->get_record_sql($sql, $params, IGNORE_MULTIPLE))) {
                    $course_instance = new stdClass();
                    $course_instance->id = $course->id;
                    $course_instance->visible = $course->visible;
                    $course_instance->enrolid = $this->add_instance($course_instance);
                }

                if (!$instance = $DB->get_record('enrol', array('id'=>$course_instance->enrolid))) {
                    continue; // Weird; skip this one.
                }

                if ($ignorehidden && !$course_instance->visible) {
                    continue;
                }

                if (empty($enrolments[$role->id]['current'][$course->id])) {
                    // Enrol the user in the given course, with that role.
                    $this->enrol_user($instance, $user->id, $role->id);
                    // Make sure we set the enrolment status to active. If the user wasn't
                    // previously enrolled to the course, enrol_user() sets it. But if we
                    // configured the plugin to suspend the user enrolments _AND_ remove
                    // the role assignments on external unenrol, then enrol_user() doesn't
                    // set it back to active on external re-enrolment. So set it
                    // unconditionnally to cover both cases.
                    $DB->set_field('user_enrolments', 'status', ENROL_USER_ACTIVE, array('enrolid'=>$instance->id, 'userid'=>$user->id));
                    $trace->output(get_string('enroluser', 'enrol_ldap',
                        array('user_username'=> $user->username,
                              'course_shortname'=>$course->shortname,
                              'course_id'=>$course->id)));
                } else {
                    if ($enrolments[$role->id]['current'][$course->id]->status == ENROL_USER_SUSPENDED) {
                        // Reenable enrolment that was previously disabled. Enrolment refreshed
                        $DB->set_field('user_enrolments', 'status', ENROL_USER_ACTIVE, array('enrolid'=>$instance->id, 'userid'=>$user->id));
                        $trace->output(get_string('enroluserenable', 'enrol_ldap',
                            array('user_username'=> $user->username,
                                  'course_shortname'=>$course->shortname,
                                  'course_id'=>$course->id)));
                    }
                }

                // Remove this course from the current courses, to be able to detect
                // which current courses should be unenroled from when we finish processing
                // external enrolments.
                unset($enrolments[$role->id]['current'][$course->id]);
            }

            // Deal with unenrolments.
            $transaction = $DB->start_delegated_transaction();
            foreach ($enrolments[$role->id]['current'] as $course) {
                $context = context_course::instance($course->courseid);
                $instance = $DB->get_record('enrol', array('id'=>$course->enrolid));
                switch ($this->get_config('unenrolaction')) {
                    case ENROL_EXT_REMOVED_UNENROL:
                        $this->unenrol_user($instance, $user->id);
                        $trace->output(get_string('extremovedunenrol', 'enrol_ldap',
                            array('user_username'=> $user->username,
                                  'course_shortname'=>$course->shortname,
                                  'course_id'=>$course->courseid)));
                        break;
                    case ENROL_EXT_REMOVED_KEEP:
                        // Keep - only adding enrolments
                        break;
                    case ENROL_EXT_REMOVED_SUSPEND:
                        if ($course->status != ENROL_USER_SUSPENDED) {
                            $DB->set_field('user_enrolments', 'status', ENROL_USER_SUSPENDED, array('enrolid'=>$instance->id, 'userid'=>$user->id));
                            $trace->output(get_string('extremovedsuspend', 'enrol_ldap',
                                array('user_username'=> $user->username,
                                      'course_shortname'=>$course->shortname,
                                      'course_id'=>$course->courseid)));
                        }
                        break;
                    case ENROL_EXT_REMOVED_SUSPENDNOROLES:
                        if ($course->status != ENROL_USER_SUSPENDED) {
                            $DB->set_field('user_enrolments', 'status', ENROL_USER_SUSPENDED, array('enrolid'=>$instance->id, 'userid'=>$user->id));
                        }
                        role_unassign_all(array('contextid'=>$context->id, 'userid'=>$user->id, 'component'=>'enrol_ldap', 'itemid'=>$instance->id));
                        $trace->output(get_string('extremovedsuspendnoroles', 'enrol_ldap',
                            array('user_username'=> $user->username,
                                  'course_shortname'=>$course->shortname,
                                  'course_id'=>$course->courseid)));
                        break;
                }
            }
            $transaction->allow_commit();
        }

        $this->ldap_close();

        $trace->finished();
    }

    /**
     * Forces synchronisation of all enrolments with LDAP server.
     * It creates courses if the plugin is configured to do so.
     *
     * @param progress_trace $trace
     * @param int|null $onecourse limit sync to one course->id, null if all courses
     * @return void
     */
    public function sync_enrolments(progress_trace $trace, $onecourse = null) {
        global $CFG, $DB;

        if (!$this->ldap_connect($trace)) {
            $trace->finished();
            return;
        }

        $ldap_pagedresults = ldap_paged_results_supported($this->get_config('ldap_version'));

        // we may need a lot of memory here
        core_php_time_limit::raise();
        raise_memory_limit(MEMORY_HUGE);

        $oneidnumber = null;
        if ($onecourse) {
            if (!$course = $DB->get_record('course', array('id'=>$onecourse), 'id,'.$this->enrol_localcoursefield)) {
                // Course does not exist, nothing to do.
                $trace->output("Requested course $onecourse does not exist, no sync performed.");
                $trace->finished();
                return;
            }
            if (empty($course->{$this->enrol_localcoursefield})) {
                $trace->output("Requested course $onecourse does not have {$this->enrol_localcoursefield}, no sync performed.");
                $trace->finished();
                return;
            }
            $oneidnumber = ldap_filter_addslashes(core_text::convert($course->idnumber, 'utf-8', $this->get_config('ldapencoding')));
        }

        // Get enrolments for each type of role.
        $roles = get_all_roles();
        $enrolments = array();
        foreach($roles as $role) {
            // Get all contexts
            $ldap_contexts = explode(';', $this->config->{'contexts_role'.$role->id});

            // Get all the fields we will want for the potential course creation
            // as they are light. Don't get membership -- potentially a lot of data.
            $ldap_fields_wanted = array('dn', $this->config->course_idnumber);
            if (!empty($this->config->course_fullname)) {
                array_push($ldap_fields_wanted, $this->config->course_fullname);
            }
            if (!empty($this->config->course_shortname)) {
                array_push($ldap_fields_wanted, $this->config->course_shortname);
            }
            if (!empty($this->config->course_summary)) {
                array_push($ldap_fields_wanted, $this->config->course_summary);
            }
            array_push($ldap_fields_wanted, $this->config->{'memberattribute_role'.$role->id});

            // Define the search pattern
            $ldap_search_pattern = $this->config->objectclass;

            if ($oneidnumber !== null) {
                $ldap_search_pattern = "(&$ldap_search_pattern({$this->config->course_idnumber}=$oneidnumber))";
            }

            $ldap_cookie = '';
            foreach ($ldap_contexts as $ldap_context) {
                $ldap_context = trim($ldap_context);
                if (empty($ldap_context)) {
                    continue; // Next;
                }

                $flat_records = array();
                do {
                    if ($ldap_pagedresults) {
                        ldap_control_paged_result($this->ldapconnection, $this->config->pagesize, true, $ldap_cookie);
                    }

                    if ($this->config->course_search_sub) {
                        // Use ldap_search to find first user from subtree
                        $ldap_result = @ldap_search($this->ldapconnection,
                                                    $ldap_context,
                                                    $ldap_search_pattern,
                                                    $ldap_fields_wanted);
                    } else {
                        // Search only in this context
                        $ldap_result = @ldap_list($this->ldapconnection,
                                                  $ldap_context,
                                                  $ldap_search_pattern,
                                                  $ldap_fields_wanted);
                    }
                    if (!$ldap_result) {
                        continue; // Next
                    }

                    if ($ldap_pagedresults) {
                        ldap_control_paged_result_response($this->ldapconnection, $ldap_result, $ldap_cookie);
                    }

                    // Check and push results
                    $records = ldap_get_entries($this->ldapconnection, $ldap_result);

                    // LDAP libraries return an odd array, really. fix it:
                    for ($c = 0; $c < $records['count']; $c++) {
                        array_push($flat_records, $records[$c]);
                    }
                    // Free some mem
                    unset($records);
                } while ($ldap_pagedresults && !empty($ldap_cookie));

                // If LDAP paged results were used, the current connection must be completely
                // closed and a new one created, to work without paged results from here on.
                if ($ldap_pagedresults) {
                    $this->ldap_close();
                    $this->ldap_connect($trace);
                }

                if (count($flat_records)) {
                    $ignorehidden = $this->get_config('ignorehiddencourses');
                    foreach($flat_records as $course) {
                        $course = array_change_key_case($course, CASE_LOWER);
                        $idnumber = $course{$this->config->course_idnumber}[0];
                        $trace->output(get_string('synccourserole', 'enrol_ldap', array('idnumber'=>$idnumber, 'role_shortname'=>$role->shortname)));

                        // Does the course exist in moodle already?
                        $course_obj = $DB->get_record('course', array($this->enrol_localcoursefield=>$idnumber));
                        if (empty($course_obj)) { // Course doesn't exist
                            if ($this->get_config('autocreate')) { // Autocreate
                                $trace->output(get_string('createcourseextid', 'enrol_ldap', array('courseextid'=>$idnumber)));
                                if (!$newcourseid = $this->create_course($course, $trace)) {
                                    continue;
                                }
                                $course_obj = $DB->get_record('course', array('id'=>$newcourseid));
                            } else {
                                $trace->output(get_string('createnotcourseextid', 'enrol_ldap', array('courseextid'=>$idnumber)));
                                continue; // Next; skip this one!
                            }
                        } else {  // Check if course needs update & update as needed.
                            $this->update_course($course_obj, $course, $trace);
                        }

                        // Enrol & unenrol

                        // Pull the ldap membership into a nice array
                        // this is an odd array -- mix of hash and array --
                        $ldapmembers = array();

                        if (array_key_exists('memberattribute_role'.$role->id, $this->config)
                            && !empty($this->config->{'memberattribute_role'.$role->id})
                            && !empty($course[$this->config->{'memberattribute_role'.$role->id}])) { // May have no membership!

                            $ldapmembers = $course[$this->config->{'memberattribute_role'.$role->id}];
                            unset($ldapmembers['count']); // Remove oddity ;)

                            // If we have enabled nested groups, we need to expand
                            // the groups to get the real user list. We need to do
                            // this before dealing with 'memberattribute_isdn'.
                            if ($this->config->nested_groups) {
                                $users = array();
                                foreach ($ldapmembers as $ldapmember) {
                                    $grpusers = $this->ldap_explode_group($ldapmember,
                                                                          $this->config->{'memberattribute_role'.$role->id});

                                    $users = array_merge($users, $grpusers);
                                }
                                $ldapmembers = array_unique($users); // There might be duplicates.
                            }

                            // Deal with the case where the member attribute holds distinguished names,
                            // but only if the user attribute is not a distinguished name itself.
                            if ($this->config->memberattribute_isdn
                                && ($this->config->idnumber_attribute !== 'dn')
                                && ($this->config->idnumber_attribute !== 'distinguishedname')) {
                                // We need to retrieve the idnumber for all the users in $ldapmembers,
                                // as the idnumber does not match their dn and we get dn's from membership.
                                $memberidnumbers = array();
                                foreach ($ldapmembers as $ldapmember) {
                                    $result = ldap_read($this->ldapconnection, $ldapmember, '(objectClass=*)',
                                                        array($this->config->idnumber_attribute));
                                    $entry = ldap_first_entry($this->ldapconnection, $result);
                                    $values = ldap_get_values($this->ldapconnection, $entry, $this->config->idnumber_attribute);
                                    array_push($memberidnumbers, $values[0]);
                                }

                                $ldapmembers = $memberidnumbers;
                            }
                        }

                        // Prune old ldap enrolments
                        // hopefully they'll fit in the max buffer size for the RDBMS
                        $sql= "SELECT u.id as userid, u.username, ue.status,
                                      ra.contextid, ra.itemid as instanceid
                                 FROM {user} u
                                 JOIN {role_assignments} ra ON (ra.userid = u.id AND ra.component = 'enrol_ldap' AND ra.roleid = :roleid)
                                 JOIN {user_enrolments} ue ON (ue.userid = u.id AND ue.enrolid = ra.itemid)
                                 JOIN {enrol} e ON (e.id = ue.enrolid)
                                WHERE u.deleted = 0 AND e.courseid = :courseid ";
                        $params = array('roleid'=>$role->id, 'courseid'=>$course_obj->id);
                        $context = context_course::instance($course_obj->id);
                        if (!empty($ldapmembers)) {
                            list($ldapml, $params2) = $DB->get_in_or_equal($ldapmembers, SQL_PARAMS_NAMED, 'm', false);
                            $sql .= "AND u.idnumber $ldapml";
                            $params = array_merge($params, $params2);
                            unset($params2);
                        } else {
                            $shortname = format_string($course_obj->shortname, true, array('context' => $context));
                            $trace->output(get_string('emptyenrolment', 'enrol_ldap',
                                         array('role_shortname'=> $role->shortname,
                                               'course_shortname' => $shortname)));
                        }
                        $todelete = $DB->get_records_sql($sql, $params);

                        if (!empty($todelete)) {
                            $transaction = $DB->start_delegated_transaction();
                            foreach ($todelete as $row) {
                                $instance = $DB->get_record('enrol', array('id'=>$row->instanceid));
                                switch ($this->get_config('unenrolaction')) {
                                case ENROL_EXT_REMOVED_UNENROL:
                                    $this->unenrol_user($instance, $row->userid);
                                    $trace->output(get_string('extremovedunenrol', 'enrol_ldap',
                                        array('user_username'=> $row->username,
                                              'course_shortname'=>$course_obj->shortname,
                                              'course_id'=>$course_obj->id)));
                                    break;
                                case ENROL_EXT_REMOVED_KEEP:
                                    // Keep - only adding enrolments
                                    break;
                                case ENROL_EXT_REMOVED_SUSPEND:
                                    if ($row->status != ENROL_USER_SUSPENDED) {
                                        $DB->set_field('user_enrolments', 'status', ENROL_USER_SUSPENDED, array('enrolid'=>$instance->id, 'userid'=>$row->userid));
                                        $trace->output(get_string('extremovedsuspend', 'enrol_ldap',
                                            array('user_username'=> $row->username,
                                                  'course_shortname'=>$course_obj->shortname,
                                                  'course_id'=>$course_obj->id)));
                                    }
                                    break;
                                case ENROL_EXT_REMOVED_SUSPENDNOROLES:
                                    if ($row->status != ENROL_USER_SUSPENDED) {
                                        $DB->set_field('user_enrolments', 'status', ENROL_USER_SUSPENDED, array('enrolid'=>$instance->id, 'userid'=>$row->userid));
                                    }
                                    role_unassign_all(array('contextid'=>$row->contextid, 'userid'=>$row->userid, 'component'=>'enrol_ldap', 'itemid'=>$instance->id));
                                    $trace->output(get_string('extremovedsuspendnoroles', 'enrol_ldap',
                                        array('user_username'=> $row->username,
                                              'course_shortname'=>$course_obj->shortname,
                                              'course_id'=>$course_obj->id)));
                                    break;
                                }
                            }
                            $transaction->allow_commit();
                        }

                        // Insert current enrolments
                        // bad we can't do INSERT IGNORE with postgres...

                        // Add necessary enrol instance if not present yet;
                        $sql = "SELECT c.id, c.visible, e.id as enrolid
                                  FROM {course} c
                                  JOIN {enrol} e ON (e.courseid = c.id AND e.enrol = 'ldap')
                                 WHERE c.id = :courseid";
                        $params = array('courseid'=>$course_obj->id);
                        if (!($course_instance = $DB->get_record_sql($sql, $params, IGNORE_MULTIPLE))) {
                            $course_instance = new stdClass();
                            $course_instance->id = $course_obj->id;
                            $course_instance->visible = $course_obj->visible;
                            $course_instance->enrolid = $this->add_instance($course_instance);
                        }

                        if (!$instance = $DB->get_record('enrol', array('id'=>$course_instance->enrolid))) {
                            continue; // Weird; skip this one.
                        }

                        if ($ignorehidden && !$course_instance->visible) {
                            continue;
                        }

                        $transaction = $DB->start_delegated_transaction();
                        foreach ($ldapmembers as $ldapmember) {
                            $sql = 'SELECT id,username,1 FROM {user} WHERE idnumber = ? AND deleted = 0';
                            $member = $DB->get_record_sql($sql, array($ldapmember));
                            if(empty($member) || empty($member->id)){
                                $trace->output(get_string('couldnotfinduser', 'enrol_ldap', $ldapmember));
                                continue;
                            }

                            $sql= "SELECT ue.status
                                     FROM {user_enrolments} ue
                                     JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = 'ldap')
                                    WHERE e.courseid = :courseid AND ue.userid = :userid";
                            $params = array('courseid'=>$course_obj->id, 'userid'=>$member->id);
                            $userenrolment = $DB->get_record_sql($sql, $params, IGNORE_MULTIPLE);

                            if (empty($userenrolment)) {
                                $this->enrol_user($instance, $member->id, $role->id);
                                // Make sure we set the enrolment status to active. If the user wasn't
                                // previously enrolled to the course, enrol_user() sets it. But if we
                                // configured the plugin to suspend the user enrolments _AND_ remove
                                // the role assignments on external unenrol, then enrol_user() doesn't
                                // set it back to active on external re-enrolment. So set it
                                // unconditionally to cover both cases.
                                $DB->set_field('user_enrolments', 'status', ENROL_USER_ACTIVE, array('enrolid'=>$instance->id, 'userid'=>$member->id));
                                $trace->output(get_string('enroluser', 'enrol_ldap',
                                    array('user_username'=> $member->username,
                                          'course_shortname'=>$course_obj->shortname,
                                          'course_id'=>$course_obj->id)));

                            } else {
                                if (!$DB->record_exists('role_assignments', array('roleid'=>$role->id, 'userid'=>$member->id, 'contextid'=>$context->id, 'component'=>'enrol_ldap', 'itemid'=>$instance->id))) {
                                    // This happens when reviving users or when user has multiple roles in one course.
                                    $context = context_course::instance($course_obj->id);
                                    role_assign($role->id, $member->id, $context->id, 'enrol_ldap', $instance->id);
                                    $trace->output("Assign role to user '$member->username' in course '$course_obj->shortname ($course_obj->id)'");
                                }
                                if ($userenrolment->status == ENROL_USER_SUSPENDED) {
                                    // Reenable enrolment that was previously disabled. Enrolment refreshed
                                    $DB->set_field('user_enrolments', 'status', ENROL_USER_ACTIVE, array('enrolid'=>$instance->id, 'userid'=>$member->id));
                                    $trace->output(get_string('enroluserenable', 'enrol_ldap',
                                        array('user_username'=> $member->username,
                                              'course_shortname'=>$course_obj->shortname,
                                              'course_id'=>$course_obj->id)));
                                }
                            }
                        }
                        $transaction->allow_commit();
                    }
                }
            }
        }
        @$this->ldap_close();
        $trace->finished();
    }

    /**
     * Connect to the LDAP server, using the plugin configured
     * settings. It's actually a wrapper around ldap_connect_moodle()
     *
     * @param progress_trace $trace
     * @return bool success
     */
    protected function ldap_connect(progress_trace $trace = null) {
        global $CFG;
        require_once($CFG->libdir.'/ldaplib.php');

        if (isset($this->ldapconnection)) {
            return true;
        }

        if ($ldapconnection = ldap_connect_moodle($this->get_config('host_url'), $this->get_config('ldap_version'),
                                                  $this->get_config('user_type'), $this->get_config('bind_dn'),
                                                  $this->get_config('bind_pw'), $this->get_config('opt_deref'),
                                                  $debuginfo, $this->get_config('start_tls'))) {
            $this->ldapconnection = $ldapconnection;
            return true;
        }

        if ($trace) {
            $trace->output($debuginfo);
        } else {
            error_log($this->errorlogtag.$debuginfo);
        }

        return false;
    }

    /**
     * Disconnects from a LDAP server
     *
     */
    protected function ldap_close() {
        if (isset($this->ldapconnection)) {
            @ldap_close($this->ldapconnection);
            $this->ldapconnection = null;
        }
        return;
    }

    /**
     * Return multidimensional array with details of user courses (at
     * least dn and idnumber).
     *
     * @param string $memberuid user idnumber (without magic quotes).
     * @param object role is a record from the mdl_role table.
     * @return array
     */
    protected function find_ext_enrolments($memberuid, $role) {
        global $CFG;
        require_once($CFG->libdir.'/ldaplib.php');

        if (empty($memberuid)) {
            // No "idnumber" stored for this user, so no LDAP enrolments
            return array();
        }

        $ldap_contexts = trim($this->get_config('contexts_role'.$role->id));
        if (empty($ldap_contexts)) {
            // No role contexts, so no LDAP enrolments
            return array();
        }

        $extmemberuid = core_text::convert($memberuid, 'utf-8', $this->get_config('ldapencoding'));

        if($this->get_config('memberattribute_isdn')) {
            if (!($extmemberuid = $this->ldap_find_userdn($extmemberuid))) {
                return array();
            }
        }

        $ldap_search_pattern = '';
        if($this->get_config('nested_groups')) {
            $usergroups = $this->ldap_find_user_groups($extmemberuid);
            if(count($usergroups) > 0) {
                foreach ($usergroups as $group) {
                    $group = ldap_filter_addslashes($group);
                    $ldap_search_pattern .= '('.$this->get_config('memberattribute_role'.$role->id).'='.$group.')';
                }
            }
        }

        // Default return value
        $courses = array();

        // Get all the fields we will want for the potential course creation
        // as they are light. don't get membership -- potentially a lot of data.
        $ldap_fields_wanted = array('dn', $this->get_config('course_idnumber'));
        $fullname  = $this->get_config('course_fullname');
        $shortname = $this->get_config('course_shortname');
        $summary   = $this->get_config('course_summary');
        if (isset($fullname)) {
            array_push($ldap_fields_wanted, $fullname);
        }
        if (isset($shortname)) {
            array_push($ldap_fields_wanted, $shortname);
        }
        if (isset($summary)) {
            array_push($ldap_fields_wanted, $summary);
        }

        // Define the search pattern
        if (empty($ldap_search_pattern)) {
            $ldap_search_pattern = '('.$this->get_config('memberattribute_role'.$role->id).'='.ldap_filter_addslashes($extmemberuid).')';
        } else {
            $ldap_search_pattern = '(|' . $ldap_search_pattern .
                                       '('.$this->get_config('memberattribute_role'.$role->id).'='.ldap_filter_addslashes($extmemberuid).')' .
                                   ')';
        }
        $ldap_search_pattern='(&'.$this->get_config('objectclass').$ldap_search_pattern.')';

        // Get all contexts and look for first matching user
        $ldap_contexts = explode(';', $ldap_contexts);
        $ldap_pagedresults = ldap_paged_results_supported($this->get_config('ldap_version'));
        foreach ($ldap_contexts as $context) {
            $context = trim($context);
            if (empty($context)) {
                continue;
            }

            $ldap_cookie = '';
            $flat_records = array();
            do {
                if ($ldap_pagedresults) {
                    ldap_control_paged_result($this->ldapconnection, $this->config->pagesize, true, $ldap_cookie);
                }

                if ($this->get_config('course_search_sub')) {
                    // Use ldap_search to find first user from subtree
                    $ldap_result = @ldap_search($this->ldapconnection,
                                                $context,
                                                $ldap_search_pattern,
                                                $ldap_fields_wanted);
                } else {
                    // Search only in this context
                    $ldap_result = @ldap_list($this->ldapconnection,
                                              $context,
                                              $ldap_search_pattern,
                                              $ldap_fields_wanted);
                }

                if (!$ldap_result) {
                    continue;
                }

                if ($ldap_pagedresults) {
                    ldap_control_paged_result_response($this->ldapconnection, $ldap_result, $ldap_cookie);
                }

                // Check and push results. ldap_get_entries() already
                // lowercases the attribute index, so there's no need to
                // use array_change_key_case() later.
                $records = ldap_get_entries($this->ldapconnection, $ldap_result);

                // LDAP libraries return an odd array, really. Fix it.
                for ($c = 0; $c < $records['count']; $c++) {
                    array_push($flat_records, $records[$c]);
                }
                // Free some mem
                unset($records);
            } while ($ldap_pagedresults && !empty($ldap_cookie));

            // If LDAP paged results were used, the current connection must be completely
            // closed and a new one created, to work without paged results from here on.
            if ($ldap_pagedresults) {
                $this->ldap_close();
                $this->ldap_connect();
            }

            if (count($flat_records)) {
                $courses = array_merge($courses, $flat_records);
            }
        }

        return $courses;
    }

    /**
     * Search specified contexts for the specified userid and return the
     * user dn like: cn=username,ou=suborg,o=org. It's actually a wrapper
     * around ldap_find_userdn().
     *
     * @param string $userid the userid to search for (in external LDAP encoding, no magic quotes).
     * @return mixed the user dn or false
     */
    protected function ldap_find_userdn($userid) {
        global $CFG;
        require_once($CFG->libdir.'/ldaplib.php');

        $ldap_contexts = explode(';', $this->get_config('user_contexts'));
        $ldap_defaults = ldap_getdefaults();

        return ldap_find_userdn($this->ldapconnection, $userid, $ldap_contexts,
                                '(objectClass='.$ldap_defaults['objectclass'][$this->get_config('user_type')].')',
                                $this->get_config('idnumber_attribute'), $this->get_config('user_search_sub'));
    }

    /**
     * Find the groups a given distinguished name belongs to, both directly
     * and indirectly via nested groups membership.
     *
     * @param string $memberdn distinguished name to search
     * @return array with member groups' distinguished names (can be emtpy)
     */
    protected function ldap_find_user_groups($memberdn) {
        $groups = array();

        $this->ldap_find_user_groups_recursively($memberdn, $groups);
        return $groups;
    }

    /**
     * Recursively process the groups the given member distinguished name
     * belongs to, adding them to the already processed groups array.
     *
     * @param string $memberdn distinguished name to search
     * @param array reference &$membergroups array with already found
     *                        groups, where we'll put the newly found
     *                        groups.
     */
    protected function ldap_find_user_groups_recursively($memberdn, &$membergroups) {
        $result = @ldap_read($this->ldapconnection, $memberdn, '(objectClass=*)', array($this->get_config('group_memberofattribute')));
        if (!$result) {
            return;
        }

        if ($entry = ldap_first_entry($this->ldapconnection, $result)) {
            do {
                $attributes = ldap_get_attributes($this->ldapconnection, $entry);
                for ($j = 0; $j < $attributes['count']; $j++) {
                    $groups = ldap_get_values_len($this->ldapconnection, $entry, $attributes[$j]);
                    foreach ($groups as $key => $group) {
                        if ($key === 'count') {  // Skip the entries count
                            continue;
                        }
                        if(!in_array($group, $membergroups)) {
                            // Only push and recurse if we haven't 'seen' this group before
                            // to prevent loops (MS Active Directory allows them!!).
                            array_push($membergroups, $group);
                            $this->ldap_find_user_groups_recursively($group, $membergroups);
                        }
                    }
                }
            }
            while ($entry = ldap_next_entry($this->ldapconnection, $entry));
        }
    }

    /**
     * Given a group name (either a RDN or a DN), get the list of users
     * belonging to that group. If the group has nested groups, expand all
     * the intermediate groups and return the full list of users that
     * directly or indirectly belong to the group.
     *
     * @param string $group the group name to search
     * @param string $memberattibute the attribute that holds the members of the group
     * @return array the list of users belonging to the group. If $group
     *         is not actually a group, returns array($group).
     */
    protected function ldap_explode_group($group, $memberattribute) {
        switch ($this->get_config('user_type')) {
            case 'ad':
                // $group is already the distinguished name to search.
                $dn = $group;

                $result = ldap_read($this->ldapconnection, $dn, '(objectClass=*)', array('objectClass'));
                $entry = ldap_first_entry($this->ldapconnection, $result);
                $objectclass = ldap_get_values($this->ldapconnection, $entry, 'objectClass');

                if (!in_array('group', $objectclass)) {
                    // Not a group, so return immediately.
                    return array($group);
                }

                $result = ldap_read($this->ldapconnection, $dn, '(objectClass=*)', array($memberattribute));
                $entry = ldap_first_entry($this->ldapconnection, $result);
                $members = @ldap_get_values($this->ldapconnection, $entry, $memberattribute); // Can be empty and throws a warning
                if ($members['count'] == 0) {
                    // There are no members in this group, return nothing.
                    return array();
                }
                unset($members['count']);

                $users = array();
                foreach ($members as $member) {
                    $group_members = $this->ldap_explode_group($member, $memberattribute);
                    $users = array_merge($users, $group_members);
                }

                return ($users);
                break;
            default:
                error_log($this->errorlogtag.get_string('explodegroupusertypenotsupported', 'enrol_ldap',
                                                        $this->get_config('user_type_name')));

                return array($group);
        }
    }

    /**
     * Will create the moodle course from the template
     * course_ext is an array as obtained from ldap -- flattened somewhat
     *
     * @param array $course_ext
     * @param progress_trace $trace
     * @return mixed false on error, id for the newly created course otherwise.
     */
    function create_course($course_ext, progress_trace $trace) {
        global $CFG, $DB;

        require_once("$CFG->dirroot/course/lib.php");

        // Override defaults with template course
        $template = false;
        if ($this->get_config('template')) {
            if ($template = $DB->get_record('course', array('shortname'=>$this->get_config('template')))) {
                $template = fullclone(course_get_format($template)->get_course());
                unset($template->id); // So we are clear to reinsert the record
                unset($template->fullname);
                unset($template->shortname);
                unset($template->idnumber);
            }
        }
        if (!$template) {
            $courseconfig = get_config('moodlecourse');
            $template = new stdClass();
            $template->summary        = '';
            $template->summaryformat  = FORMAT_HTML;
            $template->format         = $courseconfig->format;
            $template->newsitems      = $courseconfig->newsitems;
            $template->showgrades     = $courseconfig->showgrades;
            $template->showreports    = $courseconfig->showreports;
            $template->maxbytes       = $courseconfig->maxbytes;
            $template->groupmode      = $courseconfig->groupmode;
            $template->groupmodeforce = $courseconfig->groupmodeforce;
            $template->visible        = $courseconfig->visible;
            $template->lang           = $courseconfig->lang;
            $template->enablecompletion = $courseconfig->enablecompletion;
        }
        $course = $template;

        $course->category = $this->get_config('category');
        if (!$DB->record_exists('course_categories', array('id'=>$this->get_config('category')))) {
            $categories = $DB->get_records('course_categories', array(), 'sortorder', 'id', 0, 1);
            $first = reset($categories);
            $course->category = $first->id;
        }

        // Override with required ext data
        $course->idnumber  = $course_ext[$this->get_config('course_idnumber')][0];
        $course->fullname  = $course_ext[$this->get_config('course_fullname')][0];
        $course->shortname = $course_ext[$this->get_config('course_shortname')][0];
        if (empty($course->idnumber) || empty($course->fullname) || empty($course->shortname)) {
            // We are in trouble!
            $trace->output(get_string('cannotcreatecourse', 'enrol_ldap').' '.var_export($course, true));
            return false;
        }

        $summary = $this->get_config('course_summary');
        if (!isset($summary) || empty($course_ext[$summary][0])) {
            $course->summary = '';
        } else {
            $course->summary = $course_ext[$this->get_config('course_summary')][0];
        }

        // Check if the shortname already exists if it does - skip course creation.
        if ($DB->record_exists('course', array('shortname' => $course->shortname))) {
            $trace->output(get_string('duplicateshortname', 'enrol_ldap', $course));
            return false;
        }

        $newcourse = create_course($course);
        return $newcourse->id;
    }

    /**
     * Will update a moodle course with new values from LDAP
     * A field will be updated only if it is marked to be updated
     * on sync in plugin settings
     *
     * @param object $course
     * @param array $externalcourse
     * @param progress_trace $trace
     * @return bool
     */
    protected function update_course($course, $externalcourse, progress_trace $trace) {
        global $CFG, $DB;

        $coursefields = array ('shortname', 'fullname', 'summary');
        static $shouldupdate;

        // Initialize $shouldupdate variable. Set to true if one or more fields are marked for update.
        if (!isset($shouldupdate)) {
            $shouldupdate = false;
            foreach ($coursefields as $field) {
                $shouldupdate = $shouldupdate || $this->get_config('course_'.$field.'_updateonsync');
            }
        }

        // If we should not update return immediately.
        if (!$shouldupdate) {
            return false;
        }

        require_once("$CFG->dirroot/course/lib.php");
        $courseupdated = false;
        $updatedcourse = new stdClass();
        $updatedcourse->id = $course->id;

        // Update course fields if necessary.
        foreach ($coursefields as $field) {
            // If field is marked to be updated on sync && field data was changed update it.
            if ($this->get_config('course_'.$field.'_updateonsync')
                    && isset($externalcourse[$this->get_config('course_'.$field)][0])
                    && $course->{$field} != $externalcourse[$this->get_config('course_'.$field)][0]) {
                $updatedcourse->{$field} = $externalcourse[$this->get_config('course_'.$field)][0];
                $courseupdated = true;
            }
        }

        if (!$courseupdated) {
            $trace->output(get_string('courseupdateskipped', 'enrol_ldap', $course));
            return false;
        }

        // Do not allow empty fullname or shortname.
        if ((isset($updatedcourse->fullname) && empty($updatedcourse->fullname))
                || (isset($updatedcourse->shortname) && empty($updatedcourse->shortname))) {
            // We are in trouble!
            $trace->output(get_string('cannotupdatecourse', 'enrol_ldap', $course));
            return false;
        }

        // Check if the shortname already exists if it does - skip course updating.
        if (isset($updatedcourse->shortname)
                && $DB->record_exists('course', array('shortname' => $updatedcourse->shortname))) {
            $trace->output(get_string('cannotupdatecourse_duplicateshortname', 'enrol_ldap', $course));
            return false;
        }

        // Finally - update course in DB.
        update_course($updatedcourse);
        $trace->output(get_string('courseupdated', 'enrol_ldap', $course));

        return true;
    }

    /**
     * Automatic enrol sync executed during restore.
     * Useful for automatic sync by course->idnumber or course category.
     * @param stdClass $course course record
     */
    public function restore_sync_course($course) {
        // TODO: this can not work because restore always nukes the course->idnumber, do not ask me why (MDL-37312)
        // NOTE: for now restore does not do any real logging yet, let's do the same here...
        $trace = new error_log_progress_trace();
        $this->sync_enrolments($trace, $course->id);
    }

    /**
     * Restore instance and map settings.
     *
     * @param restore_enrolments_structure_step $step
     * @param stdClass $data
     * @param stdClass $course
     * @param int $oldid
     */
    public function restore_instance(restore_enrolments_structure_step $step, stdClass $data, $course, $oldid) {
        global $DB;
        // There is only 1 ldap enrol instance per course.
        if ($instances = $DB->get_records('enrol', array('courseid'=>$data->courseid, 'enrol'=>'ldap'), 'id')) {
            $instance = reset($instances);
            $instanceid = $instance->id;
        } else {
            $instanceid = $this->add_instance($course, (array)$data);
        }
        $step->set_mapping('enrol', $oldid, $instanceid);
    }

    /**
     * Restore user enrolment.
     *
     * @param restore_enrolments_structure_step $step
     * @param stdClass $data
     * @param stdClass $instance
     * @param int $oldinstancestatus
     * @param int $userid
     */
    public function restore_user_enrolment(restore_enrolments_structure_step $step, $data, $instance, $userid, $oldinstancestatus) {
        global $DB;

        if ($this->get_config('unenrolaction') == ENROL_EXT_REMOVED_UNENROL) {
            // Enrolments were already synchronised in restore_instance(), we do not want any suspended leftovers.

        } else if ($this->get_config('unenrolaction') == ENROL_EXT_REMOVED_KEEP) {
            if (!$DB->record_exists('user_enrolments', array('enrolid'=>$instance->id, 'userid'=>$userid))) {
                $this->enrol_user($instance, $userid, null, 0, 0, $data->status);
            }

        } else {
            if (!$DB->record_exists('user_enrolments', array('enrolid'=>$instance->id, 'userid'=>$userid))) {
                $this->enrol_user($instance, $userid, null, 0, 0, ENROL_USER_SUSPENDED);
            }
        }
    }

    /**
     * Restore role assignment.
     *
     * @param stdClass $instance
     * @param int $roleid
     * @param int $userid
     * @param int $contextid
     */
    public function restore_role_assignment($instance, $roleid, $userid, $contextid) {
        global $DB;

        if ($this->get_config('unenrolaction') == ENROL_EXT_REMOVED_UNENROL or $this->get_config('unenrolaction') == ENROL_EXT_REMOVED_SUSPENDNOROLES) {
            // Skip any roles restore, they should be already synced automatically.
            return;
        }

        // Just restore every role.
        if ($DB->record_exists('user_enrolments', array('enrolid'=>$instance->id, 'userid'=>$userid))) {
            role_assign($roleid, $userid, $contextid, 'enrol_'.$instance->enrol, $instance->id);
        }
    }
}

redpajama_set_name: RedPajamaGithub


Brand new merchandise may be returned within 30 days of receipt. Contact WatchMaxx.com if you need more than 30 days – exceptions can be arranged at our discretion.
Merchandise must be returned in original, unused condition with all original tape, plastic protectors, and stickers intact and having never been removed. Watch must not be tampered with or opened in any way. Watches must be unworn with no sizing changes.
Pre-owned and Store-display marked merchandise may only be returned within 14 days of receipt.
All returned items, whether for refund, repair or exchange, must be clearly labeled with a return authorization number obtained by contacting WatchMaxx.com customer service. Parcels without a clearly visible valid return authorization number will be refused.
Goods must be returned via a traceable carrier, such as FedEx, United Parcel Service (UPS) or the United States Postal Service (USPS), with insurance and delivery to WatchMaxx.com prepaid by the purchaser. Parcels shipped collect will be refused. The customer is liable for loss or damage in transit.
Orders paid by Amazon Pay, PayPal, Affirm, wire transfer, check, and money order are not subject to restocking fees. In order to maintain the lowest prices possible, returns paid by Debit, Discover, MasterCard, and Visa credit cards are subject to a restocking fee equal to 3% of the total purchase price. Orders paid via American Express are subject to a 7% restocking fee. Items returned for exchange are entitled to a one-time-only exemption from these restocking fees. Cancellations are subject to the above rules.
Refund of the purchase price, less any restocking fee or shipping and handling fees mentioned above will be issued in the same form as payment received.
WatchMaxx.com policy is to attempt to contact the purchaser for 3 business days to resolve delivery problems or if delivery was refused. After 3 business days, such items will be regarded as returned and eligible for refund subject to the conditions above.
All items that are unclaimed will be disposed of after 6 months.
All exchange orders over $350 will ship for Free within the USA only. All exchange orders less than $350 are responsible for all shipping charges.
If the exchange is for a watch of lesser value the refund amount will be subject to a restocking fee as per the above policy.


Veterinary Assitant turned pet caregiver !Veterinary Assitant turned pet caregiver !Veterinary Assitant turned pet caregiver !Veterinary Assitant turned pet caregiver !
30 Year Old Pet Enthusiast.30 Year Old Pet Enthusiast.30 Year Old Pet Enthusiast.30 Year Old Pet Enthusiast.
Looking for a reliable pet sitter in Maple Ridge, British Columbia? Need a professional Maple Ridge dog sitter or cat sitter? Look no further. You've found the largest and easiest to use community of pet care providers in the Maple Ridge area.
PetSitter.com connects pet parents and their furry family members directly with the Maple Ridge area community of pet lovers, offering pet sitting, dog walking, pet grooming, boarding/kennel and other pet care services. So whether you have a cat, dog, fish, bird, reptile, horse, small mammal or exotic pet we make finding pet sitting in Maple Ridge, British Columbia faster & easier than ever.


text:
FTE est un sigle qui peut désigner :
 Full-time equivalent (en français, équivalent temps plein) ;
 Fédération des travailleurs de l'éducation, une des fédérations de la Confédération Nationale du Travail, un syndicat historique ;
 Formation au travail en équipage.

redpajama_set_name: RedPajamaWikipedia


text:
Q: What software can manage multiple PCs with software installation and updates? What software that can manage multiple PC with software for installation and updates at the same time? Thanks
PC Management software (Workstations)
Keeping up to date with updates?
Package managers for Windows
How to keep all your 3rd party Softwares always updated

A: windows server 2012 with a good admin and some additional software.
Also, your forgetting virus and backup solutions!  Unless you have those planned for.
edit:  Depending on the number of workstations you could use SBS11 (Small Business Server), another option.... would be to invest your money in your workstations and buy macs, some small businesses are moving to a mac platform, the servers OS is dirt cheap, easy to manage and requires less maintenance.  Also note that the machines are easy to replace and service and usually hold up well.  Where are you located?  Do you have a solid internet connection?

A: Fog server is the good option for installing OS and also take OS as image and push that image to another system via NIC(network integration card).and also manage that local system. Fog server is opensource application.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Azure API Management: Replace querystring parameter name New to APIM. Trying to change the exposed querystring parameter name (not the value) with a different name that the backend api expects
For example, APIM endpoint expects /v1/Customer?CustomerId=123
I think I need to use rewrite-url policy on the inbound section?
To change it to this: /v1/Customer?ExternalCustomerId=123

Was trying this, doesn't work
<set-query-parameter name="ExternalCustomerId" exists-action="append">
        <value>@(Context.Request.QueryString["CustomerId"])</value>
    </set-query-parameter>

Error: The name 'Context' does not exist in the current context

A: This has changed as of september 2019. now use the following:
<set-query-parameter name="ExternalCustomerId" exists-action="append">
    <value>@(context.Request.Url.Query.GetValueOrDefault("CustomerId"))</value>
</set-query-parameter>

A: Try lower case "context". Plus QueryString is a IReadOnlyDictionary as described here:  https://learn.microsoft.com/en-us/azure/api-management/api-management-policy-expressions#ContextVariables, but there is a handy overload:
<set-query-parameter name="ExternalCustomerId" exists-action="append">
    <value>@(context.Request.QueryString.GetValueOrDefault("CustomerId"))</value>
</set-query-parameter>


text:
Solo Scotland Expedition
By P And H Sea Kayaks
Alan has wanted to do this trip since school after reading about Nigel Dennis and Paul Caffin kayaking round the UK back in 1980. Loving the idea of the adventure they spoke of and the amazing places they passed he had an idea of kayaking out of the Clyde and back into the forth, this has grown into this trip.
Alan plans to kayak from the Solway Firth around the coast of Scotland taking in as many islands as possible and the Outer Hebrides, finishing in Eyemouth 3 months later. Alan paddles on behalf of three charities, The Erbs Palsy Group, The Children's Hand Surgery and The Brachial Plexus Injury Service after their support and help in giving his son Cameron the use of his arm after he was born with Erbs palsy injury to his left arm.
Leaving – Solway Firth – Mid April
Return – Eyemouth – Mid July
http://alanwilsonseakayaking.blogspot.com


text:
Q: Java GUI Toolbar I am developing a Java Desktop Application. In that I want some toolbars at the top of the JFrame (as in usual GUI appllications).
I want to allow user to add/remove toolbars dynamically by clicking on some buttons. How can I implement this (through any Layouts or some other way) so that when a user add/removes a toolbar, the rest of the space below the toolbar is adjusted accordingly.

A: I would recommend you using BorderLayout for the program and keep the North area for the toolbars. To this (North) area add another container (with BoxLayout or FlowLayout), depending on how you want your toolbars to be added/where placed in the container.
Have a look at this Java Layout Manager tutorial.

A: If you use the correct LayoutManager and add/remove the components, the layout should be computed automatically.

  JPanel p = new JPanel(new BorderLayout());
  p.add(someComponent, BorderLayout.CENTER);

Now if you later execute something like

  SwingUtilities.invokeLater(new Runnable() {
    public void run() {
      p.add(newComponent, BorderLayout.NORTH);
    }
  });

I think (but haven't tested) that the panel will automatically relayout itself to match the new configuration.

A: I got my toolbar to finally work by making a JPanel for all the toolbars (setting the "box" layout for that JPanel), putting my JToolBar toolbars on the JPanel, and putting my buttons on their respective JToolBar to group them. I'm using NetBeans, which generates the code, so I can't effectively put the code here.
With that setup, I can use the setVisible() method to show and hide individual buttons and JToolBar's. The documentation states that the validate() method should be used to reposition the buttons, but it works for me without it, at least under Windows 7. When I tried it under Ubuntu 10, the layout of the toolbar was wrong, so my answer is partially correct for now.


For just $41.00 per year, you can order a .JP domain from LionHost, .JP being the ccTLD for Japan! Your site will be positioned higher in local search results on search engines like Google and Yahoo. Besides, you'll get a lot more website visitors from Japan – a local TLD extension will make any domain more appealing and reliable in the eyes of those who live in that country. If you would like to swiftly boost the number of visitors coming from Japan, a .JP domain name would be the very best possible choice for you.
Last, but most definitely not least, you can order a .JP domain name for maximum 1 year at a time.
If you want to get complete control of numerous .JP domain names, but you don't want to deal with complicated domain management interfaces or multiple Control Panels, we've got just the answer for you. With LionHost's Domain Manager, you will get full control over your .JP domain names and you'll be in a position to take care of other domains too, all from the exact same place. It is also possible to easily modify your domains' DNS records, to easily set up URL forwarding, to park unlimited domain names and more.
In case you have a hosting account with LionHost, you will be able to conveniently take care of your web sites along with your domain names from the very same Control Panel.


text:
All AFRICA ANTARCTICA ASIA CENTRAL AMERICA EUROPE NORTH AMERICA OCEANIA SOUTH AMERICA SPACE
6 Reasons Why The Sony RX0 II Is…
Astronaut Photo Series Aims To Help Preserve The…
A Conversation with Ami Vitale About Rhino Conservation…
7 Reasons to Embrace the Cold for a…
Braving The Extreme and Merciless Weather of Patagonia…
Learning How To Relax in Punta de Mita,…
Beaches, Mountains, and Deserts: See The Diverse Beauty…
37 Photos That Will Inspire You to Visit…
10 Must-See Places in Norway
71 Natural Hot Springs To Warm Up In…
See The Untamed Beauty of Wyoming's Bridger-Teton National…
Haboobs, Lightning, and Hail: See the Frighteningly Beautiful…
What I Learned From Photographing a 16-Day Medical…
Exploring Chefchaouen: The Urban Blue Pearl of Morocco
An Adventure in Uganda: An iPhone Photo Story
39 Photos That Will Inspire You to Safari…
Inside a Photographer's Rapid Physical Transformation to the…
My Experience Climbing Mt. Kilimanjaro as an Avid…
An Adventure Through South Africa with Jarrad Seng
Snow Falls in Sahara Desert Town for the…
Giving Voice to Kenya's Wildlife
A Colorful Journey Through Morocco with an iPhone…
11 Nights of the Milky Way From the…
Live the Experience of Photographing a Polar Expedition
A Look Inside the Darkness of the Sub-Zero…
360° Video Takes Viewers to a Penguin and…
What I Learned From Living in the Coldest…
Aerial Film Shows The Dramatic And Untouched Beauty…
27 Images of the World's Most Remote Photowalk…
Photographing A One Month Adventure in Thailand With…
20 Lessons David DuChemin Taught Me About Travel…
'A Portrait of Iraq': See The Everyday People…
The Story Behind Waves For Water and Their…
See This Couple's Incredible 3-Week Journey Through Thailand
10 Days in India: 45 Photos of Chaos,…
21 Photos That Prove Siem Reap, Cambodia Should…
A Rare Look Inside North Korea's Luxury Ski…
No Cameras in Your Carry-On: Electronics Ban Confirms…
Photographing Japan With a Leica M10 Is Like…
Exploring The Natural Beauty of Camsur and Biri,…
The Black Teeth of Thailand: Uncovering The Unusual…
50 Photos That Show The Beauty of Everyday…
Street Photography Tips for Your Cuba Adventure—Or Any…
Exploring South Dakota's Rugged Badlands National Park
See the Milky Way Behind an Erupting Volcano…
The 10 Best Photography Spots in Havana, Cuba
The Phenomenon That Makes Costa Rica's Rio Celeste…
A Dog-Lover's Dilemma In Nicaragua
Hawaiian Nomadic Filmmaker Lets Us Discover the World…
31 Days in Cuba with an iPhone 6s…
The Untold Culture Of Cuba
Over 100,000 People Watch This Traveler Assure His…
The 13 Best Photography Spots in Oia, Santorini
Experience The Vibrant Night Sky From La Palma…
How to Get the Perfect Picture from 32,000…
Finding Serenity in Lofoten, Norway With Photographer Mikkel…
See The Extreme Difference Between Summer and Winter…
Running 450 Miles Across Iceland For A Good…
Under an Arctic Sky: An Interview With Chris…
7 Tips For Taking Photos in a Blizzard
A Dream Like Journey Through the Dolomites
Disappearing Ice: Greenland's Melting Ilulissat Icefjord
See Why Italy's Dolomites are a Must Visit…
A Sunset Cruise Around San Francisco on the…
Meet the 16 Creatives in AdoramaTV's 'Through The…
See the Massive Dust Storm That Swallowed Southwest…
In Search of Grizzly Bears in Grand Teton…
Finding Colorful Life in California's Death Valley
Experience The Beautiful Chaos of Los Angeles
5 Reasons Why I Am Stoked For Treefort…
Three Girlfriends on a 10-Day Roadtrip Through the…
Two Girlfriends' 8-Day Roadtrip Along Australia's Southern Great…
Time-lapse Film Shows the Stunning and Diverse Landscapes…
Film Explores The Beauty of New Zealand Winter
Diving Into the Waterworld of Tahiti and Fakarava
What 7 Days of Relaxation in the British…
See the Festival That Transforms Sydney Into a…
Michael Shainblum Captures The Natural, Photogenic Beauty of…
Watch The Film That Will Inspire You to…
Hawaiian Swims Dangerously Close to Massive Lava Flow
Video Shows Why it is Important to Keep…
13 Things You Must Do While In Peru
Mountains And Storms: My Adventure in Patagonia
In Argentina, a Gaucho Goes Global
Win a Tour for Two in Torres Del…
Experience the Ever-Changing Spring Weather In Torres del…
A Two-Week Adventure Through Patagonia With Jason Charles…
See the Stunning Night Sky and Vibrant Landscapes…
Exploring the Beaches and Nightlife of Rio De…
See Elon Musk's SpaceX Rocket Light Up The…
Hurricane Florence Looks Extremely Frightening From Space
See the Aurora Borealis from 78,000 Feet in…
Nighttime Map Shows the Dramatic Changing of Earth's…
This Stunning Video Takes You on a Mission…
This New "Edge-On" Photo Shows a Galaxy's Tough…
See What it Would be Like to Land…
See an Astronaut's View of Earth During 534…
The Story Behind These Mysterious Light Pillars In…
11 Photos To Remember The Last Man On…
Waking up Beneath the Stars in the American…
Productions Of The World
Snow-clad Solitude: A Winter Road Trip Through Idaho
CaliforniaNORTH AMERICA
7 Visually Stunning Historic Hotels in San Francisco
by Michael Bonocore May 23, 2017
written by Michael Bonocore May 23, 2017
Starting with the Gold Rush in 1849, San Francisco is easily one of the United State's most historic cities. From the world famous Golden Gate Bridge to the major earthquakes that rocked the city by the bay in the 20th century, the California coastal town has a history as vibrant as its architecture that has woven itself into that rich history.
Having lived in San Francisco for 21 years, hardly a day went by where I didn't marvel at an old Victorian home or one of the historic hotels that were designed by world renowned architects. It's no wonder why the city has been nicknamed 'The Paris of the West.'
When I started to research some of the city's most stunning hotels, it was evident with the historic importance of some of these hotels, their overall look and charm haven't changed much since they were built. Expedia.com asked me to share some of my favorite hotels San Francisco has to offer.
So let's take a tour of San Francisco's most architecturally stunning and historic hotels. And when you are inspired to check one out yourself, head on over to San Francisco to experience the incredible history first hand.
The Fairmont Hotel
Located atop the posh Nob Hill neighborhood, the Fairmont hotel is not only historic but also is home to some of the best views in the city. Theresa Fair Oelrichs and Virginia Fair Vanderbilt began building the hotel in the early 20th century as a tribute to their father Senator James Graham Fair. They hired James and Merritt Reid as the lead architects and engineers to make their dream become a reality. The planned 1906 opening was delayed after a massive 7.8 earthquake rocked the city. While the building survived, the interior was heavily damaged. The hotel opened in 1907 and has had its rightful place in history ever since. In 1945, the United Nations was formed in the hotel, and the United Nations Charter was written in the Garden Room. Just 16 years later, Tony Bennett famously sang "I left my heart in San Francisco" for the first time to a giddy crowd in the Venetian Room.
By Bobak Ha'Eri - Own work, CC BY 3.0, https://commons.wikimedia.org/w/index.php?curid=7422497
The Palace Hotel on bustling Market Street is actually a tale of two hotels. The original Palace Hotel was built in 1875, and with 755 rooms was the largest hotel in the Western United States. The luxury building hosted politicians and wealthy bank owners for 31 years until the 1906 earthquake. Ironically, the building survived the earthquake, but the out of control fires that spread through the city would take the Palace Hotel to its demise. The remains were razed and the second installment of the Palace Hotel opened on December 19, 1909, with the stunning "Garden Court" becoming one of the most elegant dining rooms in the city. While many historic events happened in the Palace, most notable is the death of Warren G. Harding In 1923, where the 29th President of the United States died of a heart attack in room 8064.
Westin St. Francis
The 1,200 guest rooms make the Westin St. Francis one of the biggest hotels in San Francisco, but it wasn't always that big. The original Bliss & Faville designed 12-story South Wing was built in 1904 as an investment property for railroad magnate Charles Crocker's children. The building suffered almost no damage during the initial 1906 earthquake and somehow suffered little damage even as the 3-day fire that engulfed surrounding Union Square destroyed almost every building around it.
The north wing was finished in 1913 and soon was known for its constant stream of celebrities and politicians that would stay the night.
Presidents Theodore Roosevelt, Woodrow Wilson, Ronald Reagan, and Gerald Ford have stayed at the hotel, with Ford surviving an assassination attempt outside by a woman named Sara Jane More.
The hotel is so historic, it has its own full-time historian on-site to answer questions for guests as well as historical artifacts laid out throughout the property, which also includes a 32-story tower that was completed in 1972.
The Scarlet Huntington
Originally built by the architects Weeks & Days as a 12 story, Georgian style apartment building, the property was soon bought by Eugene Fritz and converted to a hotel. It was the first steel and brick high rise west of the Mississippi. The 134 room building on Nob Hill underwent a 15 million dollar renovation in 2014, but even with the plush new interiors, the hotel still retains its nearly century old charm and character.
The 1906 earthquake reshaped the entire city. Case in point, the famed Intercontinental Mark Hopkins hotel would not be on its high perch on top of Nob Hill if the fires that raged in the city after the quake hadn't leveled Mark Hopkins' beautiful mansion, which he had built for his wife Mary in 1878. The current hotel opened in 1926, after the firm Weeks & Day designed the hotel for the land's new owner, George D. Smith. The hotel is maybe best known for its top floor bar, "Top of the Mark" which has sweeping panoramic views of San Francisco and the Bay.
When originally opened in October 1928, the Kimpton Sir Francis Drake was described as the 'last word on hotels.' The two-day open house event attracted over 10,000 people who were left in awe at the indoor golf course, cold ice water on tap and radios in each of the 416 guest rooms. The architects Weeks & Day took on a Renaissance angle when designing the hotel. The ceilings are vaulted and gold leafed embossed, and the grand marble staircase can turn anyone's head.
The rooms also featured a Servidor which was a panel that let staff deliver items like laundered clothes without having to open the guest room doors. But this was widely rumored to be the slick way that staff could deliver alcohol to their exclusive group of guests during the Prohibition era. During World War II, the hotel became the one-night stop for military men who were either on their way to the Pacific or just returning home, causing many emotional family moments.
Sitting in one of San Francisco's most popular tourist spots, Union Square, the Kimpton Sir Francis Drake continues to be the home of memories created by vacation seeking couples and families, especially if they enjoyed a cocktail filled night in the famous 70-plus-year-old Starlight room, one of the most popular nightlife locations in the city, thanks to its dramatic 180-degree views of the city skyline and San Francisco bay.
The Whitcomb is conveniently located on bustling Market Street in the theater district, which makes it a central point to explore all of San Francisco. The 100-plus-year-old building served as San Francisco City Hall after the 1906 earthquake leveled almost the entire city. In 1917, the building was officially transformed into a hotel and immediately was renowned for its Victorian architecture. Crystal chandeliers and marble columns greet guests as they turn their attention to a Tiffany stained glass in the piano bar.
Being listed with 110 hotels in the Historic Hotels of America list, the Whitcomb truly is a San Francisco historical treat. The hotel holds so much history, it's even said to be haunted.
There is no denying San Francisco's place in history, and the city and hotel management companies have gone to great lengths to keep these historic hotels old charm and beautiful architecture intact while at the same time redesigning them to live up to the expectations of modern day travelers. So next time you visit San Francisco, partake in the city's rich history by staying in the hotels that have been a staple in the community for over a century.
Fall in Love With Italy Through This Beautiful Timelapse
Parkour Team Illegally Runs, Flies, Burns Through Joshua Tree National Park
Similar Stories To Fuel Your Wanderlust
At Home Outdoors: A Road Trip Through The...
Art or Vandalism? Serial Graffiti Tagger Banned From...
15 Must-See Theme Bars in New York City
Susan Holt's Favorite Photography Locations In The American...
Field Testing the Nikon D810 Under the California...
Vibrant Fall Colors Shine in Maine's Acadia National...
See the Massive Water Flow in Idaho's Shoshone...
Wasteland: Post-Apocalyptic Desert Festival Brings the World of...
9 Must-See Destinations in Idaho During the Spring
The Immense Drama of Tornadoes in Ways You've...
minecraft free download pc May 9, 2019 - 5:33 pm
Very nice post. I simply stumbled upon your weblog and wanted to
mention that I have really enjoyed browsing your weblog posts.
In any case I will be subscribing for your rss feed
and I hope you write once more soon!
click to find out more May 13, 2019 - 8:06 am
I simply want to tell you that I am just all new to weblog and certainly savored you're website. More than likely I'm planning to bookmark your blog . You surely come with fabulous posts. Appreciate it for revealing your blog site.
minecraft download May 14, 2019 - 6:10 am
After exploring a number of the blog articles on your blog, I truly like your way of blogging.
I saved it to my bookmark website list and will be checking back in the near future.
Take a look at my web site as well and tell me how you feel.
WW88 May 15, 2019 - 3:46 am
Howdy! I simply want to give a huge thumbs up for the great data you've gotten here on this post. I might be coming back to your blog for more soon.
11 months ago by resourcetravel Happy Birthday @grandcanyonnps ! We love this shot by @pinyonridgephoto of an amazing storm passing through this massive and stunning canyon. #ResourceTravel #VisitArizona #GrandCanyon
11 months ago by resourcetravel Happy Valentines Day! ❤ @cj_kale #ResourceTravel
9 months ago by resourcetravel Photo by @michaelbonocore : "I finished editing my iPhone photos from Guatemala, and I really feel that i did not do this amazing country justice. So I can't wait to return in July to lead a team for @thegivinglens with my Sony camera and lenses. Do you want to come with me? Check out the link in my IG stories or link in my profile. Has anyone ever been to Guatemala? Let me know your experiences in the comments! I took this shot of @laurrrajean as the early morning light lit up the imposing Volcán de Agua behind Antigua. Surrounded by…
11 months ago by resourcetravel Watching Twilight come in Mostar with @krystle .blackburn. Thanks for tagging #ResourceTravel Krystle!
10 months ago by resourcetravel Photo by @amivitale . Just 12 hours left to enter to win a chance to visit the last two living female Northern White Rhinos in Kenya with @amivitale ! @michaelbonocore also interviewed Ami about her passion for rhino conservation and whether it is a fight she believes can ultimately be won. Read the interview and learn how to enter the contest by visiting the link in IG Stories or our profile. #ResourceTravel #Travel #Rhino #NatGeo #NatGeoTravel #Kenya @olpejeta @omazeworld
Follow Resource Travel
A Colorful Journey Through Morocco with an iPhone 7 Plus
11 Reasons Why I Moved To Idaho
Ian Plant Explores the Human Element of Travel
6 Reasons to Never "Skip the Trip"
The 10 Best Photography Spots in Miami Beach
Resource Travel is a proud division of Resource Magazine
@2018 - Resource Magazine. All Right Reserved.