mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Revert "MDL-28509 repository_youtube Enable selection of sort order"
This reverts commit 88bf951aa7
.
This commit is contained in:
parent
a2e87acfc5
commit
efdbbafdba
2 changed files with 2 additions and 30 deletions
|
@ -27,8 +27,3 @@ $string['pluginname'] = 'Youtube videos';
|
||||||
$string['search'] = 'Search videos';
|
$string['search'] = 'Search videos';
|
||||||
$string['youtube:view'] = 'Use youtube in file picker';
|
$string['youtube:view'] = 'Use youtube in file picker';
|
||||||
$string['configplugin'] = 'YouTube repository type configuration';
|
$string['configplugin'] = 'YouTube repository type configuration';
|
||||||
$string['sortby'] = 'Sort By';
|
|
||||||
$string['sortpublished'] = 'Date Published';
|
|
||||||
$string['sortrating'] = 'Rating';
|
|
||||||
$string['sortrelevance'] = 'Relevance';
|
|
||||||
$string['sortviewcount'] = 'View Count';
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ class repository_youtube extends repository {
|
||||||
$this->keyword = optional_param('youtube_keyword', '', PARAM_RAW);
|
$this->keyword = optional_param('youtube_keyword', '', PARAM_RAW);
|
||||||
$this->start =1;
|
$this->start =1;
|
||||||
$this->max = 27;
|
$this->max = 27;
|
||||||
$this->sort = optional_param('youtube_sort', '', PARAM_TEXT);
|
$this->sort = 'published';
|
||||||
parent::__construct($repositoryid, $context, $options);
|
parent::__construct($repositoryid, $context, $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,30 +92,7 @@ class repository_youtube extends repository {
|
||||||
$search->id = 'youtube_search';
|
$search->id = 'youtube_search';
|
||||||
$search->name = 'youtube_keyword';
|
$search->name = 'youtube_keyword';
|
||||||
$search->label = get_string('search', 'repository_youtube').': ';
|
$search->label = get_string('search', 'repository_youtube').': ';
|
||||||
$sort = new stdClass();
|
$ret['login'] = array($search);
|
||||||
$sort->type = 'select';
|
|
||||||
$sort->options = array(
|
|
||||||
(object)array(
|
|
||||||
'value' => 'relevance',
|
|
||||||
'label' => get_string('sortrelevance', 'repository_youtube')
|
|
||||||
),
|
|
||||||
(object)array(
|
|
||||||
'value' => 'published',
|
|
||||||
'label' => get_string('sortpublished', 'repository_youtube')
|
|
||||||
),
|
|
||||||
(object)array(
|
|
||||||
'value' => 'rating',
|
|
||||||
'label' => get_string('sortrating', 'repository_youtube')
|
|
||||||
),
|
|
||||||
(object)array(
|
|
||||||
'value' => 'viewCount',
|
|
||||||
'label' => get_string('sortviewcount', 'repository_youtube')
|
|
||||||
)
|
|
||||||
);
|
|
||||||
$sort->id = 'youtube_sort';
|
|
||||||
$sort->name = 'youtube_sort';
|
|
||||||
$sort->label = get_string('sortby', 'repository_youtube').': ';
|
|
||||||
$ret['login'] = array($search, $sort);
|
|
||||||
$ret['login_btn_label'] = get_string('search');
|
$ret['login_btn_label'] = get_string('search');
|
||||||
$ret['login_btn_action'] = 'search';
|
$ret['login_btn_action'] = 'search';
|
||||||
return $ret;
|
return $ret;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue