/*!
\static
\return A new eZOrderStatusHistory object initialized with the input parameters.
501106
static function create( $orderID, $statusID, $userID = false, $timestamp = false )
    {
        if ( $timestamp === false )
        {
            $timestamp = time();
        }
        if ( $userID === false )
        {
            $userID = eZUser::currentUserID();
        }
        $row = array( 'id' => null,
                      'order_id' => $orderID,
                      'status_id' => $statusID,
                      'modifier_id' => $userID,
                      'modified' => $timestamp );
        return new eZOrderStatusHistory( $row );
    }
1125641
protected function createMigrationHistoryTable()
    {
        $tableName = $this->db->schema->getRawTableName($this->migrationTable);

        $this->db->createCommand()->createTable($this->migrationTable, [
            'version' => 'varchar(180) NOT NULL PRIMARY KEY',
            'apply_time' => 'integer',
        ])->execute();
        $this->db->createCommand()->insert($this->migrationTable, [
            'version' => self::BASE_MIGRATION,
            'apply_time' => time(),
        ])->execute();
    }
69138
public function getLocalizedSlug(ModelHistory $historyEntry): string
    {
        $slug = $historyEntry->context_slug;
        if (!empty($historyEntry->context) && !empty($historyEntry->context['namespace'])) {
            $class = new $historyEntry->context['namespace'];
            if (method_exists($class, 'typeDescriptions')) {
                $typeDescriptions = $class::typeDescriptions();
                if (isset($typeDescriptions[$slug])) {
                    $slug = $typeDescriptions[$slug];
                }
            }
        }

        return $slug;
    }
184194
public function getPasswordHistories()
    {
        if (empty($this->passwordHistoryClass) || !class_exists($this->passwordHistoryClass)) {
            return false;
        }
        $class = $this->passwordHistoryClass;
        return $class::find()->createdBy($this)->orderByCreatedAt(SORT_DESC)->all();
    }
919971
protected function PostLoginHookMergeTemporaryHistoryWithDatabaseHistory()
    {
        // merge current data with user data
        $aHistory = $this->GetArticleViewHistory();
        $aTmpList = array_reverse($aHistory, true);
        foreach (array_keys($aTmpList) as $histKey) {
            if (is_null($aTmpList[$histKey]->id)) {
                $aData = $aTmpList[$histKey]->sqlData;
                $aData['data_extranet_user_id'] = $this->id;
                $aTmpList[$histKey]->LoadFromRow($aData);
                $aTmpList[$histKey]->AllowEditByAll(true);
                $aTmpList[$histKey]->Save();
            }
        }
        $this->aArticleViewHistory = null;
        $this->GetArticleViewHistory();
        // remove items from cookie...
        $domain = TCMSSmartURLData::GetActive()->sOriginalDomainName;
        if ('www.' == substr($domain, 0, 4)) {
            $domain = substr($domain, 4);
        }
        setcookie(TdbDataExtranetUser::COOKIE_NAME_HISTORY, '', time() - 3600, '/', '.'.$domain, false, true);
    }
1283233
public function historyAction()
	{
		$client = \Aimeos\Client\Html::create( $this->getContext(), 'account/history' );
		return $this->getClientOutput( $client );
	}
1229215
public function render_assign_attempt_history(assign_attempt_history $history) {
        $o = '';

        $submittedstr = get_string('submitted', 'assign');
        $gradestr = get_string('grade');
        $gradedonstr = get_string('gradedon', 'assign');
        $gradedbystr = get_string('gradedby', 'assign');

        // Don't show the last one because it is the current submission.
        array_pop($history->submissions);

        // Show newest to oldest.
        $history->submissions = array_reverse($history->submissions);

        if (empty($history->submissions)) {
            return '';
        }

        $containerid = 'attempthistory' . uniqid();
        $o .= $this->output->heading(get_string('attempthistory', 'assign'), 3);
        $o .= $this->box_start('attempthistory', $containerid);

        foreach ($history->submissions as $i => $submission) {
            $grade = null;
            foreach ($history->grades as $onegrade) {
                if ($onegrade->attemptnumber == $submission->attemptnumber) {
                    if ($onegrade->grade != ASSIGN_GRADE_NOT_SET) {
                        $grade = $onegrade;
                    }
                    break;
                }
            }

            $editbtn = '';

            if ($submission) {
                $submissionsummary = userdate($submission->timemodified);
            } else {
                $submissionsummary = get_string('nosubmission', 'assign');
            }

            $attemptsummaryparams = array('attemptnumber'=>$submission->attemptnumber+1,
                                          'submissionsummary'=>$submissionsummary);
            $o .= $this->heading(get_string('attemptheading', 'assign', $attemptsummaryparams), 4);

            $t = new html_table();

            if ($submission) {
                $cell1 = new html_table_cell(get_string('submissionstatus', 'assign'));
                $cell2 = new html_table_cell(get_string('submissionstatus_' . $submission->status, 'assign'));
                $t->data[] = new html_table_row(array($cell1, $cell2));

                foreach ($history->submissionplugins as $plugin) {
                    $pluginshowsummary = !$plugin->is_empty($submission) || !$plugin->allow_submissions();
                    if ($plugin->is_enabled() &&
                            $plugin->is_visible() &&
                            $plugin->has_user_summary() &&
                            $pluginshowsummary) {

                        $cell1 = new html_table_cell($plugin->get_name());
                        $pluginsubmission = new assign_submission_plugin_submission($plugin,
                                                                                    $submission,
                                                                                    assign_submission_plugin_submission::SUMMARY,
                                                                                    $history->coursemoduleid,
                                                                                    $history->returnaction,
                                                                                    $history->returnparams);
                        $cell2 = new html_table_cell($this->render($pluginsubmission));

                        $t->data[] = new html_table_row(array($cell1, $cell2));
                    }
                }
            }

            if ($grade) {
                // Heading 'feedback'.
                $title = get_string('feedback', 'assign', $i);
                $title .= $this->output->spacer(array('width'=>10));
                if ($history->cangrade) {
                    // Edit previous feedback.
                    $returnparams = http_build_query($history->returnparams);
                    $urlparams = array('id' => $history->coursemoduleid,
                                   'rownum'=>$history->rownum,
                                   'useridlistid'=>$history->useridlistid,
                                   'attemptnumber'=>$grade->attemptnumber,
                                   'action'=>'grade',
                                   'returnaction'=>$history->returnaction,
                                   'returnparams'=>$returnparams);
                    $url = new moodle_url('/mod/assign/view.php', $urlparams);
                    $icon = new pix_icon('gradefeedback',
                                            get_string('editattemptfeedback', 'assign', $grade->attemptnumber+1),
                                            'mod_assign');
                    $title .= $this->output->action_icon($url, $icon);
                }
                $cell = new html_table_cell($title);
                $cell->attributes['class'] = 'feedbacktitle';
                $cell->colspan = 2;
                $t->data[] = new html_table_row(array($cell));

                // Grade.
                $cell1 = new html_table_cell($gradestr);
                $cell2 = $grade->gradefordisplay;
                $t->data[] = new html_table_row(array($cell1, $cell2));

                // Graded on.
                $cell1 = new html_table_cell($gradedonstr);
                $cell2 = new html_table_cell(userdate($grade->timemodified));
                $t->data[] = new html_table_row(array($cell1, $cell2));

                // Graded by set to a real user. Not set can be empty or -1.
                if (!empty($grade->grader) && is_object($grade->grader)) {
                    $cell1 = new html_table_cell($gradedbystr);
                    $cell2 = new html_table_cell($this->output->user_picture($grade->grader) .
                                                 $this->output->spacer(array('width' => 30)) . fullname($grade->grader));
                    $t->data[] = new html_table_row(array($cell1, $cell2));
                }

                // Feedback from plugins.
                foreach ($history->feedbackplugins as $plugin) {
                    if ($plugin->is_enabled() &&
                        $plugin->is_visible() &&
                        $plugin->has_user_summary() &&
                        !$plugin->is_empty($grade)) {

                        $cell1 = new html_table_cell($plugin->get_name());
                        $pluginfeedback = new assign_feedback_plugin_feedback(
                            $plugin, $grade, assign_feedback_plugin_feedback::SUMMARY, $history->coursemoduleid,
                            $history->returnaction, $history->returnparams
                        );
                        $cell2 = new html_table_cell($this->render($pluginfeedback));
                        $t->data[] = new html_table_row(array($cell1, $cell2));
                    }

                }

            }

            $o .= html_writer::table($t);
        }
        $o .= $this->box_end();
        $jsparams = array($containerid);

        $this->page->requires->yui_module('moodle-mod_assign-history', 'Y.one("#' . $containerid . '").history');

        return $o;
    }
890928
def history(directory, rev_range, verbose, indicate_current):
    """"""
    _history(directory, rev_range, verbose, indicate_current)
797494
function createOrder()
    {
        // Make order
        $productCollectionID = $this->attribute( 'productcollection_id' );

        $user = eZUser::currentUser();
        $userID = $user->attribute( 'contentobject_id' );

        $time = time();
        $order = new eZOrder( array( 'productcollection_id' => $productCollectionID,
                                     'user_id' => $userID,
                                     'is_temporary' => 1,
                                     'created' => $time,
                                     'status_id' => eZOrderStatus::PENDING,
                                     'status_modified' => $time,
                                     'status_modifier_id' => $userID
                                     ) );

        $db = eZDB::instance();
        $db->begin();
        $order->store();

        $orderID = $order->attribute( 'id' );
        $this->setAttribute( 'order_id', $orderID );
        $this->store();
        $db->commit();

        return $order;
    }
738525
static function createUndefined()
    {
        if ( empty( $GLOBALS['eZOrderStatusUndefined'] ) )
        {
            $row = array(
                'id' => null,
                'status_id' => eZOrderStatus::UNDEFINED,
                'is_active' => true,
                'name' => ezpI18n::tr( 'kernel/shop', 'Undefined' ) );
            $GLOBALS['eZOrderStatusUndefined'] = new eZOrderStatus( $row );
        }
        return $GLOBALS['eZOrderStatusUndefined'];
    }
305859
public function actionHistory()
    {
        $history = $this->wrappedObject->actions()->get();

        return $this->presenter->decorate($history);
    }
131952
public function securityHistory()
    {
        $history = $this->wrappedObject->security()->get();

        $history->each(function ($item) {
            $item->security = true;
        });

        return $this->presenter->decorate($history);
    }
1050742
public function setHistoryRowClass($historyRowClass)
    {
        if (!in_array('Zend_Db_Table_Row_Abstract', class_parents($historyRowClass))) {
            throw new \InvalidArgumentException(sprintf('History job row class must be instance of Zend_Db_Table_Row_Abstract, given %s.', get_class($historyRowClass)));
        }
        
        $this->historyRowClass = $historyRowClass;
        return $this;
    }
631182
public function historyActivity($start = null, $end = null)
    {
        $url = $this->_baseURL . "/historyrecord";
        $flag = "?";
        if (!empty($start)) {
            $url = $url . $flag . "start=" . $start;
            $flag = "&";
        }
        if (!empty($end)) {
            $url = $url . $flag . "end=" . $end;
        }
        return $this->_transport->send(HttpRequest::GET, $url);
    }
1117856
public function history()
	{
		$migration = new \Hubzero\Content\Migration();
		$history   = $migration->history();
		$items     = [];
		$maxFile   = 0;
		$maxUser   = 0;
		$maxScope  = 0;


		if ($history && count($history) > 0)
		{
			$items[] = [
				'File',
				'By',
				'Direction',
				'Date'
			];

			foreach ($history as $entry)
			{
				$items[] = [
					$entry->scope . DS . $entry->file,
					$entry->action_by,
					$entry->direction,
					$entry->date
				];
			}

			$this->output->addTable($items, true);
		}
		else
		{
			$this->addLine('No history to display.');
		}
	}
831283
function getHistory()
    {
        $scrollback = '';
        $last_attr = $this->base_attr_cell;
        for ($i = 0; $i < count($this->history); $i++) {
            for ($j = 0; $j <= $this->max_x + 1; $j++) {
                $cur_attr = $this->history_attrs[$i][$j];
                $scrollback.= $this->_processCoordinate($last_attr, $cur_attr, isset($this->history[$i][$j]) ? $this->history[$i][$j] : '');
                $last_attr = $this->history_attrs[$i][$j];
            }
            $scrollback.= "\r\n";
        }
        $base_attr_cell = $this->base_attr_cell;
        $this->base_attr_cell = $last_attr;
        $scrollback.= $this->_getScreen();
        $this->base_attr_cell = $base_attr_cell;

        return '<pre width="' . ($this->max_x + 1) . '" style="color: white; background: black">' . $scrollback . '</span></pre>';
    }
1085884
public function getHistory($page = 1, $pageSize = 10, $sortKey = 'series.title', $sortDir = 'asc')
    {
        $uri = 'history';

        $response = [
            'uri' => $uri,
            'type' => 'get',
            'data' => [
                'page' => $page,
                'pageSize' => $pageSize,
                'sortKey' => $sortKey,
                'sortDir' => $sortDir
            ]
        ];

        return $this->processRequest($response);
    }