This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit be10ff13 authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

minor improvements

parent 0159db76
Branches
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
......@@ -461,8 +461,8 @@ public class MetaDataRepository {
LOGGER.warn("Found {} hits for exercise id {}, expected only one!", searchResponse.getHits().totalHits,
exerciseId);
}
for (SearchHit searchHit : searchResponse.getHits().getHits()) {
return parseSearchHit(searchHit, objectMapper);
if( searchResponse.getHits().getHits().length > 0) {
return parseSearchHit(searchResponse.getHits().getHits()[0], objectMapper);
}
} catch (JsonProcessingException e) {
throw new NotFoundException(" Exercise with id " + exerciseId + " not found?", e);
......
......@@ -3,7 +3,8 @@
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">README
<div class="modal-header">{{filename}}
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<!-- Modal body -->
......
......@@ -28,6 +28,7 @@ export class MarkDownViewerComponent implements OnInit, OnChanges {
ngOnInit(): void {
}
// eslint-disable-next-line
ngOnChanges(changes: SimpleChanges): void {
this.exerciseService.loadExerciseFile(this.exercise!.originalResult.project.project_id, 'README.md').subscribe(
(content) => { this.content = content; this.filename = 'README.md' },
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment