Renders the review question pop-up.

@param quiz_attempt $attemptobj an instance of quiz_attempt.
@param string $message Why the review is not allowed.
@return string html to output.
168518
public function review_question_not_allowed(quiz_attempt $attemptobj, $message) {
        $output = '';
        $output .= $this->header();
        $output .= $this->heading(format_string($attemptobj->get_quiz_name(), true,
                                  array("context" => $attemptobj->get_quizobj()->get_context())));
        $output .= $this->notification($message);
        $output .= $this->close_window_button();
        $output .= $this->footer();
        return $output;
    }
813583
protected function addDisplayException($message)
    {
        $exception = oxNew(\OxidEsales\Eshop\Core\Exception\ExceptionToDisplay::class);
        $exception->setMessage($message);
        \OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay($exception);
    }
1133848
public function render_preview(moodle_page $page) {

        if (!$this->is_form_defined()) {
            throw new coding_exception('It is the caller\'s responsibility to make sure that the form is actually defined');
        }

        // Check if current user is able to see preview
        $options = $this->get_options();
        if (empty($options['alwaysshowdefinition']) && !has_capability('moodle/grade:managegradingforms', $page->context))  {
            return '';
        }

        $criteria = $this->definition->guide_criteria;
        $comments = $this->definition->guide_comments;
        $output = $this->get_renderer($page);

        $guide = '';
        $guide .= $output->box($this->get_formatted_description(), 'gradingform_guide-description');
        if (has_capability('moodle/grade:managegradingforms', $page->context)) {
            $guide .= $output->display_guide_mapping_explained($this->get_min_max_score());
            $guide .= $output->display_guide($criteria, $comments, $options, self::DISPLAY_PREVIEW, 'guide');
        } else {
            $guide .= $output->display_guide($criteria, $comments, $options, self::DISPLAY_PREVIEW_GRADED, 'guide');
        }

        return $guide;
    }
518475
public function add_messages_on_page_process(lesson_page $page, $result, $reviewmode) {

        if ($this->can_manage()) {
            // This is the warning msg for teachers to inform them that cluster and unseen does not work while logged in as a teacher.
            if (lesson_display_teacher_warning($this)) {
                $warningvars = new stdClass();
                $warningvars->cluster = get_string("clusterjump", "lesson");
                $warningvars->unseen = get_string("unseenpageinbranch", "lesson");
                $this->add_message(get_string("teacherjumpwarning", "lesson", $warningvars));
            }
            // Inform teacher that s/he will not see the timer.
            if ($this->properties->timelimit) {
                $this->add_message(get_string("teachertimerwarning", "lesson"));
            }
        }
        // Report attempts remaining.
        if ($result->attemptsremaining != 0 && $this->properties->review && !$reviewmode) {
            $this->add_message(get_string('attemptsremaining', 'lesson', $result->attemptsremaining));
        }
    }
1118812
public function view_information($quiz, $cm, $context, $messages) {
        global $CFG;

        $output = '';

        // Print quiz name and description.
        $output .= $this->heading(format_string($quiz->name));
        $output .= $this->quiz_intro($quiz, $cm);

        // Output any access messages.
        if ($messages) {
            $output .= $this->box($this->access_messages($messages), 'quizinfo');
        }

        // Show number of attempts summary to those who can view reports.
        if (has_capability('mod/quiz:viewreports', $context)) {
            if ($strattemptnum = $this->quiz_attempt_summary_link_to_reports($quiz, $cm,
                    $context)) {
                $output .= html_writer::tag('div', $strattemptnum,
                        array('class' => 'quizattemptcounts'));
            }
        }
        return $output;
    }
1056134
public static function displayAsEndSuccess(string $message, string $exit = "yes")
    {
        $colors = self::getManagerColorInstance();
        self::clear();
        echo "\n".$colors->getColoredString($message, "green", "transparent");
        if ($exit == "yes") {
            exit();
        }
    }
637316
public function displayOverview( $nexmo_response=null ){
		$info = (!$nexmo_response) ? $this->nexmo_response : $nexmo_response;

		if (!$nexmo_response ) return 'Cannot display an overview of this response';

		// How many messages were sent?
		if ( $info->messagecount > 1 ) {
		
			$status = 'Your message was sent in ' . $info->messagecount . ' parts';
		
		} elseif ( $info->messagecount == 1) {
		
			$status = 'Your message was sent';
		
		} else {

			return 'There was an error sending your message';
		}
		
		// Build an array of each message status and ID
		if (!is_array($info->messages)) $info->messages = array();
		$message_status = array();
		foreach ( $info->messages as $message ) {
			$tmp = array('id'=>'', 'status'=>0);

			if ( $message->status != 0) {
				$tmp['status'] = $message->errortext;
			} else {
				$tmp['status'] = 'OK';
				$tmp['id'] = $message->messageid;
			}

			$message_status[] = $tmp;
		}
		
		
		// Build the output
		if (isset($_SERVER['HTTP_HOST'])) {
			// HTML output
			$ret = '<table><tr><td colspan="2">'.$status.'</td></tr>';
			$ret .= '<tr><th>Status</th><th>Message ID</th></tr>';
			foreach ($message_status as $mstat) {
				$ret .= '<tr><td>'.$mstat['status'].'</td><td>'.$mstat['id'].'</td></tr>';
			}
			$ret .= '</table>';

		} else {

			// CLI output
			$ret = "$status:\n";

			// Get the sizes for the table
			$out_sizes = array('id'=>strlen('Message ID'), 'status'=>strlen('Status'));
			foreach ($message_status as $mstat) {
				if ($out_sizes['id'] < strlen($mstat['id'])) {
					$out_sizes['id'] = strlen($mstat['id']);
				}
				if ($out_sizes['status'] < strlen($mstat['status'])) {
					$out_sizes['status'] = strlen($mstat['status']);
				}
			}

			$ret .= '  '.str_pad('Status', $out_sizes['status'], ' ').'   ';
			$ret .= str_pad('Message ID', $out_sizes['id'], ' ')."\n";
			foreach ($message_status as $mstat) {
				$ret .= '  '.str_pad($mstat['status'], $out_sizes['status'], ' ').'   ';
				$ret .= str_pad($mstat['id'], $out_sizes['id'], ' ')."\n";
			}
		}

		return $ret;
	}
