Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-proctoring
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
edx-proctoring
Commits
bc473987
Commit
bc473987
authored
Jul 01, 2015
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
touch up html and add a new field to model
parent
d5ade68d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
7 deletions
+85
-7
edx_proctoring/migrations/0002_auto__add_field_proctoredexamstudentattempt_taking_as_proctored.py
+73
-0
edx_proctoring/models.py
+4
-0
edx_proctoring/templates/proctoring/seq_proctored_exam_entrance.html
+8
-7
No files found.
edx_proctoring/migrations/0002_auto__add_field_proctoredexamstudentattempt_taking_as_proctored.py
0 → 100644
View file @
bc473987
# -*- coding: utf-8 -*-
from
south.utils
import
datetime_utils
as
datetime
from
south.db
import
db
from
south.v2
import
SchemaMigration
from
django.db
import
models
class
Migration
(
SchemaMigration
):
def
forwards
(
self
,
orm
):
# Adding field 'ProctoredExamStudentAttempt.taking_as_proctored'
db
.
add_column
(
'proctoring_proctoredexamstudentattempt'
,
'taking_as_proctored'
,
self
.
gf
(
'django.db.models.fields.BooleanField'
)(
default
=
False
),
keep_default
=
False
)
def
backwards
(
self
,
orm
):
# Deleting field 'ProctoredExamStudentAttempt.taking_as_proctored'
db
.
delete_column
(
'proctoring_proctoredexamstudentattempt'
,
'taking_as_proctored'
)
models
=
{
'edx_proctoring.proctoredexam'
:
{
'Meta'
:
{
'unique_together'
:
"(('course_id', 'content_id'),)"
,
'object_name'
:
'ProctoredExam'
,
'db_table'
:
"'proctoring_proctoredexam'"
},
'content_id'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
,
'db_index'
:
'True'
}),
'course_id'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
,
'db_index'
:
'True'
}),
'created'
:
(
'model_utils.fields.AutoCreatedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'exam_name'
:
(
'django.db.models.fields.TextField'
,
[],
{}),
'external_id'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
,
'null'
:
'True'
,
'db_index'
:
'True'
}),
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'is_active'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'False'
}),
'is_proctored'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'False'
}),
'modified'
:
(
'model_utils.fields.AutoLastModifiedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'time_limit_mins'
:
(
'django.db.models.fields.IntegerField'
,
[],
{})
},
'edx_proctoring.proctoredexamstudentallowance'
:
{
'Meta'
:
{
'unique_together'
:
"(('user_id', 'proctored_exam', 'key'),)"
,
'object_name'
:
'ProctoredExamStudentAllowance'
,
'db_table'
:
"'proctoring_proctoredexamstudentallowance'"
},
'created'
:
(
'model_utils.fields.AutoCreatedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'key'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
}),
'modified'
:
(
'model_utils.fields.AutoLastModifiedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'proctored_exam'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
"orm['edx_proctoring.ProctoredExam']"
}),
'user_id'
:
(
'django.db.models.fields.IntegerField'
,
[],
{}),
'value'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
})
},
'edx_proctoring.proctoredexamstudentallowancehistory'
:
{
'Meta'
:
{
'object_name'
:
'ProctoredExamStudentAllowanceHistory'
,
'db_table'
:
"'proctoring_proctoredexamstudentallowancehistory'"
},
'allowance_id'
:
(
'django.db.models.fields.IntegerField'
,
[],
{}),
'created'
:
(
'model_utils.fields.AutoCreatedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'key'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
}),
'modified'
:
(
'model_utils.fields.AutoLastModifiedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'proctored_exam'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
"orm['edx_proctoring.ProctoredExam']"
}),
'user_id'
:
(
'django.db.models.fields.IntegerField'
,
[],
{}),
'value'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
})
},
'edx_proctoring.proctoredexamstudentattempt'
:
{
'Meta'
:
{
'object_name'
:
'ProctoredExamStudentAttempt'
,
'db_table'
:
"'proctoring_proctoredexamstudentattempt'"
},
'completed_at'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{
'null'
:
'True'
}),
'created'
:
(
'model_utils.fields.AutoCreatedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'external_id'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
,
'null'
:
'True'
,
'db_index'
:
'True'
}),
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'modified'
:
(
'model_utils.fields.AutoLastModifiedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'proctored_exam'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
"orm['edx_proctoring.ProctoredExam']"
}),
'started_at'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{
'null'
:
'True'
}),
'status'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'64'
}),
'taking_as_proctored'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'False'
}),
'user_id'
:
(
'django.db.models.fields.IntegerField'
,
[],
{
'db_index'
:
'True'
})
}
}
complete_apps
=
[
'edx_proctoring'
]
\ No newline at end of file
edx_proctoring/models.py
View file @
bc473987
...
@@ -85,6 +85,10 @@ class ProctoredExamStudentAttempt(TimeStampedModel):
...
@@ -85,6 +85,10 @@ class ProctoredExamStudentAttempt(TimeStampedModel):
# what is the status of this attempt
# what is the status of this attempt
status
=
models
.
CharField
(
max_length
=
64
)
status
=
models
.
CharField
(
max_length
=
64
)
# if the user is attempting this as a proctored exam
# in case there is an option to opt-out
taking_as_proctored
=
models
.
BooleanField
()
class
Meta
:
class
Meta
:
""" Meta class for this Django model """
""" Meta class for this Django model """
db_table
=
'proctoring_proctoredexamstudentattempt'
db_table
=
'proctoring_proctoredexamstudentattempt'
...
...
edx_proctoring/templates/proctoring/seq_proctored_exam_entrance.html
View file @
bc473987
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</p>
</p>
<div
class=
"gated-sequence"
>
<div
class=
"gated-sequence"
>
<span><i
class=
"fa fa-lock"
></i></span>
<span><i
class=
"fa fa-lock"
></i></span>
<a
class=
"start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
>
<a
class=
"start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-choice=
"proctored"
>
{% trans "Yes, take this exam as a proctored exam (and be eligible for credit)" %}
{% trans "Yes, take this exam as a proctored exam (and be eligible for credit)" %}
</a>
</a>
<p>
<p>
...
@@ -24,11 +24,11 @@
...
@@ -24,11 +24,11 @@
of your exam. After successful installation, you will be
<strong>
guided through setting up your
of your exam. After successful installation, you will be
<strong>
guided through setting up your
proctored session and begin the exam immediately
</strong>
afterwards.
</p>
proctored session and begin the exam immediately
</strong>
afterwards.
</p>
{% endblocktrans %}
{% endblocktrans %}
<i
class=
"fa fa-arrow-circle-right"
></i>
<i
class=
"fa fa-arrow-circle-right
start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-choice=
"proctored
"
></i>
</div>
</div>
<div
class=
"gated-sequence"
>
<div
class=
"gated-sequence"
>
<span><i
class=
"fa fa-unlock"
></i></span>
<span><i
class=
"fa fa-unlock"
></i></span>
<a
class=
"start-timed-exam"
>
<a
class=
"start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-choice=
"unproctored"
>
{% trans "No, take this exam as an open exam (and not be eligible for credit)" %}
{% trans "No, take this exam as an open exam (and not be eligible for credit)" %}
</a>
</a>
<p>
<p>
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
credit
</strong>
upon completing the exam or this course in general.
credit
</strong>
upon completing the exam or this course in general.
{% endblocktrans %}
{% endblocktrans %}
</p>
</p>
<i
class=
"fa fa-arrow-circle-right"
></i>
<i
class=
"fa fa-arrow-circle-right
start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-choice=
"unproctored
"
></i>
</div>
</div>
</div>
</div>
{% include 'proctoring/seq_proctored_exam_footer.html' %}
{% include 'proctoring/seq_proctored_exam_footer.html' %}
...
@@ -47,13 +47,15 @@
...
@@ -47,13 +47,15 @@
function
(
event
)
{
function
(
event
)
{
var
action_url
=
$
(
this
).
data
(
'ajax-url'
);
var
action_url
=
$
(
this
).
data
(
'ajax-url'
);
var
exam_id
=
$
(
this
).
data
(
'exam-id'
);
var
exam_id
=
$
(
this
).
data
(
'exam-id'
);
var
choice
=
$
(
this
).
data
(
'choice'
);
if
(
typeof
action_url
===
"undefined"
)
{
if
(
typeof
action_url
===
"undefined"
)
{
return
false
;
return
false
;
}
}
$
.
post
(
$
.
post
(
action_url
,
action_url
,
{
{
"exam_id"
:
exam_id
"exam_id"
:
exam_id
,
"choice"
:
choice
},
},
function
(
data
)
{
function
(
data
)
{
// reload the page, because we've unlocked it
// reload the page, because we've unlocked it
...
@@ -62,4 +64,4 @@
...
@@ -62,4 +64,4 @@
);
);
}
}
);
);
</script>
</script>
\ 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