Git Product home page Git Product logo

nau-openedx-extensions's People

Contributors

betofandino avatar felipemontoya avatar henrrypg avatar igobranco avatar mafermazu avatar morenol avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

edunext

nau-openedx-extensions's Issues

Add filter to block students to obtain certificate

From the internal ticket: https://plataforma-nau.atlassian.net/browse/FAN-107


Add a new filter that allows to block the students to obtain course certificate if the proctoring services are enabled on the course. This is needed for the course team to be able to check if any irregular activities were reported by the proctoring system.

Add a flag on STUDIO > Advanced settings > Other course settings

If the flag is true, then execute more code. Alternatively, if the key to the service is set in other course settings and the course is instructor paced activate this feature.

I think we should include the openedx_filters.learning.filters.CertificateCreationRequested filter available since Open edX Release Olive, on the NAU Open edX Lilac branch.

https://github.com/openedx/openedx-filters/blob/f61c59988f9a5d50dcb4cbcfe1d122ab05eb97f9/openedx_filters/learning/filters.py#L122

The custom code would be implemented by NAU. Nevertheless we need that eduNEXT send us a code block to be called by this code, that allow us to find all course activities in a course for an user of a specific type (SMOWL xblock).

Arguments:

  • course ( course_id ? )
  • user ( the user that the certificate would be generated)
  • xblock type

Output:

  • list of activities (ids)

Then for each list of activities for the course and user, we would call the SMOWL API and verify if the user is ok on all the activities. If not raise an error and disallow the certificate emission. There should also be a way to communicate this with the user, via a message on the progress tab.

This would be NAU responsibility to implement.


from opaque_keys.edx.keys import CourseKey
from xmodule.modulestore.django import modulestore
from django.contrib.auth import get_user_model
from lms.djangoapps.course_blocks.api import get_course_blocks
User = get_user_model()
def get_activities_ids(user_id, course_id, xblock_type):
    """function that returns the identifiers of the 
    blocks corresponding to the type of xblock consulted.
    Arguments:
    user_id -- User's integer identifier
    course_id -- String representation of the course to be consulted
    xblock_type -- String representation of the xblock to be consulted
    Returns:
        xblock_keys - A list of block_id corresponding to the xblock_type
    """
    xblock_keys =[]
    user = User.objects.get(id=user_id)
    course_key = CourseKey.from_string(course_id)
    course_usage_key = modulestore().make_course_usage_key(course_key)
    course_blocks = get_course_blocks(user, course_usage_key)
    block_keys = course_blocks.get_block_keys()
    for block_key in block_keys:
        if xblock_type in str(block_key):
            xblock_keys.append(block_key)
    return xblock_keys
# Example data
course_id = 'course-v1:org+id+run'
user_id = 4
xblock_type = 'scorm'
scorms = get_activities_ids(user_id, course_id, xblock_type)
print(scorms)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.