Skip to content

Commit

Permalink
Merge branch 'dev' into CSCEXAM-693-3
Browse files Browse the repository at this point in the history
  • Loading branch information
lupari authored Jun 19, 2024
2 parents 2b99131 + 2dee393 commit d6d34a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private Exam prepareDraft(User user) {

@Authenticated
@Restrict({ @Group("ADMIN"), @Group("TEACHER") })
public CompletionStage<Result> searchExams(Http.Request request, final Optional<String> filter) {
public CompletionStage<Result> searchExams(Http.Request request, Optional<String> filter) {
WSRequest wsRequest = getSearchRequest(filter);
User user = request.attrs().get(Attrs.AUTHENTICATED_USER);
String homeOrg = configReader.getHomeOrganisationRef();
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/enrolment/enrolment.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class EnrolmentService {
this.http.get<CollaborativeParticipation[]>('/app/iop/student/finishedExams');

searchExams$ = (searchTerm: string): Observable<CollaborativeExam[]> => {
const paramStr = '?filter=' + (searchTerm?.length > 0 ? encodeURIComponent(searchTerm) : '');
const paramStr = searchTerm ? `?filter=${encodeURIComponent(searchTerm)}` : '';
const path = `/app/iop/enrolment${paramStr}`;
return this.http.get<CollaborativeExam[]>(path);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class CollaborativeExamService {
createExam$ = (): Observable<CollaborativeExam> => this.http.post<CollaborativeExam>('/app/iop/exams', {});

searchExams$ = (searchTerm: string): Observable<CollaborativeExam[]> => {
const paramStr = '?filter=' + (searchTerm && searchTerm.length > 0 ? encodeURIComponent(searchTerm) : '');
const paramStr = searchTerm ? `?filter=${encodeURIComponent(searchTerm)}` : '';
const path = `/app/iop/exams${paramStr}`;
return this.http.get<CollaborativeExam[]>(path);
};
Expand Down

0 comments on commit d6d34a1

Please sign in to comment.