Deletes course-wide transcript preferences.

    Arguments:
        course_id(str): course id
162727
def remove_transcript_preferences(course_id):
    
    try:
        transcript_preference = TranscriptPreference.objects.get(course_id=course_id)
        transcript_preference.delete()
    except TranscriptPreference.DoesNotExist:
        pass
151025
def course_unregister_user(self, course, username=None):
        
        if username is None:
            username = self.session_username()

        # Needed if user belongs to a group
        self._database.aggregations.find_one_and_update(
            {"courseid": course.get_id(), "groups.students": username},
            {"$pull": {"groups.$.students": username, "students": username}})

        # If user doesn't belong to a group, will ensure correct deletion
        self._database.aggregations.find_one_and_update(
            {"courseid": course.get_id(), "students": username},
            {"$pull": {"students": username}})

        self._logger.info("User %s unregistered from course %s", username, course.get_id())
1092889
def clear_learning_objectives(self):
        
        # Implemented from template for osid.learning.ActivityForm.clear_assets_template
        if (self.get_learning_objectives_metadata().is_read_only() or
                self.get_learning_objectives_metadata().is_required()):
            raise errors.NoAccess()
        self._my_map['learningObjectiveIds'] = self._learning_objectives_default
738158
def filter(self, criteria):
        
        if isinstance(criteria, str) or isinstance(criteria, unicode):
            _criteria = criteria
            criteria = lambda x: x.get(_criteria)

        return CoursesList(filter(criteria, self))
1242760
def reset_course(self, course_id):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - course_id
        """ID"""
        path["course_id"] = course_id

        self.logger.debug("POST /api/v1/courses/{course_id}/reset_content with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("POST", "/api/v1/courses/{course_id}/reset_content".format(**path), data=data, params=params, single_item=True)
1286566
def credential_delete(self, *ids):
        
        return self.raw_query("credential", "delete", data={
            "credentials": [{"id": str(id)} for id in ids]
        })
1303791
def delete_topic_groups(self, group_id, topic_id):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - group_id
        """ID"""
        path["group_id"] = group_id

        # REQUIRED - PATH - topic_id
        """ID"""
        path["topic_id"] = topic_id

        self.logger.debug("DELETE /api/v1/groups/{group_id}/discussion_topics/{topic_id} with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("DELETE", "/api/v1/groups/{group_id}/discussion_topics/{topic_id}".format(**path), data=data, params=params, no_data=True)
1288723
def deleteProfile(self, profile):
        
        profGroupName = self.profileGroupName(profile)
        logger.debug("Resetting profile settings: {}".format(profGroupName))
        settings = QtCore.QSettings()
        settings.remove(profGroupName)
800186
def delete_task(self, courseid, taskid):
        
        if not id_checker(courseid):
            raise InvalidNameException("Course with invalid name: " + courseid)
        if not id_checker(taskid):
            raise InvalidNameException("Task with invalid name: " + taskid)

        task_fs = self.get_task_fs(courseid, taskid)

        if task_fs.exists():
            task_fs.delete()
            get_course_logger(courseid).info("Task %s erased from the factory.", taskid)
516786
def remove_transition(self, transition_id, destroy=True):
        
        if transition_id == -1 or transition_id == -2:
            raise AttributeError("The transition_id must not be -1 (Aborted) or -2 (Preempted)")
        if transition_id not in self._transitions:
            raise AttributeError("The transition_id %s does not exist" % str(transition_id))

        self.transitions[transition_id].parent = None
        return self.transitions.pop(transition_id)
474958
def delete_video_transcript(video_id, language_code):
    
    video_transcript = VideoTranscript.get_or_none(video_id, language_code)
    if video_transcript:
        # delete the transcript content from storage.
        video_transcript.transcript.delete()
        # delete the transcript metadata from db.
        video_transcript.delete()
        logger.info('Transcript is removed for video "%s" and language code "%s"', video_id, language_code)
15654
def delete_enrollment(session, enrollment):
    
    uidentity = enrollment.uidentity
    uidentity.last_modified = datetime.datetime.utcnow()

    session.delete(enrollment)
    session.flush()
273637
def relation_clear(r_id=None):
    '''  '''
    settings = relation_get(rid=r_id,
                            unit=local_unit())
    for setting in settings:
        if setting not in ['public-address', 'private-address']:
            settings[setting] = None
    relation_set(relation_id=r_id,
                 **settings)
508406
def remove_entry_listener(self, registration_id):
        
        return self._stop_listening(registration_id,
                                    lambda i: map_remove_entry_listener_codec.encode_request(self.name, i))
255764
def delete_policy(self, pol_id):
        
        if pol_id not in self.policies:
            LOG.error("Invalid policy %s", pol_id)
            return
        del self.policies[pol_id]
        self.policy_cnt -= 1
740169
public static function remove_competency_from_course($courseid, $competencyid) {
        $params = self::validate_parameters(self::remove_competency_from_course_parameters(), array(
            'courseid' => $courseid,
            'competencyid' => $competencyid,
        ));
        self::validate_context(context_course::instance($params['courseid']));
        return api::remove_competency_from_course($params['courseid'], $params['competencyid']);
    }
132519
def delete(options = {:hard => false})
      if options[:hard]
        self.class.delete(self.id, options)
      else
        return if new_record? or destroyed?
        update_column kakurenbo_column, current_time_from_proper_timezone
      end
    end