Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
project_questboard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Aedin Hunter A. Clay
project_questboard
Commits
69976415
Commit
69976415
authored
Apr 09, 2021
by
Aedin Hunter A. Clay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When a questboard is created, redirects to new questboard. You can also copy questboard links now
parent
be289f52
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
views.py
homepage/views.py
+2
-2
board.html
templates/board/board.html
+13
-0
view_board.html
templates/board/view_board.html
+5
-0
No files found.
homepage/views.py
View file @
69976415
...
@@ -17,5 +17,5 @@ def add_questboard(request):
...
@@ -17,5 +17,5 @@ def add_questboard(request):
if
request
.
method
==
"POST"
:
if
request
.
method
==
"POST"
:
filled_form
=
QuestboardForm
(
request
.
POST
)
filled_form
=
QuestboardForm
(
request
.
POST
)
if
filled_form
.
is_valid
():
if
filled_form
.
is_valid
():
filled_form
.
save
()
new_questboard
=
filled_form
.
save
()
return
redirect
(
request
.
META
.
get
(
'HTTP_REFERER'
,
'/'
))
return
redirect
(
'/questboard/edit/'
+
str
(
new_questboard
.
id
))
\ No newline at end of file
\ No newline at end of file
templates/board/board.html
View file @
69976415
...
@@ -13,6 +13,19 @@
...
@@ -13,6 +13,19 @@
Required Stars: {{questboard.required_stars}}
<br/>
Required Stars: {{questboard.required_stars}}
<br/>
{{questboard.description}}
<br/>
{{questboard.description}}
<br/>
<!-- Copy questboard link -->
<button
onclick =
"copyQuestboardLink()"
>
Copy Questboard Link
</button><br/>
<script>
function
copyQuestboardLink
(){
var
link_area
=
document
.
createElement
(
"textarea"
)
document
.
body
.
appendChild
(
link_area
);
link_area
.
value
=
window
.
location
.
href
;
link_area
.
select
();
document
.
execCommand
(
"copy"
);
document
.
body
.
removeChild
(
link_area
);
}
</script>
{% block extra_content %}{% endblock %}
{% block extra_content %}{% endblock %}
...
...
templates/board/view_board.html
View file @
69976415
...
@@ -13,6 +13,10 @@
...
@@ -13,6 +13,10 @@
{% endblock %}
{% endblock %}
{% block extra_content %}
{% block extra_content %}
<!-- Display current URL so it can be copied and sent to students -->
<p>
Share this course by copying this link! :
</p>
<dialog
id =
"quest_signup"
>
<dialog
id =
"quest_signup"
>
Please enter your name to sign up for this quest.
Please enter your name to sign up for this quest.
<form
action =
"/questboard/view/student_signup/"
method =
"post"
>
<form
action =
"/questboard/view/student_signup/"
method =
"post"
>
...
@@ -44,5 +48,6 @@ function selectQuestToSignupFor(pk){
...
@@ -44,5 +48,6 @@ function selectQuestToSignupFor(pk){
}
}
</script>
</script>
{% endblock %}
{% endblock %}
\ No newline at end of file
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