Permalink
Browse files

Revert "MDL-28509 repository_youtube Enable selection of sort order"

This reverts commit 919304d.
  • Loading branch information...
1 parent d45e517 commit acb05b5d4d3083273835cad5bc6f0182e0c0e062 @nebgor nebgor committed Aug 24, 2011
Showing with 2 additions and 30 deletions.
  1. +0 −5 repository/youtube/lang/en/repository_youtube.php
  2. +2 −25 repository/youtube/lib.php
View
5 repository/youtube/lang/en/repository_youtube.php
@@ -27,8 +27,3 @@
$string['search'] = 'Search videos';
$string['youtube:view'] = 'Use youtube in file picker';
$string['configplugin'] = 'YouTube repository type configuration';
-$string['sortby'] = 'Sort By';
-$string['sortpublished'] = 'Date Published';
-$string['sortrating'] = 'Rating';
-$string['sortrelevance'] = 'Relevance';
-$string['sortviewcount'] = 'View Count';
View
27 repository/youtube/lib.php
@@ -31,7 +31,7 @@ public function __construct($repositoryid, $context = SYSCONTEXTID, $options = a
$this->keyword = optional_param('youtube_keyword', '', PARAM_RAW);
$this->start =1;
$this->max = 27;
- $this->sort = optional_param('youtube_sort', '', PARAM_TEXT);
+ $this->sort = 'published';
parent::__construct($repositoryid, $context, $options);
}
@@ -92,30 +92,7 @@ public function print_login($ajax = true) {
$search->id = 'youtube_search';
$search->name = 'youtube_keyword';
$search->label = get_string('search', 'repository_youtube').': ';
- $sort = new stdClass();
- $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'] = array($search);
$ret['login_btn_label'] = get_string('search');
$ret['login_btn_action'] = 'search';
return $ret;

0 comments on commit acb05b5

Please sign in to comment.