1341411
public static function view_attempt_review($attemptid) {

        $warnings = array();

        $params = array(
            'attemptid' => $attemptid,
        );
        $params = self::validate_parameters(self::view_attempt_review_parameters(), $params);
        list($attemptobj, $displayoptions) = self::validate_attempt_review($params);

        // Log action.
        $attemptobj->fire_attempt_reviewed_event();

        $result = array();
        $result['status'] = true;
        $result['warnings'] = $warnings;
        return $result;
    }
932280
public function col_feedbacktext($attempt) {
        if ($attempt->state != quiz_attempt::FINISHED) {
            return '-';
        }

        $feedback = quiz_report_feedback_for_grade(
                quiz_rescale_grade($attempt->sumgrades, $this->quiz, false),
                $this->quiz->id, $this->context);

        if ($this->is_downloading()) {
            $feedback = strip_tags($feedback);
        }

        return $feedback;
    }
1088465
public function previewByOpenid($openid, $message = [])
    {
        $msg = array_merge(['touser' => $openid], $message);
        $msg['msgtype'] = array_keys($message)[0];

        return $this->http->jsonPost(self::API_PREVIEW, $msg);
    }
646824
@Override
	public Object evaluate( Message message ) throws JMSException
    {
        Boolean operandValue = operand.evaluateBoolean(message);
        if (operandValue == null)
            return null;
        
        return operandValue.booleanValue() ? Boolean.FALSE : Boolean.TRUE;
    }
1259478
public function summary_page($attemptobj, $displayoptions) {
        $output = '';
        $output .= $this->header();
        $output .= $this->heading(format_string($attemptobj->get_quiz_name()));
        $output .= $this->heading(get_string('summaryofattempt', 'quiz'), 3);
        $output .= $this->summary_table($attemptobj, $displayoptions);
        $output .= $this->summary_page_controls($attemptobj);
        $output .= $this->footer();
        return $output;
    }
387709
protected function submit_button(question_attempt $qa, question_display_options $options) {
        if (!$qa->get_state()->is_active()) {
            return '';
        }
        $attributes = array(
            'type' => 'submit',
            'id' => $qa->get_behaviour_field_name('submit'),
            'name' => $qa->get_behaviour_field_name('submit'),
            'value' => get_string('check', 'question'),
            'class' => 'submit btn btn-secondary',
        );
        if ($options->readonly) {
            $attributes['disabled'] = 'disabled';
        }
        $output = html_writer::empty_tag('input', $attributes);
        if (!$options->readonly) {
            $this->page->requires->js_init_call('M.core_question_engine.init_submit_button',
                    array($attributes['id'], $qa->get_slot()));
        }
        return $output;
    }
505884
@Override
	public Object evaluate( Message message ) throws JMSException
    {
        // Standard headers
        if (name.equals("JMSCorrelationID"))
            return message.getJMSCorrelationID();
        if (name.equals("JMSMessageID"))
            return message.getJMSMessageID();
        if (name.equals("JMSType"))
            return message.getJMSType();
        if (name.equals("JMSDeliveryMode"))
            return message.getJMSDeliveryMode() == DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON_PERSISTENT";
        if (name.equals("JMSPriority"))
            return Integer.valueOf(message.getJMSPriority());
        if (name.equals("JMSTimestamp"))
            return Long.valueOf(message.getJMSTimestamp());
                
        return message.getObjectProperty(name);
    }
882819
public function writeSelectPrompt($message, &$options)
    {
        $this->writeLine();

        // translate options
        foreach ($options as $optionKey => $optionValue) {
            $options[$optionKey] = $this->translator->translate($optionValue);
        }

        // write prompt badge
        $this->writeBadge('badge_pick', Color::RED);

        // output prompt
        $prompt = new Select(
            $this->translator->translate($message),
            $options,
            false,
            false
        );

        $answer = $prompt->show();

        $this->writeLine();

        return strtolower($answer);
    }
272279
public function display_page(lesson $lesson, lesson_page $page, $attempt) {
        // We need to buffer here as there is an mforms display call
        ob_start();
        echo $page->display($this, $attempt);
        $output = ob_get_contents();
        ob_end_clean();
        return $output;
    }
1050862
public void displayValidationError(final String message) {
        final StringBuilder updatedMsg = new StringBuilder(FontAwesome.EXCLAMATION_TRIANGLE.getHtml());
        updatedMsg.append(' ');
        updatedMsg.append(message);
        notificationMessage.showNotification(SPUIStyleDefinitions.SP_NOTIFICATION_ERROR_MESSAGE_STYLE, null,
                updatedMsg.toString(), true);
    }