Student Progress Report

[10/02, 3:04 pm] Raviteja Cognizant: <div class="container text-center">

<h1 class="heading mt-5">Student Progress Report</h1>

<div class="mt-4">
<!-- first select -->
<select name="" id="" class="mx-3" (change)="selectClass($event)">
<option [value]="v.className" *ngFor="let v of Data">class{{v.className}}</option>
</select>

<!-- second select -->
<select name="" id="" class="mx-3" (change)="selectLevel($event)">
<option value="" active>Select-Level</option>
<option value="Above-Level">Above-Level</option>
<option value="On-Level">On-Level</option>
<option value="Below-Level">Below-level</option>
</select>

<!-- button -->
<button class="button mx-3" (click)="getResult()">Get Report</button>

</div>

<!-- table -->


<div class="mt-5" style="height: 30px;width: 100px; border: 2px solid #009DD1; background-color: #009DD1; color: white;">
Class Results
</div >
<table class="table table-responsive table-striped border" >
<thead style="border-bottom: 3px solid orange; border-top: 3px solid #009DD1;">
<th >studentName</th>
<th>rank</th>
<th>performanceLevel</th>
<th>MID1 SCORE OUT OF 600</th>
<th>MID2 SCORE OUT OF 600</th>
<th>FINAL SCORE OUT OF 600</th>
</thead>

<!--| orderBy: key : reverse -->
<tbody >
<tr *ngFor="let v of finalData ">
<td>{{v.studentName}}</td>
<td>{{v.rank}}</td>
<td *ngIf="v.completedPercent==lowPercentage">{{v.completedPercent}}<span class="dot2"></span><span>{{v.peformanceLevel}}</span></td>
<td *ngIf="v.completedPercent==mediumPercentage">{{v.completedPercent}}<span class="dot3"></span><span>{{v.peformanceLevel}}</span></td>
<td *ngIf="v.completedPercent==highPercentage">{{v.completedPercent}}<span class="dot1"></span><span>{{v.peformanceLevel}}</span></td>
<td>{{v.mid1Score}}</td>
<td>{{v.mid2score}}</td>
<td>{{v.finalscore}}</td>
</tr>
</tbody>
</table>

</div>
[10/02, 3:04 pm] Raviteja Cognizant: import { Component, OnInit } from '@angular/core';
import { UserService } from './user.service';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {

constructor(public userServiceObj:UserService) {}

Data:any;
finalData=[];
ngOnInit(): void {
this.userServiceObj.getData().subscribe({
next:(stdObj)=>{this.Data=stdObj.classes
this.Data.sort((x,y)=>(x.className>y.className)?-1:1)
//for finalData
stdObj.classes.forEach(element => {
if(element.className==10){
for(let v of element.studentresults){
this.finalData.push(v)
}
}
});},
error:(err)=>{console.log(err)}
})

}

class;
level;
selectClass(x){
this.class=x.target.value
}

selectLevel(y){
this.level=y.target.value
}

getResult(){
this.finalData.splice(0,this.finalData.length)
this.Data.forEach(stdObj => {
if(this.class==stdObj.className){
let stdResult = stdObj.studentresults
stdResult.forEach(resObj => {
if(resObj.peformanceLevel==this.level){
this.finalData.push(resObj)
}
});
}
});
}

lowPercentage="55%"
mediumPercentage="65%"
highPercentage="85%"



}
[10/02, 3:04 pm] Raviteja Cognizant: constructor(public httpClientSerObj:HttpClient ) { }

getData():Observable<any>{
return this.httpClientSerObj.get("https://jsonblob.com/api/jsonBolb/922847334786940928")
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.