Skip to content
Snippets Groups Projects
Commit 2530b6ff authored by Dennis Baurichter's avatar Dennis Baurichter
Browse files

Rename "collateral" to "deposit"

See #67
parent ec05aba8
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,7 @@ ausgeliehen.
<td>${lending.student} (${lending.student_imt})</td>
<td>${"; ".join(["%s (%s)"%(lending.folder_names[i],lending.folder_ids[i]) for i in range(len(lending.folder_names))])}</td>
<td>${lending.mass}</td>
<td>${lending.collateral}</td>
<td>${lending.deposit}</td>
<td>
% if days_lended>=7:
<span class="ancient-lending">Verliehen seit ${days_lended} Tagen!</span>
......
......@@ -91,9 +91,9 @@
request.send();
}
</script>
<label class="control-label" for="collateral">Pfand:</label>
<input type="text" name="collateral"
value="${args["collateral"] if "collateral" in args else ""}"
<label class="control-label" for="deposit">Pfand:</label>
<input type="text" name="deposit"
value="${args["deposit"] if "deposit" in args else ""}"
class="form-control" />
<input type="submit" name="commit"
value="(W)eiter: Ausleihen"
......@@ -125,7 +125,7 @@
</tr>
<tr>
<th>Pfand</th>
<td>${lendingInfo.collateral}</td>
<td>${lendingInfo.deposit}</td>
</tr>
</table>
<input type="hidden" name="action"
......
......@@ -13,7 +13,7 @@ The process of lending and returning requires there to be:
- A register to take note of lent folders in, as well as marking returned
folders as such. This is only a fallback solution in case the digital
system breaks down.
- A secure container for storing collaterals collected as an incentive for
- A secure container for storing deposits collected as an incentive for
students to actually return the folders issued to them.
- A scale. As we do not know what students do with folders and it is not
entirely out of the question that they accidentally remove parts of the
......@@ -43,12 +43,12 @@ performed as follows:
the name of the issuing person and the name of the receiving person.
The name entered for the receiving person should allow to write them mails
in case of problems.
5. The student is asked to leave a collateral. Useful items to accept are
a 10€ or 20€ bill, the student ID (make sure it is current) or a
driver's license. Please note that keeping the personal ID of a student
as collateral is illegal under German law.
6. The type of collateral used is noted in the tool and input is confirmed
7. The collateral is collected and placed in the designated container.
5. The student is asked to leave a deposit. Useful items to accept are a 10€
or 20€ bill, the student ID (make sure it is current) or a driver's
license. Please note that keeping the personal ID of a student as deposit
is illegal under German law.
6. The type of deposit used is noted in the tool and input is confirmed
7. The deposit is collected and placed in the designated container.
8. The folders are handed to the student, telling them to return them as soon
as they are done with them.
......@@ -74,7 +74,7 @@ process of returning:
is a good indication for manipulation of the folders' content. Should
such a discrepancy exist, the student is asked to double-check the
content.
5. The collateral left by the student is retrieved and returned to them.
5. The deposit left by the student is retrieved and returned to them.
6. The name of the issuing person is entered into the web page and input is
confirmed.
7. The folders are returned to their storage.
......@@ -123,7 +123,7 @@ as well as the date of doing so, e.g.:
"mass": "1334",
"folder_ids": [ 1281, 2312 ],
"folder_names" : ["Mathematical Formalism","Introduction to Epistemology"],
"collateral": "vanilla ice cream"
"deposit": "vanilla ice cream"
"in_by":null,
"in_date":null
}
......
......@@ -33,7 +33,7 @@ anon_strings={
#
lending_t=namedtuple(
"lending_t",
"out_by out_date student student_imt mass folder_ids folder_names collateral in_by in_date")
"out_by out_date student student_imt mass folder_ids folder_names deposit in_by in_date")
## \brief Sturcutre used for representing sets of folders being currently
# lended to a student.
......@@ -249,11 +249,11 @@ class LendingRegistry:
# \param str#to_imt Structural name of the receiver. This is used to derive
# the mail address of the receiver in case they need to be notified.
# \param str|int#mass Cumulative mass of the folders lended out.
# \param str|#collateral Type of collateral received in return for the folders.
# \param str|#deposit Type of deposit received in return for the folders.
# \returns lending_t representing the new lending process.
# \throws LendingException If any of the folders is already lended.
# \throws LendingException If one of the folders does not exist.
def lendFolders(s,ids,by,to,to_imt,mass,collateral):
def lendFolders(s,ids,by,to,to_imt,mass,deposit):
openFolders=s.openFolders
allFolders=folders.FolderRegistry.Get().folders
......@@ -276,7 +276,7 @@ class LendingRegistry:
mass=mass,
folder_ids=folder_ids,
folder_names=folder_names,
collateral=collateral,
deposit=deposit,
in_by=None,
in_date=None)
......
......@@ -201,14 +201,14 @@ class Handler:
# requesting folders.
# \param mass GET/POST parameter containing the cumulative mass of the folders
# in question.
# \param collateral GET/POST parameter containing the type of collateral
# left by the student.
# \param deposit GET/POST parameter containing the type of deposit left by
# the student.
# \returns "lending" if an error occured and the lending process has to
# be continued, None if it has finished or needs to be aborted.
def handle_lend(
s,messages=list(),data=dict(),
folderList="",issuer="",receiver="",mass="",collateral="",
folderList="",issuer="",receiver="",mass="",deposit="",
**kwargs):
# re-process the folder list and ensure that they are a valid set of
......@@ -226,7 +226,7 @@ class Handler:
issuer=issuer.strip()
receiver=receiver.strip()
mass=mass.strip()
collateral=collateral.strip()
deposit=deposit.strip()
succ=True
......@@ -243,7 +243,7 @@ class Handler:
"error","Fehlende Eingabe",
"Kein Gewicht angegeben oder falsche Eingabe"))
succ=False
if collateral=="":
if deposit=="":
messages.append(message_t(
"error","Fehlende Eingabe",
"Kein Pfand angegeben"))
......@@ -283,7 +283,7 @@ class Handler:
to=receiver_name,
to_imt=receiver,
mass=mass,
collateral=collateral)
deposit=deposit)
except Exception as e:
messages.append(message_t(
"error","Interner Fehler",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment