Merge pull request #14588 from edx/efischer/kill_stuff
Kill edx-reverification-block
This commit is contained in:
@@ -535,9 +535,9 @@ class GetUserPartitionInfoTest(ModuleStoreTestCase):
|
||||
),
|
||||
UserPartition(
|
||||
id=1,
|
||||
name="Verification user partition",
|
||||
scheme=UserPartition.get_scheme("verification"),
|
||||
description="Verification user partition",
|
||||
name="Completely random user partition",
|
||||
scheme=UserPartition.get_scheme("random"),
|
||||
description="Random user partition",
|
||||
groups=[
|
||||
Group(id=0, name="Group C"),
|
||||
],
|
||||
@@ -562,9 +562,9 @@ class GetUserPartitionInfoTest(ModuleStoreTestCase):
|
||||
),
|
||||
UserPartition(
|
||||
id=1,
|
||||
name="Verification user partition",
|
||||
scheme=UserPartition.get_scheme("verification"),
|
||||
description="Verification user partition",
|
||||
name="Completely random user partition",
|
||||
scheme=UserPartition.get_scheme("random"),
|
||||
description="Random user partition",
|
||||
groups=[
|
||||
Group(id=0, name="Group C"),
|
||||
],
|
||||
@@ -574,7 +574,7 @@ class GetUserPartitionInfoTest(ModuleStoreTestCase):
|
||||
# Expect that the partition with no groups is excluded from the results
|
||||
partitions = self._get_partition_info()
|
||||
self.assertEqual(len(partitions), 1)
|
||||
self.assertEqual(partitions[0]["scheme"], "verification")
|
||||
self.assertEqual(partitions[0]["scheme"], "random")
|
||||
|
||||
def _set_partitions(self, partitions):
|
||||
"""Set the user partitions of the course descriptor. """
|
||||
|
||||
@@ -342,9 +342,9 @@ class GetItemTest(ItemTest):
|
||||
self.course.user_partitions = [
|
||||
UserPartition(
|
||||
id=0,
|
||||
name="Verification user partition",
|
||||
scheme=UserPartition.get_scheme("verification"),
|
||||
description="Verification user partition",
|
||||
name="Random user partition",
|
||||
scheme=UserPartition.get_scheme("random"),
|
||||
description="Random user partition",
|
||||
groups=[
|
||||
Group(id=0, name="Group A"),
|
||||
Group(id=1, name="Group B"),
|
||||
@@ -364,8 +364,8 @@ class GetItemTest(ItemTest):
|
||||
self.assertEqual(result["user_partitions"], [
|
||||
{
|
||||
"id": 0,
|
||||
"name": "Verification user partition",
|
||||
"scheme": "verification",
|
||||
"name": "Random user partition",
|
||||
"scheme": "random",
|
||||
"groups": [
|
||||
{
|
||||
"id": 0,
|
||||
|
||||
@@ -56,26 +56,6 @@ class AuthoringMixinTestCase(ModuleStoreTestCase):
|
||||
self.course.user_partitions = [self.content_partition]
|
||||
self.store.update_item(self.course, self.user.id)
|
||||
|
||||
def create_verification_user_partitions(self, checkpoint_names):
|
||||
"""
|
||||
Create user partitions for verification checkpoints.
|
||||
"""
|
||||
scheme = UserPartition.get_scheme("verification")
|
||||
self.course.user_partitions = [
|
||||
UserPartition(
|
||||
id=0,
|
||||
name=checkpoint_name,
|
||||
description="Verification checkpoint",
|
||||
scheme=scheme,
|
||||
groups=[
|
||||
Group(scheme.ALLOW, "Completed verification at {}".format(checkpoint_name)),
|
||||
Group(scheme.DENY, "Did not complete verification at {}".format(checkpoint_name)),
|
||||
],
|
||||
)
|
||||
for checkpoint_name in checkpoint_names
|
||||
]
|
||||
self.store.update_item(self.course, self.user.id)
|
||||
|
||||
def set_staff_only(self, item_location):
|
||||
"""Make an item visible to staff only."""
|
||||
item = self.store.get_item(item_location)
|
||||
@@ -149,14 +129,3 @@ class AuthoringMixinTestCase(ModuleStoreTestCase):
|
||||
'Content group no longer exists.'
|
||||
]
|
||||
)
|
||||
|
||||
def test_html_verification_checkpoints(self):
|
||||
self.create_verification_user_partitions(["Midterm A", "Midterm B"])
|
||||
self.verify_visibility_view_contains(
|
||||
self.video_location,
|
||||
[
|
||||
"Verification Checkpoint",
|
||||
"Midterm A",
|
||||
"Midterm B",
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<%
|
||||
from django.utils.translation import ugettext as _
|
||||
from openedx.core.djangoapps.credit.partition_schemes import VerificationPartitionScheme
|
||||
from contentstore.utils import ancestor_has_staff_lock, get_visibility_partition_info
|
||||
|
||||
partition_info = get_visibility_partition_info(xblock)
|
||||
user_partitions = partition_info["user_partitions"]
|
||||
cohort_partitions = partition_info["cohort_partitions"]
|
||||
verification_partitions = partition_info["verification_partitions"]
|
||||
has_selected_groups = partition_info["has_selected_groups"]
|
||||
selected_verified_partition_id = partition_info["selected_verified_partition_id"]
|
||||
|
||||
@@ -92,42 +90,6 @@ is_staff_locked = ancestor_has_staff_lock(xblock)
|
||||
% endfor
|
||||
% endfor
|
||||
|
||||
## Allow only one verification checkpoint to be selected at a time.
|
||||
% if verification_partitions:
|
||||
<div role="group" aria-labelledby="verification-access-title">
|
||||
<div id="verification-access-title" class="sr">${_('Verification Checkpoint')}</div>
|
||||
<div class="field field-checkbox field-visibility-verification">
|
||||
<input type="checkbox"
|
||||
id="verification-access-checkbox"
|
||||
name="verification-access-checkbox"
|
||||
class="input input-checkbox"
|
||||
value=""
|
||||
aria-describedby="verification-help-text"
|
||||
${'checked="checked"' if selected_verified_partition_id is not None else ''}
|
||||
/>
|
||||
<label for="verification-access-checkbox" class="label">
|
||||
${_('Verification Checkpoint')}:
|
||||
</label>
|
||||
|
||||
<label class="sr" for="verification-access-dropdown">
|
||||
${_('Verification checkpoint to complete')}
|
||||
</label>
|
||||
|
||||
<select id="verification-access-dropdown">
|
||||
% for partition in verification_partitions:
|
||||
<option
|
||||
value="${partition["id"]}"
|
||||
${ "selected" if partition["id"] == selected_verified_partition_id else ""}
|
||||
>${partition["name"]}</option>
|
||||
% endfor
|
||||
</select>
|
||||
|
||||
<div class="note" id="verification-help-text">
|
||||
${_("Learners who require verification must pass the selected checkpoint to see the content in this component. Learners who do not require verification see this content by default.")}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user