def po_event_feedback_new(user_id, name, txt, good, event_id, event_user_id): if not name and not txt: return id = event_feedback_id_get(user_id, event_id) if id: m = Po.mc_get(id) else: m = po_new(CID_EVENT_FEEDBACK, user_id, name, STATE_ACTIVE, event_id) if m: id = m.id mc_event_feedback_id_get.set('%s_%s' % (user_id, event_id), id) m.feed_new() from buzz import buzz_event_feedback_new, mq_buzz_event_feedback_owner_new if user_id != event_user_id: rank_new(m, event_id, CID_EVENT_FEEDBACK) buzz_event_feedback_new(user_id, id, event_user_id) else: mq_buzz_event_feedback_owner_new(user_id, id) event_joiner_state_set_by_good(user_id, event_id, good) return m
def po_event_feedback_new(user_id, name, txt, good, event_id, event_user_id): if not name and not txt: return id = event_feedback_id_get(user_id, event_id) if id: m = Po.mc_get(id) else: m = po_new(CID_EVENT_FEEDBACK, user_id, name, STATE_ACTIVE, event_id) if m: id = m.id mc_event_feedback_id_get.set('%s_%s' % (user_id, event_id), id) m.feed_new() from buzz import buzz_event_feedback_new , mq_buzz_event_feedback_owner_new if user_id != event_user_id: rank_new(m, event_id, CID_EVENT_FEEDBACK) buzz_event_feedback_new(user_id, id, event_user_id) else: mq_buzz_event_feedback_owner_new(user_id, id) event_joiner_state_set_by_good(user_id, event_id, good) return m
def po_answer_new(user_id, question_id, name, txt, state): # from buzz import buzz_answer_new id = answer_id_get(user_id, question_id) if id: return Po.mc_get(id) else: if txt: m = _po_answer_new(user_id, name, txt, state, question_id) else: m = po_word_new(user_id, name, state, question_id) if m: id = m.id #buzz_answer_new(user_id, question_id) rank_new(m, question_id, CID_QUESTION) mq_notice_question(user_id, id) mc_answer_id_get.set('%s_%s' % (user_id, question_id), id) answer_count.delete(question_id) return m