public static function get_restore_name(\context $context) {
        global $DB;
        $instanceid = $context->instanceid;

        if ($context->contextlevel == CONTEXT_MODULE) {
            // For modules get the course name and module name.
            $cm = get_coursemodule_from_id('', $context->instanceid, 0, false, MUST_EXIST);
            $coursename = $DB->get_field('course', 'fullname', array('id' => $cm->course));
            $itemname = $coursename . ' - ' . $cm->name;
        } else {
            $itemname = $DB->get_field('course', 'fullname', array('id' => $context->instanceid));

        }

        return $itemname;
    }