Checks And Shows Review Message
515253
protected function maybe_prompt() {
		if ( ! $this->is_time() ) {
			return;
		}

		\add_action( 'admin_footer', array( $this, 'script' ) );
		if ( false !== $this->op['notice_callback'] ) {
			call_user_func_array( $this->op['notice_callback'], array( &$this ) );
		} else {
			\add_action( 'admin_notices', array( $this, 'add_notice' ) );
		}
	}
306251
def check_command(args):
    """"""
    outdated = check_requirements_file(args.requirements_file,
                                       args.skip_packages)

    if outdated:
        print('Requirements in {} are out of date:'.format(
            args.requirements_file))

        for item in outdated:
            print(' * {} is {} latest is {}.'.format(*item))

        sys.exit(1)
    else:
        print('Requirements in {} are up to date.'.format(
            args.requirements_file))
192142
public function checkAction()
    {
        $sourceId = $this->getSourceId();
        $where    = $this->db->quoteInto('gto_id_survey IN (SELECT gsu_id_survey FROM gems__surveys WHERE gsu_id_source = ?)', $sourceId);

        $batch = $this->loader->getTracker()->recalculateTokens('sourceCheck' . $sourceId, $this->currentUser->getUserId(), $where);

        $title = sprintf($this->_('Checking all surveys in the %s source for answers.'),
                    $this->db->fetchOne("SELECT gso_source_name FROM gems__sources WHERE gso_id_source = ?", $sourceId));
        $this->_helper->batchRunner($batch, $title, $this->accesslog);

        $this->addSnippet('Survey\\CheckAnswersInformation',
                'itemDescription', $this->_('This task checks all tokens using this source for answers .')
                );
    }
510248
public function checkAllAction()
    {
        $batch = $this->loader->getTaskRunnerBatch('orgCheckAll');
        if (! $batch->isLoaded()) {

            $sql = "SELECT gr2o_id_user, gr2o_id_organization
                        FROM gems__respondent2org INNER JOIN gems__reception_codes ON gr2o_reception_code = grc_id_reception_code
                        WHERE grc_success = 1
                        ORDER BY gr2o_id_organization, gr2o_created";

            // \MUtil_Echo::track($sql);

            $rows = $this->db->fetchAll($sql);

            foreach ($rows as $row) {
                $batch->addTask('Respondent\\UpdateRespondentTask', $row['gr2o_id_user'], $row['gr2o_id_organization']);
            }
        }

        $title = $this->_("Checking all respondents.");
        $this->_helper->BatchRunner($batch, $title, $this->accesslog);

        $this->addSnippet('Organization\\CheckOrganizationInformation');
    }
955550
def run_review(*args):
    '''
    
    '''
    email_cnt = '''<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <style type="text/css">
        table.diff {font-family:Courier; border:medium;}
        .diff_header {background-color:#e0e0e0}
        td.diff_header {text-align:right}
        .diff_next {background-color:#c0c0c0}
        .diff_add {background-color:#aaffaa}
        .diff_chg {background-color:#ffff77}
        .diff_sub {background-color:#ffaaaa}
    </style></head><body>'''

    idx = 1

    email_cnt = email_cnt + '<table border=1>'

    email_cnt, idx = __get_post_review(email_cnt, idx)  # post
    email_cnt, idx = __get_page_review(email_cnt, idx)  # page.
    email_cnt, idx = __get_wiki_review(email_cnt, idx)  # wiki

    ###########################################################

    diff_str = __get_diff_recent()

    if len(diff_str) < 20000:
        email_cnt = email_cnt + diff_str
    email_cnt = email_cnt + '''</body></html>'''

    if idx > 1:
        send_mail(post_emails, "{0}|{1}|{2}".format(SMTP_CFG['name'], '文档更新情况', DATE_STR), email_cnt)
1285222
public function checkAction()
    {
        $surveyId = $this->getSurveyId();
        $where    = $this->db->quoteInto('gto_id_survey = ?', $surveyId);

        $batch = $this->loader->getTracker()->recalculateTokens('surveyCheck' . $surveyId, $this->currentUser->getUserId(), $where);

        $title = sprintf($this->_('Checking for the %s survey for answers .'),
                $this->db->fetchOne("SELECT gsu_survey_name FROM gems__surveys WHERE gsu_id_survey = ?", $surveyId));
        $this->_helper->BatchRunner($batch, $title, $this->accesslog);

        $this->addSnippet('Survey\\CheckAnswersInformation',
                'itemDescription', $this->_('This task checks all tokens using this survey for answers.')
                );
    }
