Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

This reverts commit 919304d.
  • Loading branch information...
commit acb05b5d4d3083273835cad5bc6f0182e0c0e062 1 parent d45e517
Aparup Banerjee nebgor authored
5 repository/youtube/lang/en/repository_youtube.php
@@ -27,8 +27,3 @@
27 27 $string['search'] = 'Search videos';
28 28 $string['youtube:view'] = 'Use youtube in file picker';
29 29 $string['configplugin'] = 'YouTube repository type configuration';
30   -$string['sortby'] = 'Sort By';
31   -$string['sortpublished'] = 'Date Published';
32   -$string['sortrating'] = 'Rating';
33   -$string['sortrelevance'] = 'Relevance';
34   -$string['sortviewcount'] = 'View Count';
27 repository/youtube/lib.php
@@ -31,7 +31,7 @@ public function __construct($repositoryid, $context = SYSCONTEXTID, $options = a
31 31 $this->keyword = optional_param('youtube_keyword', '', PARAM_RAW);
32 32 $this->start =1;
33 33 $this->max = 27;
34   - $this->sort = optional_param('youtube_sort', '', PARAM_TEXT);
  34 + $this->sort = 'published';
35 35 parent::__construct($repositoryid, $context, $options);
36 36 }
37 37
@@ -92,30 +92,7 @@ public function print_login($ajax = true) {
92 92 $search->id = 'youtube_search';
93 93 $search->name = 'youtube_keyword';
94 94 $search->label = get_string('search', 'repository_youtube').': ';
95   - $sort = new stdClass();
96   - $sort->type = 'select';
97   - $sort->options = array(
98   - (object)array(
99   - 'value' => 'relevance',
100   - 'label' => get_string('sortrelevance', 'repository_youtube')
101   - ),
102   - (object)array(
103   - 'value' => 'published',
104   - 'label' => get_string('sortpublished', 'repository_youtube')
105   - ),
106   - (object)array(
107   - 'value' => 'rating',
108   - 'label' => get_string('sortrating', 'repository_youtube')
109   - ),
110   - (object)array(
111   - 'value' => 'viewCount',
112   - 'label' => get_string('sortviewcount', 'repository_youtube')
113   - )
114   - );
115   - $sort->id = 'youtube_sort';
116   - $sort->name = 'youtube_sort';
117   - $sort->label = get_string('sortby', 'repository_youtube').': ';
118   - $ret['login'] = array($search, $sort);
  95 + $ret['login'] = array($search);
119 96 $ret['login_btn_label'] = get_string('search');
120 97 $ret['login_btn_action'] = 'search';
121 98 return $ret;

0 comments on commit acb05b5

Please sign in to comment.
Something went wrong with that request. Please try again.