Zwischenpush
This commit is contained in:
@@ -109,7 +109,9 @@ export default function CalenderView(p) {
|
||||
for (let k = 0; k < 20; k++) {
|
||||
if (en[i][k] != null) {
|
||||
|
||||
if (en[i][k].semesterid != currentsid) {
|
||||
|
||||
if (en[i][k].semesterid != currentsid)
|
||||
{
|
||||
for (let l = 0; l < 20; l++) {
|
||||
if (en[i][l] != null && en[i][l].usercreatedbyid != userid) {
|
||||
if (en[i][l].timestart <= en[i][k].timestart && en[i][l].timeend >= en[i][k].timeend) {
|
||||
|
||||
@@ -4,24 +4,21 @@ import {console} from "next/dist/compiled/@edge-runtime/primitives/console";
|
||||
|
||||
export default function StatusBar(p)
|
||||
{
|
||||
let testindex = 1;
|
||||
const modules = p.modules;
|
||||
const module = p.module;
|
||||
|
||||
let url = baseURL + "/entries/planned?sessionid=" + localStorage.getItem("sessionid");
|
||||
|
||||
fetch(url).then(response => response.json()).then(e => {
|
||||
modules.forEach(modules => {
|
||||
e.forEach(e => {
|
||||
if (e.moduleid == modules.id){
|
||||
testindex = 2;
|
||||
if (modules.activated == 0){
|
||||
testindex = 3;
|
||||
}
|
||||
fetch(url).then(response => response.json()).then(entries => {
|
||||
let testindex = 1;
|
||||
entries.forEach(e => {
|
||||
if (e.moduleid == module.id){
|
||||
testindex = 2;
|
||||
if (module.activated == 0){
|
||||
testindex = 3;
|
||||
}
|
||||
})
|
||||
|
||||
console.log(testindex);
|
||||
}
|
||||
})
|
||||
console.log(testindex);
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ export default function SubmitWarning(p){
|
||||
let url = baseURL + "/module?sessionid=" + localStorage.getItem("sessionid");
|
||||
|
||||
let json1 = {
|
||||
"id": 0,
|
||||
"id": localStorage.getItem("moduleid"),
|
||||
"userid": localStorage.getItem("userid"),
|
||||
"semesterid": localStorage.getItem("currentsid"),
|
||||
"name": localStorage.getItem("currentmodulename"),
|
||||
|
||||
@@ -68,7 +68,7 @@ export default function SemesteroverviewLecturer(p) {
|
||||
editable={false} text={semesterNames[index]} text2={e.name}
|
||||
onClick={(f) => onClickSemester(e, f, semesterNames[index])}
|
||||
/>
|
||||
<StatusBar progress={0} modules={entries}/>
|
||||
<StatusBar progress={0} module={e}/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -360,7 +360,7 @@ public class DataBaseHandler {
|
||||
st.executeUpdate("update modules set activated=" + m.getActivated() + ", semesterid=" + m.getsemesterid() + ", name='" + m.getName() + "' where id=" + m.getid());
|
||||
|
||||
|
||||
return null;
|
||||
return getModule(m.getid());
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
return null;
|
||||
|
||||
@@ -143,7 +143,6 @@ public class ModuleController
|
||||
{
|
||||
return new ResponseEntity<>(m, HttpStatus.OK);
|
||||
}
|
||||
|
||||
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user