710496
def checkStatus(self):
        
        checkAccount()

        data = {'userid': self.user_id,
                'useridx': self.useridx
               }
        r = self.session.post(nurls['checkStatus'], data = data)

        p = re.compile(r'\<message\>(?P<message>.+)\</message\>')
        message = p.search(r.text).group('message')

        if message == 'success':
            return True
        else:
            return False
1160853
private void displayMsg() {
        if (msgQueue.isEmpty()) {
            return;
        }
        // First peek whether the AppMsg is being displayed.
        final AppMsg appMsg = msgQueue.peek();
        final Message msg;
        if (!appMsg.isShowing()) {
            // Display the AppMsg
            msg = obtainMessage(MESSAGE_ADD_VIEW);
            msg.obj = appMsg;
            sendMessage(msg);
        } else if (appMsg.getDuration() != LENGTH_STICKY) {
            msg = obtainMessage(MESSAGE_DISPLAY);
            sendMessageDelayed(msg, appMsg.getDuration()
                    + appMsg.mInAnimation.getDuration() + appMsg.mOutAnimation.getDuration());
        }
    }
73334
protected function validateTextReview()
    {
        $field = 'text';

        if ($this->isExcluded($field)) {
            return null;
        }

        $value = $this->getSubmitted($field);

        if ($this->isUpdating() && !isset($value)) {
            $this->unsetSubmitted($field);
            return null;
        }

        $label = $this->translation->text('Text');

        if (empty($value)) {
            $this->setErrorRequired($field, $label);
            return false;
        }

        $length = mb_strlen($value);
        list($min, $max) = $this->review->getLimits();

        if ($length < $min || $length > $max) {
            $this->setErrorLengthRange($field, $label, $min, $max);
            return false;
        }

        return true;
    }
719718
def check(self, final_line_count):
        """"""
        if self._lines_seen["version"]:
            self._process_version_lines()
        self._process_plan_lines(final_line_count)
544602
def check_sentence():
    """"""
    text = ''
    if request.method == 'POST':
        text = request.form['text']
        if not text:
            error = 'No input'
            flash_message = error
        else:
            fb = check(request.form['text'])
            correct = False
            if request.form.get('is_correct') and not fb.primary_error:
                correct = True
            elif not request.form.get('is_correct') and fb.primary_error:
                correct = True
            sub = Submission(text=text, correct=correct, primary_error=fb.primary_error,
                    specific_error=fb.specific_error)
            session.add(sub)
            session.commit()
            # TODO: remove the hack below
            if not fb.primary_error:
                fb.human_readable = "No errors were found."
            flash_message = fb.human_readable

        flash(flash_message)
    return render_template('check_sentence.html', text=text)
1030581
def comment_check(self, params):
        """"""
    
        # Check required params for comment-check
        for required in ['blog', 'user_ip', 'user_agent']:
            if required not in params:
                raise MissingParams(required) 
    
        response = self._request('comment-check', params)
        
        if response.status is 200:
            # Read response (trimmed of whitespace)
            return response.read().strip() == "true"
            
        return False
1036224
protected function addReview()
    {
        $submitted = $this->getSubmitted();
        $added = $this->review->add($submitted);

        if (empty($added)) {
            $message = $this->text('Review has not been added');
            $this->redirect('', $message, 'warning');
        }

        $message = $this->text('Review has been added');

        if (empty($submitted['status'])) {
            $message = $this->text('Review has been added and will be published after approval');
        }

        $this->redirect("product/{$this->data_product['product_id']}", $message, 'success');
    }
13660
def getReviews(self):
        '''
        
        '''

        self._reviews = self._client.getReviews(self.setID)
        return self._reviews
494615
def show_error(self, *messages):
        """"""
        if not self.quiet:
            self.display(messages, main_sig, debug=True)
414779
public void checkMail() {
        Queue<Message> mailBox = getTS().getC().getMailBox();
        for (Message m : this.inbox) {
            mailBox.offer(m);
            logger.fine("Received message -> ID: " + m.getMsgId() + " Sender: "
                    + m.getSender());
        }
        this.inbox.clear();
    }
467035
function CheckDevAck() {
        self.Debug (3,"Waiting Acknowledgment Response %d/%d", self.retry, smsc.opts.retry);
        smsc.GetFrom (CheckDevAckCB, smscmd.phone)
    }