Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sucs
accountmanager
Commits
7a8faca3
Commit
7a8faca3
authored
Mar 10, 2019
by
Imran Hussain
Browse files
Add a new option to delete menu to just get accounts markd for deletion
parent
580c9c0e
Changes
1
Show whitespace changes
Inline
Side-by-side
sucsam.py
View file @
7a8faca3
...
...
@@ -374,6 +374,7 @@ def deleteMenu(deleteArray):
print
(
"2. Add/delete users from delete list"
)
print
(
"3. Auto populate list of users to be deleted"
)
print
(
"3.1 Just add student accounts"
)
print
(
"3.5 Just add accounts marked as 'delete' in the DB"
)
print
(
"9. Do the delete"
)
print
(
"0. Go back to main menu"
)
...
...
@@ -413,6 +414,20 @@ def deleteMenu(deleteArray):
for
student
in
studentsBad
:
print
(
"Adding "
+
str
(
student
[
0
])
+
" to the list because the DB says: "
+
str
(
student
[
1
]))
deleteArray
.
append
(
student
[
0
])
elif
option
==
"3.5"
:
for
student
in
studentsBad
:
if
student
[
1
]
==
"delete"
:
print
(
"Adding "
+
str
(
student
[
0
])
+
" to the list because the DB says: "
+
str
(
student
[
1
]))
deleteArray
.
append
(
student
[
0
])
for
soc
in
societiesBad
:
if
soc
[
1
]
==
"delete"
:
print
(
"Adding "
+
str
(
soc
[
0
])
+
" to the list because the DB says: "
+
str
(
soc
[
1
]))
deleteArray
.
append
(
soc
[
0
])
for
ass
in
associatesBad
:
if
ass
==
"delete"
print
(
"Adding "
+
str
(
ass
[
0
])
+
" to the list because the DB says: "
+
str
(
ass
[
1
]))
deleteArray
.
append
(
ass
[
0
])
deleteMenu
(
deleteArray
)
elif
option
==
"9"
:
if
debugmode
>
0
:
print
(
"Debugmode is set. Doing No Deletes."
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment