GithubHelp home page GithubHelp logo

abelardopardo / ontask_b Goto Github PK

View Code? Open in Web Editor NEW
41.0 41.0 36.0 348.87 MB

A platform offering teachers and educational designers the capacity to use data to personalise the learner experience.

Home Page: https://ontasklearning.org

License: MIT License

Python 49.82% HTML 6.03% JavaScript 40.06% CSS 4.03% Shell 0.06%
django ontask python students teaching

ontask_b's People

Contributors

abelardopardo avatar andrew-gardener avatar anthonysymons avatar dependabot[bot] avatar leonromo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ontask_b's Issues

upload Excel file: default sheet name is incorrect

When uploading an Excel file, the sheet name field is pre-populated with "Sheet 1". The default sheet name in Excel (for Mac v. 16.12) is "Sheet1". The subtle difference results in failure to upload the file.

Some solutions:

  • leave the sheet field blank for the user to fill in
  • pre-populate with "Sheet1" instead
  • populate with the name of the first sheet in the workbook (after the user selects the file)
  • populate a dropdown list of the sheet names in the workbook (after the user selects the file)

Large messages in Action Out break interface

Large messages (mine is more than 4000 characters) break features of the UI in the Action Out page. When the message is large, the 'Save' button works, but the 'Preview', '+Add Filter', and '+ New'(Condition) buttons cause the page to reload, rather than displaying their usual pop-up windows.

When I delete a significant portion of the message and re-save, the buttons regain their usual functionality.

(OnTask Version B.2.3.1)

Workflow exports don't have descriptive names

Exported workflows are all called ontask_workflow.gz

It would be helpful if the filename was more descriptive. Perhaps include the name of the workflow and the timestamp of when the export was generated?

make html error

Going through the installation steps tend to get the following errors at
step: 11 make html

Traceback (most recent call last):
  File "/home/ec2-user/anaconda2/lib/python2.7/site-packages/Sphinx-1.5.1-py2.7.egg/sphinx/__main__.py", line 14, in <module>
    sys.exit(main(sys.argv))
  File "/home/ec2-user/anaconda2/lib/python2.7/site-packages/Sphinx-1.5.1-py2.7.egg/sphinx/__init__.py", line 66, in main
    sys.exit(build_main(argv))
  File "/home/ec2-user/anaconda2/lib/python2.7/site-packages/Sphinx-1.5.1-py2.7.egg/sphinx/__init__.py", line 76, in build_main
    from sphinx import cmdline
  File "/home/ec2-user/anaconda2/lib/python2.7/site-packages/Sphinx-1.5.1-py2.7.egg/sphinx/cmdline.py", line 14, in <module>
    import optparse
  File "/home/ec2-user/anaconda2/lib/python2.7/optparse.py", line 419, in <module>
    _builtin_cvt = { "int" : (_parse_int, _("integer")),
  File "/home/ec2-user/anaconda2/lib/python2.7/gettext.py", line 642, in gettext
    return dgettext(_current_domain, message)
  File "/home/ec2-user/anaconda2/lib/python2.7/gettext.py", line 606, in dgettext
    codeset=_localecodesets.get(domain))
  File "/home/ec2-user/anaconda2/lib/python2.7/gettext.py", line 541, in translation
    mofiles = find(domain, localedir, languages, all=1)
  File "/home/ec2-user/anaconda2/lib/python2.7/gettext.py", line 513, in find
    for nelang in _expand_lang(lang):
  File "/home/ec2-user/anaconda2/lib/python2.7/gettext.py", line 206, in _expand_lang
    from locale import normalize
ImportError: cannot import name normalize
make: *** [html] Error 1

And also :
step 9 : python manage.py loaddata ontask/initial_data.json
(file not present the mentioned path)

Add view function

The 'Add view' feature is accessed via the Add view button on the Table page. This uses a lightbox effect to pop up the 'Add view' panel. The problem is that the 'Add view' panel can be closed by clicking anywhere within the dark grey area outside the 'Add view' panel (not just via the close button at the top of the panel). Therefore, if the user has entered any details into the various form fields, then accidentally clicks the grey area outside the panel, the panel closes and they lose their work.

Missing data is handled differently by Filters and Conditions

Filters and Conditions behave differently with missing data. This is unexpected. It seems to me that either both should handle missing data, or both should raise errors to the user when they encounter missing data.

Example: I have used "my_column >= 1" as a Filter, which drops rows with no value for 'my_column'. The same rule used as a Condition (again, with missing data) causes an error to be displayed in the preview window:

This preview could not be produced because the row in the table does not have values in the
following variables:

  • my_column

Review the conditions in the action or use a filter to exclude these entries.

(OnTask Version B.2.3.1)

Explaining Action In and Action Out

When creating an Action, some participants of Abelardo's workshop didn't know what 'Action In' and 'Action Out' meant. There are tooltips, but the Action Out is still not self-explanatory. Consider changing the name to something like ‘Invite feedback (gather data)’ and ‘Send feedback (based on data)’

System error when merging multiple files

While #39 alone is fairly innocuous, it leads to a more significant issue when merging multiple files:

  1. I start with a "base" dataset of names, email addresses, and SIS IDs.
  2. I merge a dataset of quiz 1 problem scores, keyed by Student ID (q1p1, q1p2, q1p3,...,q1p20). I do this merge on SIS ID from my Existing Table, and Student ID in my New Table.
  3. I merge a second set of quiz 2 problem scores, again keyed by Student ID (q2p1, q2p2, q2p3,...,q2p20). Again, I do this merge on SIS ID from my Existing Table, and Student ID in my New Table. This merge results in a "System Error" and the merge fails.

dataops Upload .csv issue

Hi Abelardo,

We are running the most recent release (pulled from master).

After upgrading, migrating now on the dataops CSV file upload we are experiencing a system error on file upload I am wondering if I missed something:

on the dataops/upload_s2/ page after upload:

System error
Oops! The platform had an internal error. We are sorry. We hope to address this anomaly soon.

the logs are showing:

[10/May/2018 16:00:37] ERROR [/usr/lib/python2.7/site-packages/django/core/handlers/exception.py:135] Internal Server Error:
/dataops/upload_s2/
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
response = self._get_response(request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/www/ontask_b/src/dataops/upload.py", line 156, in upload_s2
data_frame,
File "/www/ontask_b/src/dataops/ops.py", line 226, in perform_dataframe_upload_merge
which there is a corresponding key in src_df. This means that the data in
File "/www/ontask_b/src/dataops/ops.py", line 134, in store_dataframe_in_db
return None
File "/www/ontask_b/src/dataops/ops.py", line 103, in store_table_in_db
name=cname,
File "/usr/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/django/db/models/query.py", line 394, in create
obj.save(force_insert=True, using=self.db)
File "/usr/lib/python2.7/site-packages/django/db/models/base.py", line 807, in save
force_update=force_update, update_fields=update_fields)
File "/usr/lib/python2.7/site-packages/django/db/models/base.py", line 837, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/lib/python2.7/site-packages/django/db/models/base.py", line 923, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/usr/lib/python2.7/site-packages/django/db/models/base.py", line 962, in _do_insert
using=using, raw=raw)
File "/usr/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/django/db/models/query.py", line 1076, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "/usr/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 1099, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python2.7/site-packages/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/lib/python2.7/site-packages/django/db/utils.py", line 94, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/lib/python2.7/site-packages/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
IntegrityError: null value in column "in_viz" violates not-null constraint
DETAIL: Failing row contains (41, Firstname, string, t, [], 6, , null, null, null).

-Scott

Sending emails in the background

When sending emails, there should be a background process doing it, otherwise there could be a timeout from the browser and give the user the impression that the emails have not been sent.

upload/merge page

The script for the upload function on the Upload/Merge page should be able to discern whether the file being uploaded is either CSV or Excel format. The need for two separate buttons to handle the two formats seems redundant. Could be reduced to a single 'upload/merge' button and potentially reduce some user confusion.

upload-merge

Explaining filters and conditions

This relates to the 'Action Out' feature. On-screen instructions have been added, since the last release, that helps users understand what is meant by filters and conditions. We're not sure if this goes far enough so we propose the following wording (the sentence "There are no conditions yet" doesn't add any thing to the UI, so it could be changed for an explanation):

untitled-2

make html error

python version : Python 2.7.13 :: Anaconda 4.3.0 (64-bit)
While executing Step 1: make html
get following error

  File "/home/ec2-user/anaconda2/lib/python2.7/site-packages/Sphinx-1.5.1-py2.7.egg/sphinx/__main__.py", line 14, in <module>
    sys.exit(main(sys.argv))
  File "/home/ec2-user/anaconda2/lib/python2.7/site-packages/Sphinx-1.5.1-py2.7.egg/sphinx/__init__.py", line 66, in main
    sys.exit(build_main(argv))
  File "/home/ec2-user/anaconda2/lib/python2.7/site-packages/Sphinx-1.5.1-py2.7.egg/sphinx/__init__.py", line 76, in build_main
    from sphinx import cmdline
  File "/home/ec2-user/anaconda2/lib/python2.7/site-packages/Sphinx-1.5.1-py2.7.egg/sphinx/cmdline.py", line 14, in <module>
    import optparse
  File "/home/ec2-user/anaconda2/lib/python2.7/optparse.py", line 419, in <module>
    _builtin_cvt = { "int" : (_parse_int, _("integer")),
  File "/home/ec2-user/anaconda2/lib/python2.7/gettext.py", line 642, in gettext
    return dgettext(_current_domain, message)
  File "/home/ec2-user/anaconda2/lib/python2.7/gettext.py", line 606, in dgettext
    codeset=_localecodesets.get(domain))
  File "/home/ec2-user/anaconda2/lib/python2.7/gettext.py", line 541, in translation
    mofiles = find(domain, localedir, languages, all=1)
  File "/home/ec2-user/anaconda2/lib/python2.7/gettext.py", line 513, in find
    for nelang in _expand_lang(lang):
  File "/home/ec2-user/anaconda2/lib/python2.7/gettext.py", line 206, in _expand_lang
    from locale import normalize
ImportError: cannot import name normalize
make: *** [html] Error 1```

Message content length.

Hello,

I am not sure if this is a bug or a setting I missed. Is there a max content length for the email message body? They seemed to get trimmed around 2500 characters.

Table page - Active label

The Table page has a green 'Active' label underneath the data type. What this is supposed to indicate? Can it be removed?

capture

Admin UI: can't unshare Workflow

Using the Admin UI "Change workflow" page, I have shared a user's workflow with myself, by moving myself from the "Shared"-> "Available shared" pane to the "Chosen shared" pane, and saving. This works.

I would now like to unshare this workflow with myself.

I have moved myself from the "Chosen shared" pane, to the "Available shared" pane. When I click "Save", I get the following error message at the top of the page:

Please correct the error below.

and below the "Shared" panes, I see the following message:

This field is required.

How do I unshare a user's workflow with myself?

(OnTask Version B.2.3.1)

typos in v2.6 Workflow Details page

Potential 'point of reference' confusion for users. The columns of data in the OnTask Table page are represented as rows in the Workflow Details page. The arrow buttons (green circle) allowing chosen columns to be moved to the left or right in the Table View are identified as moving columns 'up' or 'down' & 'top' or 'button' [sic] - should be 'bottom.' Change for consistency.

workflow details v2 6

suggested mouse over directions:
^ = move one column left in Table View
v = move one column right in Table View
^^ = move to first column (far left) in Table View
vv = move to last column (far right) in Table View

Canvas 'time and date' data imported into OnTask

Experiencing the addition of an unexpected character into columns of 'time and date' data pulled from Canvas and imported into OnTask. We use a bespoke javascript tool to grab course data in CSV format from courses in Canvas that we then import into OnTask. The format for time and date appears fairly standard when viewed in excel

screen shot 2018-05-18 at 5 27 31 pm

and within a text editor programme

screen shot 2018-05-18 at 5 29 04 pm

But after getting imported into OnTask, a 'T' is introduced where a space is expected

screen shot 2018-05-18 at 5 27 53 pm

I can send an example dataset for testing.

Add view column picker

The 'Add view' panel is displayed via the Add view button on the Table page. There is a 'Column' picker that represents a drop-down list of checkboxes. Unfortunately, on Chrome, Firefox, and Edge, the drop-down list appears on the right hand side of the screen. It should be pinned to the bottom edge of the drop-down list. I haven't tested it on Safari or Opera.

capture

Rich text editor drag event

Traditional rich text editors allow you to highlight some text within the editor and drag it to another part of the body text. But when editing the email for the 'Action Out' feature, selecting some text and dragging it causes the editor to show an overlay saying "Drop image or text." If you then let the mouse button go (drop event) it will duplicate the selected text to where your cursor was. This is annoying, especially when you are trying to move around some of the 'text conditions' tags to different parts of the email body.

Suggest disabling the overlay because it doesn't work for dropping images onto it anyway.

capture

Import data - column names ticked by default

When importing a csv/xlsx file, it would make more sense to have all column names ticked by default (Step 2: Select Columns), then the user can untick those columns that they don't want to import, or click 'untick all' and start from scratch.

Action In - Submit button vs Back button

The 'Action In' survey has a Submit button but the next page shows a Back button. This encourages students to go back to the survey question(s) again. I understand that users might change their mind about their submission choices but this shouldn't be foremost on the 'submission successful' page. Maybe remove the Back button and place an instruction saying if they want to change their submission, just follow the link from the email again.

csvupload issue with unicode field name

Hi Abelardo
I have installed ontask from 2.5 to 2.7 now. Each time I will need to patch the csvupload file as currently it wont cope with unicode in field names.
Sending you our csvupload file here, hope it could help.
csvupload.py.txt
it basically try to replace each column to unidecode(unicode(text, encoding = "utf-8"))

replace out this block with the following block
# Process CSV file using pandas read_csv
#try:
# data_frame = pandas_db.load_df_from_csvfile(
# request.FILES['file'],
# form.cleaned_data['skip_lines_at_top'],
# form.cleaned_data['skip_lines_at_bottom'])
#except Exception as e:
# form.add_error('file',
# 'File could not be processed ({0})'.format(e.message))
# return render(request,
# 'dataops/upload1.html',
# {'form': form,
# 'dtype': 'CSV',
# 'dtype_select': 'CSV file',
# 'prev_step': reverse('dataops:list')})
#################################################################################
data_frame = pd.read_csv(
request.FILES['file'],
index_col=False,
infer_datetime_format=True,
quotechar='"',
skiprows=form.cleaned_data['skip_lines_at_top'],
skipfooter=form.cleaned_data['skip_lines_at_bottom']
#,encoding='utf-8'
)
# Strip white space from all string columns and try to convert to
# datetime just in case
cols = {}
try:
for x in list(data_frame.columns):
y=remove_non_ascii(x.strip())
cols[x]=y

        if data_frame[x].dtype.name == 'object':
            
            # Column is a string!
            #data_frame[x] = data_frame[x].str.strip()

            # Try the datetime conversion
            try:
                series = pd.to_datetime(data_frame[x],
                                        infer_datetime_format=True)
                # Datetime conversion worked! Update the data_frame
                data_frame[x] = series
            except ValueError:
                pass
    data_frame.rename(columns=cols, inplace=True )
    #print( data_frame )
except Exception as e:
    form.add_error('file',
                   'File could not be processed ({0})'.format(e.message))
    return render(request,
                  'dataops/upload1.html',
                  {'form': form,
                   'dtype': 'CSV',
                   'dtype_select': 'CSV file',
                   'prev_step': reverse('dataops:list')})

########################################################################

Merge with different key column names: both columns in result

My initial data import contains 2 columns email and sis id:

screen shot 2018-05-16 at 11 39 52 am

I want to merge with a second data file that has a different key column name: student id:

screen shot 2018-05-16 at 11 41 27 am

I specify to merge on the key columns sis id in the Existing Table, and student id in the New Table:

screen shot 2018-05-16 at 11 42 36 am

The merge preview suggests that rows will be matched on sis id = student id, A1 will be a new column in the Existing table, and email will be unchanged:

screen shot 2018-05-16 at 11 45 03 am

The result (surprisingly) includes all 4 columns:

screen shot 2018-05-16 at 11 45 25 am

The table merge visualization at Step 3 and the preview at Step 4 both suggest a single key column in the result. If a 4-column result is the intended behaviour, it should be made more clear in the previews at Steps 3 and 4 in the merge process.

Messages that fail to generate previews also cause "System Error"

The following error message is generated when attempting to send emails when one (or more) of the messages also fails to generated a preview.

System error
Oops! The platform had an internal error. We are sorry. We hope to address this anomaly soon.

It would be nice if the error message were more specific. I was able to diagnose this by clicking through all of the previews, but had to click through N previews to find the one message that was not generating properly. In my case, the message failed to generate a preview because a condition was applied to a field that had missing data.

(OnTask Version B.2.3.1)

CSV download from table page ignores view

If the table page has a "view" being used, the CSV download button still downloads the complete table instead of the subset defined by the view.

It should only download the relevant subset.

Data merge fails when key column names and values don't match

Error is

Merge operation failed. (New values in column student id are not of type integer)

A minimal dataset is attached.

Steps to reproduce:

  1. upload A1
  2. merge A2 on student id in the existing table, sis id in the new table, using either merge method 1 or 4 (Merge methods 2 and 3 work.)

All 4 merge methods work as expected if the column sis id in A2 is renamed to student id.

This issue highlights that the values in the key columns are not "merged" when the column names are different, but the values are merged when the columns have the same name. This behaviour is not made clear to the user.

issue41.zip

Text conditions doesn't show number of matches

When creating an email (Action Out) and applying a filter, you can see how many learners match the filter when the filter is applied. It would be good to have similar functionality to the 'Text Conditions' feature as well so you can see the number of students who match each condition.

Track email reading without adding column

Why are there two different checkboxes for tracking email reading?

When would/should a user track reading, but not add a column (the configuration selected below)?

The action-out docs provide extra detail about the purpose of the summary and snapshot checkboxes, but not the two tracking ones.

screen shot 2018-05-16 at 9 38 40 am

Session timeout - no warning

As expected, the session times out due to inactivity - not traversing pages nor initiating Ajax requests - but there is no warning. When the user finally interacts with the website after their session has timed out, they are prompted to log in again. This is especially inconvenient if they had taken some time to draft an (Action Out) email, and they finally clicked 'Done', only to discover that their work was lost.

Propose adding a session timeout warning message that either prompts the user to save their work or keep their session active (the latter could just ping the server through an Ajax request).

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.