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

Commit 7ed3031a authored by Michael Breu's avatar Michael Breu 💬
Browse files

Including further concepts.

parent 737d7336
This diff is collapsed.
......@@ -82,7 +82,7 @@ public class SharingDemoResource {
* @return the ResponseEntity with status 200 (OK) and with body the exercise, or with status 404 (Not Found)
*/
@PostMapping("/sharingImport/basket/exercise/{exercisePosition}/README.md")
public ResponseEntity<String> getProblemStatement(@PathVariable("exercisePosition") int exercisePosition, @RequestBody SharingInfoDTO basketToken) throws IOException {
public ResponseEntity<String> getREADME(@PathVariable("exercisePosition") int exercisePosition, @RequestBody SharingInfoDTO basketToken) throws IOException {
InputStream repositoryStream = null;
try {
repositoryStream = exerciseSharingService.getCachedBasketItemStream(basketToken, exercisePosition);
......@@ -99,8 +99,8 @@ public class SharingDemoResource {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
StreamUtils.copy(zippedRepositoryStream, baos);
String statementString = baos.toString(StandardCharsets.UTF_8);
return ResponseEntity.ok().body(statementString);
String readMeString = baos.toString(StandardCharsets.UTF_8);
return ResponseEntity.ok().body(readMeString);
}
public ZipEntry getEntry(String path, ZipInputStream zippedRepositoryStream) throws IOException {
......
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { MarkdownModule } from 'ngx-markdown';
import './vendor';
import { PluginDemoSharedModule } from 'app/shared/shared.module';
import { PluginDemoCoreModule } from 'app/core/core.module';
......@@ -19,6 +21,7 @@ import { SharingInfo } from 'app/sharing/sharing.model';
@NgModule({
imports: [
BrowserModule,
MarkdownModule.forRoot(),
PluginDemoSharedModule,
PluginDemoCoreModule,
PluginDemoHomeModule,
......
......@@ -19,15 +19,18 @@
<div>The Shopping Basket contains
{{shoppingBasket.exerciseInfo.length}} element(s):</div>
<div *ngFor="let execInfo of shoppingBasket.exerciseInfo; index as i;">
<h3>{{i}} {{execInfo.title}}</h3>
<h3>{{i+1}}. {{execInfo.title}}</h3>
<div>gitLabURI: {{execInfo.gitLabURI}}</div>
<div>gitLabProjectId: {{execInfo.gitLabProjectId}}</div>
<div>
keywords: <span *ngFor="let keyword of execInfo.keywords">"{{keyword}}"
</span>
</div>
<h4>README.md</h4>
<div>{{readme[i]}}</div>
<h3>README.md</h3>
<div style="border: 2px solid gray;border-radius: 5px;">
<markdown [data]="readme[i]">
</markdown>
</div>
</div>
</div>
</div>
......
......@@ -47,6 +47,9 @@ export class SharingComponent implements OnInit {
}
getReadMe(exercisePosition: number): string {
return this.readme[exercisePosition];
}
/**
* Initialises the sharing page for import
......
......@@ -3,11 +3,12 @@ import { RouterModule } from '@angular/router';
import { CommonModule } from '@angular/common';
import { SharingComponent } from 'app/sharing/sharing.component';
import { featureOverviewState } from 'app/sharing/sharing.route';
import { MarkdownModule } from 'ngx-markdown';
const SHARING_ROUTES = [...featureOverviewState];
@NgModule({
imports: [CommonModule, RouterModule.forChild(SHARING_ROUTES)],
imports: [CommonModule, RouterModule.forChild(SHARING_ROUTES), MarkdownModule.forChild(),],
declarations: [SharingComponent],
})
......
Markdown is supported
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