Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 89... Línea 89...
89
    $yesno = array(get_string('no'), get_string('yes'));
89
    $yesno = array(get_string('no'), get_string('yes'));
Línea 90... Línea 90...
90
 
90
 
91
    // this query is horrible and has to be remapped afterwards, because of the non-uniqueness
91
    // this query is horrible and has to be remapped afterwards, because of the non-uniqueness
92
    // of the remoterep service (it has two plugins so far that use it)
92
    // of the remoterep service (it has two plugins so far that use it)
93
    // it's possible to get a unique list back using a subquery with LIMIT but that would break oracle
93
    // it's possible to get a unique list back using a subquery with LIMIT but that would break oracle
-
 
94
    // so it's best to just do this small query and then remap the results afterwards.
94
    // so it's best to just do this small query and then remap the results afterwards
95
    // TODO: Optimise the query, as Oracle-specific constraints no longer apply.
95
    $sql = '
96
    $sql = '
96
        SELECT DISTINCT
97
        SELECT DISTINCT
97
            ' . $DB->sql_concat('r.plugintype', "'_'", 'r.pluginname', "'_'", 's.name')  . ' AS uniqueid,
98
            ' . $DB->sql_concat('r.plugintype', "'_'", 'r.pluginname', "'_'", 's.name')  . ' AS uniqueid,
98
             s.name,
99
             s.name,