Esempio n. 1
0
def get_student_forums_usage(entry_id, xmodule_instance_args):
    """
    Generate a CSV of student forums usage and push it to S3.
    """
    action_name = ugettext_noop('generated')
    task_fn = partial(push_student_forums_data_to_s3, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 2
0
def get_ora2_responses(entry_id, xmodule_instance_args):
    """
    Generate a CSV of ora2 responses and push it to S3.
    """
    action_name = ugettext_noop('generated')
    task_fn = partial(push_ora2_responses_to_s3, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 3
0
def get_student_responses(entry_id, xmodule_instance_args):
    """
    Generate a CSV file of student responses to all course problems and store in S3.
    """
    action_name = ugettext_noop('generated')
    task_fn = partial(push_student_responses_to_s3, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 4
0
def calculate_grades_csv(entry_id, xmodule_instance_args):
    """
    Grade a course and push the results to an S3 bucket for download.
    """
    action_name = ugettext_noop('graded')
    task_fn = partial(push_grades_to_s3, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 5
0
def export_ora2_data(entry_id, xmodule_instance_args):
    """
    Generate a CSV of ora2 responses and push it to S3.
    """
    action_name = ugettext_noop("generated")
    task_fn = partial(upload_ora2_data, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 6
0
def calculate_grades_csv(entry_id, xmodule_instance_args):
    """
    Grade a course and push the results to an S3 bucket for download.
    """
    action_name = ugettext_noop('graded')
    task_fn = partial(push_grades_to_s3, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 7
0
def rescore_problem(entry_id, xmodule_instance_args):
    """Rescores a problem in a course, for all students or one specific student.

    `entry_id` is the id value of the InstructorTask entry that corresponds to this task.
    The entry contains the `course_id` that identifies the course, as well as the
    `task_input`, which contains task-specific input.

    The task_input should be a dict with the following entries:

      'problem_url': the full URL to the problem to be rescored.  (required)

      'student': the identifier (username or email) of a particular user whose
          problem submission should be rescored.  If not specified, all problem
          submissions for the problem will be rescored.

    `xmodule_instance_args` provides information needed by _get_module_instance_for_task()
    to instantiate an xmodule instance.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('rescored')
    update_fcn = partial(rescore_problem_module_state, xmodule_instance_args)

    def filter_fcn(modules_to_update):
        """Filter that matches problems which are marked as being done"""
        return modules_to_update.filter(state__contains='"done": true')

    visit_fcn = partial(perform_module_state_update, update_fcn, filter_fcn)
    return run_main_task(entry_id, visit_fcn, action_name)
Esempio n. 8
0
def rescore_problem(entry_id, xmodule_instance_args):
    """Rescores a problem in a course, for all students or one specific student.

    `entry_id` is the id value of the InstructorTask entry that corresponds to this task.
    The entry contains the `course_id` that identifies the course, as well as the
    `task_input`, which contains task-specific input.

    The task_input should be a dict with the following entries:

      'problem_url': the full URL to the problem to be rescored.  (required)

      'student': the identifier (username or email) of a particular user whose
          problem submission should be rescored.  If not specified, all problem
          submissions for the problem will be rescored.

    `xmodule_instance_args` provides information needed by _get_module_instance_for_task()
    to instantiate an xmodule instance.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('rescored')
    update_fcn = partial(rescore_problem_module_state, xmodule_instance_args)

    def filter_fcn(modules_to_update):
        """Filter that matches problems which are marked as being done"""
        return modules_to_update.filter(state__contains='"done": true')

    visit_fcn = partial(perform_module_state_update, update_fcn, filter_fcn)
    return run_main_task(entry_id, visit_fcn, action_name)
Esempio n. 9
0
def export_ora2_data(entry_id, xmodule_instance_args):
    """
    Generate a CSV of ora2 responses and push it to S3.
    """
    action_name = ugettext_noop('generated')
    task_fn = partial(upload_ora2_data, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 10
0
def calculate_grades_csv(entry_id, xmodule_instance_args):
    """
    Grade a course and push the results to an S3 bucket for download.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('graded')
    task_fn = partial(upload_grades_csv, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 11
0
def proctored_exam_results_csv(entry_id, xmodule_instance_args):
    """
    Compute proctored exam results report for a course and upload the
    CSV for download.
    """
    action_name = 'generating_proctored_exam_results_report'
    task_fn = partial(upload_proctored_exam_results_report, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 12
0
def calculate_grades_csv(entry_id, xmodule_instance_args):
    """
    Grade a course and push the results to an S3 bucket for download.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('graded')
    task_fn = partial(push_grades_to_s3, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 13
0
def generate_certificate_task_class(entry_id, xmodule_instance_args):
    """
    Task class used in submit_generate_certificate.
    """

    action_name = ugettext_noop('certified')
    task_fn = partial(generate_certificate, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 14
0
def generate_certificate_task_class(entry_id, xmodule_instance_args):
    """
    Task class used in submit_generate_certificate.
    """
    
    action_name = ugettext_noop('certified')
    task_fn = partial(generate_certificate, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 15
0
def proctored_exam_results_csv(entry_id, xmodule_instance_args):
    """
    Compute proctored exam results report for a course and upload the
    CSV for download.
    """
    action_name = "generating_proctored_exam_results_report"
    task_fn = partial(upload_proctored_exam_results_report, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 16
0
def calculate_students_features_csv(entry_id, xmodule_instance_args):
    """
    Compute student profile information for a course and upload the
    CSV to an S3 bucket for download.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('generated')
    task_fn = partial(upload_students_csv, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 17
0
def calculate_students_features_csv(entry_id, xmodule_instance_args):
    """
    Compute student profile information for a course and upload the
    CSV to an S3 bucket for download.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('generated')
    task_fn = partial(push_students_csv_to_s3, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 18
0
def calculate_problem_responses_csv(entry_id, xmodule_instance_args):
    """
    Compute student answers to a given problem and upload the CSV to
    an S3 bucket for download.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('generated')
    task_fn = partial(upload_problem_responses_csv, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 19
0
def exec_summary_report_csv(entry_id, xmodule_instance_args):
    """
    Compute executive summary report for a course and upload the
    Html generated report to an S3 bucket for download.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = 'generating_exec_summary_report'
    task_fn = partial(upload_exec_summary_report, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 20
0
def cohort_students(entry_id, xmodule_instance_args):
    """
    Cohort students in bulk, and upload the results.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    # An example of such a message is: "Progress: {action} {succeeded} of {attempted} so far"
    action_name = ugettext_noop('cohorted')
    task_fn = partial(cohort_students_and_upload, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 21
0
def exec_summary_report_csv(entry_id, xmodule_instance_args):
    """
    Compute executive summary report for a course and upload the
    Html generated report to an S3 bucket for download.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = "generating_exec_summary_report"
    task_fn = partial(upload_exec_summary_report, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 22
0
def course_survey_report_csv(entry_id, xmodule_instance_args):
    """
    Compute the survey report for a course and upload the
    generated report to an S3 bucket for download.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('generated')
    task_fn = partial(upload_course_survey_report, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 23
0
def course_survey_report_csv(entry_id, xmodule_instance_args):
    """
    Compute the survey report for a course and upload the
    generated report to an S3 bucket for download.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop("generated")
    task_fn = partial(upload_course_survey_report, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 24
0
def cohort_students(entry_id, xmodule_instance_args):
    """
    Cohort students in bulk, and upload the results.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    # An example of such a message is: "Progress: {action} {succeeded} of {attempted} so far"
    action_name = ugettext_noop('cohorted')
    task_fn = partial(cohort_students_and_upload, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 25
0
def calculate_problem_responses_csv(entry_id, xmodule_instance_args):
    """
    Compute student answers to a given problem and upload the CSV to
    an S3 bucket for download.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop("generated")
    task_fn = partial(upload_problem_responses_csv, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 26
0
def calculate_may_enroll_csv(entry_id, xmodule_instance_args):
    """
    Compute information about invited students who have not enrolled
    in a given course yet and upload the CSV to an S3 bucket for
    download.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop("generated")
    task_fn = partial(upload_may_enroll_csv, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 27
0
def calculate_may_enroll_csv(entry_id, xmodule_instance_args):
    """
    Compute information about invited students who have not enrolled
    in a given course yet and upload the CSV to an S3 bucket for
    download.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('generated')
    task_fn = partial(upload_may_enroll_csv, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 28
0
def calculate_grades_csv(entry_id, xmodule_instance_args):
    """
    Grade a course and push the results to an S3 bucket for download.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('graded')
    TASK_LOG.info(
        u"Task: %s, InstructorTask ID: %s, Task type: %s, Preparing for task execution",
        xmodule_instance_args.get('task_id'), entry_id, action_name)

    task_fn = partial(upload_grades_csv, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 29
0
def generate_certificates(entry_id, xmodule_instance_args):
    """
    Grade students and generate certificates.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('certificates generated')
    TASK_LOG.info(
        u"Task: %s, InstructorTask ID: %s, Task type: %s, Preparing for task execution",
        xmodule_instance_args.get('task_id'), entry_id, action_name)

    task_fn = partial(generate_students_certificates, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 30
0
def calculate_grades_csv(entry_id, xmodule_instance_args):
    """
    Grade a course and push the results to an S3 bucket for download.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('graded')
    TASK_LOG.info(
        u"Task: %s, InstructorTask ID: %s, Task type: %s, Preparing for task execution",
        xmodule_instance_args.get('task_id'), entry_id, action_name
    )

    task_fn = partial(upload_grades_csv, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 31
0
def calculate_problem_grade_report(entry_id, xmodule_instance_args):
    """
    Generate a CSV for a course containing all students' problem
    grades and push the results to an S3 bucket for download.
    """
    # Translators: This is a past-tense phrase that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('problem distribution graded')
    TASK_LOG.info(
        u"Task: %s, InstructorTask ID: %s, Task type: %s, Preparing for task execution",
        xmodule_instance_args.get('task_id'), entry_id, action_name)

    task_fn = partial(upload_problem_grade_report, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 32
0
def generate_certificates(entry_id, xmodule_instance_args):
    """
    Grade students and generate certificates.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('certificates generated')
    TASK_LOG.info(
        u"Task: %s, InstructorTask ID: %s, Task type: %s, Preparing for task execution",
        xmodule_instance_args.get('task_id'), entry_id, action_name
    )

    task_fn = partial(generate_students_certificates, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 33
0
def calculate_problem_grade_report(entry_id, xmodule_instance_args):
    """
    Generate a CSV for a course containing all students' problem
    grades and push the results to an S3 bucket for download.
    """
    # Translators: This is a past-tense phrase that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('problem distribution graded')
    TASK_LOG.info(
        u"Task: %s, InstructorTask ID: %s, Task type: %s, Preparing for task execution",
        xmodule_instance_args.get('task_id'), entry_id, action_name
    )

    task_fn = partial(upload_problem_grade_report, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 34
0
def send_bulk_course_email(entry_id, _xmodule_instance_args):
    """Sends emails to recipients enrolled in a course.

    `entry_id` is the id value of the InstructorTask entry that corresponds to this task.
    The entry contains the `course_id` that identifies the course, as well as the
    `task_input`, which contains task-specific input.

    The task_input should be a dict with the following entries:

      'email_id': the full URL to the problem to be rescored.  (required)

    `_xmodule_instance_args` provides information needed by _get_module_instance_for_task()
    to instantiate an xmodule instance.  This is unused here.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('emailed')
    visit_fcn = perform_delegate_email_batches
    return run_main_task(entry_id, visit_fcn, action_name)
Esempio n. 35
0
def send_bulk_course_email(entry_id, _xmodule_instance_args):
    """Sends emails to recipients enrolled in a course.

    `entry_id` is the id value of the InstructorTask entry that corresponds to this task.
    The entry contains the `course_id` that identifies the course, as well as the
    `task_input`, which contains task-specific input.

    The task_input should be a dict with the following entries:

      'email_id': the full URL to the problem to be rescored.  (required)

    `_xmodule_instance_args` provides information needed by _get_module_instance_for_task()
    to instantiate an xmodule instance.  This is unused here.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('emailed')
    visit_fcn = perform_delegate_email_batches
    return run_main_task(entry_id, visit_fcn, action_name)
Esempio n. 36
0
def delete_problem_state(entry_id, xmodule_instance_args):
    """Deletes problem state entirely for all students on a particular problem in a course.

    `entry_id` is the id value of the InstructorTask entry that corresponds to this task.
    The entry contains the `course_id` that identifies the course, as well as the
    `task_input`, which contains task-specific input.

    The task_input should be a dict with the following entries:

      'problem_url': the full URL to the problem to be rescored.  (required)

    `xmodule_instance_args` provides information needed by _get_module_instance_for_task()
    to instantiate an xmodule instance.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('deleted')
    update_fcn = partial(delete_problem_module_state, xmodule_instance_args)
    visit_fcn = partial(perform_module_state_update, update_fcn, None)
    return run_main_task(entry_id, visit_fcn, action_name)
Esempio n. 37
0
def delete_problem_state(entry_id, xmodule_instance_args):
    """Deletes problem state entirely for all students on a particular problem in a course.

    `entry_id` is the id value of the InstructorTask entry that corresponds to this task.
    The entry contains the `course_id` that identifies the course, as well as the
    `task_input`, which contains task-specific input.

    The task_input should be a dict with the following entries:

      'problem_url': the full URL to the problem to be rescored.  (required)

    `xmodule_instance_args` provides information needed by _get_module_instance_for_task()
    to instantiate an xmodule instance.
    """
    # Translators: This is a past-tense verb that is inserted into task progress messages as {action}.
    action_name = ugettext_noop('deleted')
    update_fcn = partial(delete_problem_module_state, xmodule_instance_args)
    visit_fcn = partial(perform_module_state_update, update_fcn, None)
    return run_main_task(entry_id, visit_fcn, action_name)
Esempio n. 38
0
def prepare_ora2_submissions_task(entry_id, _xmodule_instance_args):
    action_name = "generated"
    return run_main_task(entry_id, prepare_ora2_submissions, action_name)
Esempio n. 39
0
def answers_distribution_report_generation_task_class(entry_id,
                                                      _xmodule_instance_args):
    action_name = "answers_distribution_report"
    return run_main_task(entry_id, generate_answers_distribution_report,
                         action_name)
Esempio n. 40
0
def create_pgreport_csv(entry_id, xmodule_instance_args):
    """"""
    action_name = ugettext_noop('reported')
    #task_fn = push_students_report
    task_fn = partial(push_students_report, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 41
0
def create_pgreport_csv(entry_id, xmodule_instance_args):
    """"""
    action_name = ugettext_noop('reported')
    #task_fn = push_students_report
    task_fn = partial(push_students_report, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)
Esempio n. 42
0
def answers_distribution_report_generation_task_class(entry_id, _xmodule_instance_args):
    action_name = "answers_distribution_report"
    return run_main_task(entry_id, generate_answers_distribution_report, action_name)
Esempio n. 43
0
def prepare_ora2_submissions_task(entry_id, _xmodule_instance_args):
    action_name = "generated"
    return run_main_task(entry_id, prepare_ora2_submissions, action_name)
Esempio n. 44
0
def answers_distribution_report_generation_task_class(entry_id, xmodule_instance_args):
    action_name = ugettext_noop('quizzresults')
    task_fn = partial(generate_answers_distribution_report, xmodule_instance_args)
    return run_main_task(entry_id, task_fn, action_name)