Skip to content
Snippets Groups Projects
Commit 76577865 authored by srosse's avatar srosse
Browse files

OO-420: merge to the default branch

parent 467d44e2
No related branches found
No related tags found
No related merge requests found
#Sun Dec 23 13:08:07 CET 2012
imadmin.form.title=Konfiguracja komunikatora HTML
imadmin.plugin.admin.connection=Zrestartuj po\u0142\u0105czenie. Niezb\u0119dne tylko wtedy, gdy automatyczne po\u0142\u0105czenie nie zadzia\u0142a. Sprawd\u017A w panelu administracyjnym serwera IM, czy nast\u0105pi\u0142 restart sesji u\u017Cytkownika "admin".
imadmin.plugin.admin.connection.done=Restart wykonany\! Sprawd\u017A sesje w panelu administracyjnym serwera IM.
imadmin.plugin.admin.reconnect=reconnect
imadmin.plugin.check=sprawd\u017A
imadmin.plugin.check.info=Sprawd\u017A wersj\u0119 wtyczki serwera IM.
imadmin.plugin.intro=OLAT komunikuje si\u0119 z serwerem IM <a target\="_blank" href\="http\://www.igniterealtime.org/projects/openfire/">Openfire</a> za pomoc\u0105 odpowiedniej wtyczki. Dzi\u0119ki niej mo\u017Cliwa jest obs\u0142uga u\u017Cytkownik\u00F3w i grup utworzonych w OLAT przez serwer Openfire. Aby zainstalowa\u0107 wtyczk\u0119, pobierz j\u0105 <a target\="_blank" href\="http\://www.openolat.org/fileadmin/downloads/olatUserAndGroupService.jar">st\u0105d</a> i za\u0142aduj przez panel administracyjny serwera Openfire.
imadmin.plugin.title=Komunikacja z serwerem IM
imadmin.plugin.version=Odpowied\u017A na zapytanie wtyczki\: {0}
imadmin.plugin.webconsole=Otw\u00F3rz panel administracyjny www serwera Openfire\: <a target\="_blank" href\="http\://{0}\:9090/">http\://{0}\:9090/</a> i zaloguj si\u0119 z loginem administracyjnym\: <b>{1}</b> z has\u0142em\: <b>{2}</b>
imadmin.sync.cmd.dosync=Rozpocznij synchronizacj\u0119
imadmin.sync.cmd.dosync.caption=Proces synchronizacji w toku. To mo\u017Ce zaj\u0105\u0107 troch\u0119 czasu. Prosimy o cierpliwo\u015B\u0107...
imadmin.sync.failed=Serwer komunikatora jest nieosi\u0105galny. Proces synchronizacji anulowano.
imadmin.sync.intro=Proces synchronizacji uaktualni wszystkie grupy projekt\u00F3w i grupy edukacyjne do postaci grup na serwerze komunikatora. Ta operacja ma sens, je\u015Bli serwer komunikatora by\u0142 chwiliowo niedost\u0119pny.
imadmin.sync.title=Synchronizacja z serwerem komunikatora
imadmin.title=Administracja serwera IM (Instant Messaging)
imadming.chatpolltime=Chat poll time in [msec]
imadming.chatpolltime.default=Domy\u015Blnie {0} millisekund
imadming.idlepolltime=Idle poll time in [msec]
imadming.idlepolltime.default=Domy\u015Blnie {0} millisekund
sync.all.users=Synchronizuj u\u017Cytkownik\u00F3w
......@@ -31,7 +31,6 @@ import javax.persistence.Query;
import javax.persistence.TypedQuery;
import org.olat.basesecurity.IdentityShort;
import org.olat.basesecurity.SecurityGroupMembershipImpl;
import org.olat.core.commons.persistence.DB;
import org.olat.core.id.Identity;
import org.olat.core.manager.BasicManager;
......@@ -46,6 +45,7 @@ import org.olat.modules.coach.model.GroupStatEntry;
import org.olat.modules.coach.model.StudentStatEntry;
import org.olat.repository.RepositoryEntry;
import org.olat.repository.RepositoryManager;
import org.olat.repository.model.RepositoryEntryStrictTutor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -69,16 +69,12 @@ public class CoachingManagerImpl extends BasicManager implements CoachingManager
@Override
public boolean isCoach(Identity coach) {
try {
StringBuilder query = new StringBuilder();
query.append("select count(re) from ").append(RepositoryEntry.class.getName()).append(" as re ")
.append(" inner join re.tutorGroup as tutorSecGroup ")
.append(" where tutorSecGroup in (")
.append(" select tutorSgmi.securityGroup from ").append(SecurityGroupMembershipImpl.class.getName()).append(" as tutorSgmi ")
.append(" where tutorSgmi.identity.key=:coachKey")
.append(" )");
StringBuilder sb = new StringBuilder();
sb.append("select count(vmember.key) from ").append(RepositoryEntryStrictTutor.class.getName()).append(" vmember")
.append(" where vmember.repoTutorKey=:identityKey or vmember.groupOwnerKey=:identityKey");
TypedQuery<Number> dbQuery = dbInstance.getCurrentEntityManager().createQuery(query.toString(), Number.class);
dbQuery.setParameter("coachKey", coach.getKey());
TypedQuery<Number> dbQuery = dbInstance.getCurrentEntityManager().createQuery(sb.toString(), Number.class);
dbQuery.setParameter("identityKey", coach.getKey());
Number entries = (Number)dbQuery.getSingleResult();
return entries.intValue() > 0;
} catch (Exception e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment